Omron SYSMAC CJ Operation Manual page 335

Sysmac cj-series programmable controller motion control unit
Hide thumbs Also See for SYSMAC CJ:
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

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj1w-mch72

Table of Contents