RobotStudio event

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?! :)
  • 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.
  • Hey Scott,

    thank you for your thoughts. Since then I was trying to find the right command.

    First of all I want to make my situation more clear: I have a robot programm on the VC with several paths with changing workobjekts within the paths in different modules. When I start the simulation I want to read the currently used workobject from the path the robot is moving on. Active workobjects can change while simulation is running. Some of them are being moved by external axes.

    So what I really need is live data from the controller and not from the station. Robotstudio must use this data somewhere to move the robots in the graphics window of the station. But I can't find any command which is able to read this probably internal data from the VC.

    Your suggestion to get the frame object by name doesn't work because then I have to know which workobject is used at every time. Also getting something from the mechanism doesn't work too.

    Do you have further suggestions or information?

    Tank you!