Searching for samples in VB [WebWare SDK]
I'm trying to develop an application in Visual Basic 6.0 i wonder if someone one knows how to use the in instruction S4CurrentPositionGet because it returns an error. There is any example of how to use it? I've tried the one that appears on the WebWareSDK Manual but it doesn't work.
I know that with the RobotBox control i can see the position but i want to use it on my application and i haven't been able to obtain it.
I've also tried to develop an application in C language and it seemed to work only when i ask for data defined on the OPC as RAP version or TPU version, but when i try to ask for the robot position it only returns 0.000
Thanks in advance
Juan
Comments
-
Here is a sample of a click event handler that shows how to do this:
Private Sub Command1_Click()
Dim intRetVal As Integer
Dim myPos As New S4RobPosDataintRetVal = Helper1.S4CurrentPositionGet(myPos)
Label1.Caption = Str(myPos.x)'write the x-coord to a label
End SubYou need to verify that you are actually communicating with the controller;what error is being returned?
Russell Drown0 -
The returned error was -504. Is there any place where i can find the meaning of the returned erros? But now i've solved it, i think it came from a wrong communication with the controller. I normally don't use VisualBasic but LabWindows/CVI so i'm trying to learn two things at the same time .
Thank you Russ
Juan
0 -
See the Appendices in the online help for return code values.Russell Drown0
-
-504 means you did not connect to the controller, i think.
"-504:InterLink Module robot interface task is dead"
Set the Helper.Robot variable to a valid Alias and check the InterfaceState if it is connected.
greets
M
--------
010001110
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings