Greetings,
I'm trying to create a simple interrupt program that stops motion once a certain value is set to condition. I have:
Code
$tool=TOOL_DATA[1]
$base=BASE_DATA[2]
xcurpos=$Pos_Act
PTP xcurpos
PTP {A1 -90.77, A2 -22.77, A3 108.01, A4 -0.62, A5 95.11, A6 179.8, E1 997.28} ;start pos
$CYCFLAG[112]=(Measur_OUT1 >= 0)
INTERRUPT DECL 2 WHEN $CYCFLAG[112]==True DO subBrakez()
INTERRUPT ON 2
SubFindposZ()
END
Display More
Code
DEF SubFindposZ()
LIN_REL {Z -50}
WAIT SEC 0 ; make SURE (!!!) that advance run pointer is here when interrupt is triggered
END
I think it should work by going negative 50mm in Z until the condition is set then brake?