Examples and tips
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"
GOSUB start_app
status_word=3 'Application running
ENDIF
IF stop_bit=1 AND status_word=3 THEN
PRINT "Stop by command"
GOSUB stop_all
status_word=1
ENDIF
ENDIF
PROGRAMMING MANUAL
310
Need help?
Do you have a question about the TJ2-MC64 - PROGRAMMING and is the answer not in the manual?
Questions and answers