PC SDK: Get currently used workobject while simulation

Hello,

I am new to programming in Add-Ins for ABB Robotstudio and have one question. I am trying to get the current tool position while simulating.

My target is that I want to get the to position of the TCP regarding the currently used workobject which is probably moved by an external axis. What I need is the currently used workobject, the position of the workobject and the current TCP of the robot while the simulation runs.

What I already got is the current position of the TCP (tooldata) with the RsTask.ActiveTool.Frame.GlobalMatrix instruction. But this only works, if I choose the right tool in the Home->Settings Tab. In some of my routines the workobject and the tool changes. What I really need is the current position of the active used tool and workobject in the robot.

Any suggestions?

Thanks in advance

Comments

  • Somebody got an idea?! :)
  • scottMHAscottMHA Luton, United Kingdom
    Easiest way would be to get the frame object by name and then set a timer to update the values every tick or elapsed event (you can set this to 1 millisecond if you wish). You would need to have the frame synced to the station for this. Alternativly you could get the mechanism object from the virtual controller and see if there's any methods in that to get the current values.
Sign In or Register to comment.