
Indexer-Programmer-Manual.pdf REV 1.3
Here is an example:
;
;This program handles faults correctly
;
UNITS=1
.
.
. {Some initialization code}
.
PROGRAM_START:
ENABLE
MOVED 10
MOVED -10
.
. {Program statements}
.
END
;----------------------------------------------------------------------------
----------
;Fault Handler. If any fault occurs following program will run:
;----------------------------------------------------------------------------
-- -------
ON FAULT ;statement starts fault handler
.
;Fault handler program. Motion stopped, Drive disabled, events not scanned
;while executing fault handler statements
;
;Do whatever necessary in your system
;after fault is detected. Turn ON/OFF some outputs …etc.
.
. {Statements}
.
RESUME PROGRAM_START ;program restarts from label PROGRAM_START
; RESET ;you can use this statement instead.
;to start program from the beginning
ENDFAULT ;fault handler MUST end with this statement
12
Komentáře k této Příručce