Dear,
I want to make a clean function to send the actual position of the robot to the PLC. I want to do this via group outputs. (It is not that impirtant that the values are exact)
I programmed something that works, but I'm sure you can make it cleaner in rapid. Has someone an Idea how I can send the actual position without the detour.
(ABB, IRC5, Robotware 6.13)
VAR intnum RAX1;
VAR dnum nRAX1;
VAR dnum rRAX1;
VAR dnum sRAX1;
Loop:
ActPosCartTool0:=CRobT(\Tool:=tool0\WObj:=UserFrame0);
ActPosJnt:=CJointT();
RAX1:=ActPosJnt.robax.rax_1;
nRAX1:=NumToDnum(RAX1);
rRAX1:=RoundDnum(nRAX1);
IF rRAX1<0 THEN
sRAX1:=65535+rRax1;
ELSE
sRAX1:=rRax1;
ENDIF
SetGO GO1_CoordJ1,sRAX1;
WaitTime 0.01;