LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Get an CAObjHandle from a struct

Hi Dave,

I've tried to use the "Robot" object to get the position and there is a fuction for that but is the one i've already told you:

RimbaseLib__DHelperS4CurrentPositionGet (CAObjHandle objectHandle, ERRORINFO *errorInfo, CAObjHandle robpos, short *returnValue);

and it as you told me there seems to be something strange on this one because the "robpos" CAObjHandle it supposes to return the position of the robot, but is not passed by reference so it doesn't change its value. This is the only funtcion for the "Robot" object that returns the position, that's why i try to ask about the position with another object (there are anothers objects that return the position, but i haven't found any that works).

About what you tell me of initilizing the variables i agree that i should do it, but as i'm working in debug mode, i check the variables before they have to change and after that, so i see if they have changed.

Those are the data types it suppose to return the IPosition (into a variant), the one returned by RimbaseLib__DHelperS4CurrentPositionGet would have the same and some others including orient, external axis,...

Vector Properties

Property RAPID Type Equivalent
Pos(Num As Integer) As Single

.Pos(0) .x
.Pos(1) .y
.Pos(2) .z

Scalar Properties

Property RAPID Type Equivalent

x As Single .x
y As Single .y
z As Single .z

I'm working with the WebWareSDK 3.2, i'm not sure if there is some free information about it, but the help it has is oriented to VisualBasic.
0 Kudos
Message 11 of 14
(1,219 Views)
Hi Juan,

Wow, unfortunatly I'm running out of ideas on how to make this work :-(... I did a search for WebWareSDK and I was unable to find any free references to it.

But I do still believe that there is a function that serves as a missing link between the Robot object and the IPosition object. Perhaps there is another layer(s) of object's between the Robot and IPostion object and there are actually two(or more) intermediate functions that bridge the gap? I really don't know at this point?

I wish I could give you some more help on this, but I really don't know where to go from here. If you have any ideas let me know.
0 Kudos
Message 12 of 14
(1,200 Views)
Hi Dave,

Finally i have succeed, at least i have been able to get the position of the robot. Obviously it was something very simple 😉 but i get to the solution.

First you have to create the RobPosData, then use the CurrenPositionGet method (passing the CAObjHandle returned when you create the RobPosData), and finally asking the position with the RobPosDataGetPos method, that returns the positions on the axis.

Thank you very much for your help Dave

Juan
0 Kudos
Message 13 of 14
(1,179 Views)
Hi Juan,

I'm glad that you got it to work! It always seems like the toughest part of coding some of these ActiveX controls isn't the logic, it's trying to figure out what each function really does 🙂
0 Kudos
Message 14 of 14
(1,175 Views)