Hi,
I'm programming a probing application on a KRC4 controller but I'm having some trouble using the interrupt function. I would like to execute a motion and record the position and stop the robot when I receive the signal from my probe. After the robot is stopped, I would like it to return to its starting position. Here is the probing code:
DEF PROBING(Start_Pts:OUT,Stop_Pts:OUT)
E6POS Start_Pts,Stop_Pts
PTP Start_Pts
INTERRUPT DECL 1 WHEN $MEAS_PULSE[2]==TRUE DO RECORD_PROBE()
INTERRUPT ON 1
LIN Stop_Pts
INTERRUPT OFF 1
LIN Start_Pts
END
Display More
And the interrupt code:
The interrupt function is working (I'm able to record the probing position and stop the robot), however, as soon as the robot is stopped, the motion is resumed... I would like that when the robot is stopped (after the BRAKE instruction) the motion instruction LIN Stop_Pts is cancelled and the program directly goes to the next instruction, i.e.: LIN Start_Pts.
Does someone have an idea?? Thanks!