Recording current position of r2000ib in background logic or macro

  • i apologize in advance if there is already a thread for this. I will try to be brief in my question. I am trying to record the current position of a robot, be it mig, spot weld, or handling, under a specific event. The application is a jig that holds components is put " in use". When the machine is in use the jig will clamp and do various other functions and move to a welding or pickup position. This is the auto function. If you turn the switch on the front of the machine to manual you lose the in use status of the robots and jigs of the cell. I have created logic in the plc to remember where the jig was as well as the clamps so if you need to work on the jig in manual you may and when work is completed you just have to put the jig back in position that it captured when you switched to manual to put it back in use. I wish to do the same with the robots as well by utilizing the recovery event as a di to start the logic in the background or a macro if it will work to set the current position (lpos) to a pr and then copy the pr[x,i] into a reference position using the variable $ name. I can then use the do of the reference position do to signal the plc that the robot is at or extremely close to the position it was before the machine went into manual and allow the robot to be put back in use. I appreciate everyones time and patience.

  • Actual joint coordinates are in system variables $SCR_GRP[1].$MCH_ANG[1] …[6].

    Actual world XYZ coordinates may be obtained from the undocumented $DIAG_GRP[1].$CUR_TCP_X (_Y,_Z,), but not W,P,R.


    Also (not sure about v8.30)

    $SV_INFO[1].$CART_POS ARRAY[6] OF REAL is the actual position in the World coordinates.

    $SV_INFO[1].$CART_POS_UF ARRAY[6] OF REAL is the actual position in the active User Frame.

Advertising from our partners