Omron trajexia CJ1W-MCH72 Operation Manual page 334

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

Practical examples
i=0 'Servo Parameters
res=0 'Servo Parameters
res_act=0
res_ant=0
res_bit=0
run_act=0
run_ant=0
run_bit=0
stop_act=0
stop_ant=0
stop_bit=0
'Omron Auto Generated - Local Variables End
VR(signal_state) = 0
This subroutine tests whether the detected hardware is the expected one
or not. If the right hardware is detected, it sets the right values to the
axes and servo drives
At least the right system needs to be properly detected
'once
GOSUB system_detection
This subroutine stops all possible running programs and movements.
'Stop all potential programs movements
GOSUB stop_all
status_word=1
The main loop of the program handles the fault handling: run application
programs, stop application programs, reset the system and report the
status.
loop:
IF alarm_bit THEN
action=1 ' Alarm, push RESET to restart
IF status_word<>2 THEN
PRINT "Stop with Alarm"
GOSUB stop_all
status_word=2 'Programs stopped with error
ENDIF
IF res_bit=1 THEN
action=2 'Resetting
PRINT "Resetting"
GOSUB reset_all
status_word=1 'Programs stopped NO error
ENDIF
ELSE
action=3 'OK
IF run_bit=1 THEN
PRINT "Start application"
Section 5-2
323

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents