I need reset an external axis to zero using RAPID code. The IndReset command only resets the axis to a multiple of 360 away from the original value.
This is on an S4C robot.
What I am looking to do is something like this.
PROC AxisReset()
VAR num regAXIS:=0;
VAR num regFK:=0;
WHILE regFK<> 3 DO
IndAMove M7, 1ToAbsNum:=regAXIS, 5;
WaitUntil IndInpos(M7,1)=TRUE;
TPErase;
TPReadFK regFK,“What direction?”,“”,“Left”,“Reset”,“Right”,“”;
TEST regFK
CASE 2:
regAXIS:=regAXIS-2;
CASE 4:
regAXIS:=regAXIS+2;
ENDTEST
ENDWHILE
!!!
!Axis reset command here
!!!
ENDPROC
Liam Wallace