Practical examples
Section 5-2
323
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"
Содержание SYSMAC CJ Series
Страница 2: ......
Страница 70: ...Specifications Section 2 4 58...
Страница 84: ...FINS commands Section 3 4 72...
Страница 148: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Страница 277: ...Section 265 SECTION 5 Examples This chapter gives 2 categories of examples and tips How to s Practical examples...
Страница 370: ...Section 358...