112
the run button, the program moves to point P1 and then to point P2 in turn, the program state changes
from running to ready state, and the pointer returns to the first line.
Note: When a subprogram is called in the main program, and the
subprogram contains END, the subprogram ends at this time and the main
program continues to be executed.
Program example
‘Main program MAIN.PRG
J P[1]
CALL LIB.PRG
WAIT TIME = 100
J P[2] VEL=100
‘Subroutine LIB.PRG
J JR[1]
END
J JR[2]
Remarks: As in the above program, the main program MAIN.PRG calls the subprogram
LIB.PRG, the execution flow is: the program moves to point P1 in turn, then calls the subprogram,
moves to JR[1] point, when the program executes to the subprogram END instruction, End the
subroutine, return to the main program, and then move to point P2, the program execution is
complete.
19.8 Other instructions
19.8.1 THROW instruction
Instructions:
This instruction is used for user-defined part of alarms and prompts, alarm prompts the user or
stop the robot program running.
Fatal: Unrecoverable serious error, the robot stops moving, the motion buffer is cleared, the
program enters an error state and the buffer is cleared, and it cannot be recovered (the program
cannot be resumed).
Error: A recoverable error. The robot stops moving and the program enters an error state, but
the motion buffer is not cleared, and the operation can be resumed.
Warning: Warning, the system is in a critical state or user operation may cause adverse
consequences and other prompt messages, which will not cause the program or movement to stop.