On fault/endfaulton fault statement, On fault/endfault, On fault statement – Lenze PMSS1000 Simple Servo User Manual

Page 68

Advertising
background image

Indexer-Programmer-Manual.pdf REV 1.3

ON

FAULT/ENDFAULT

On

Fault

Statement


Purpose

Statement starts fault handler section. Fault handler is a piece of code which called
upon any fault occurrence. Fault handler starts with ON FAULT statement and must
be ended with ENDFAULT statement. If fault handler is not defined any fault will
cause user program termination. When SSi goes to fault state it will disable drive and
enter fault handler. All scanned events will be disabled until program in fault handler.
Fault handler needs to be ended with RESUME or RESET statements. If program
reaches statement ENDFAULT before RESUME or RESET statements user program
will terminate (come to the end). Certain statements can't be used in fault handler.





Following statements can't be used in fault handler:

MOVE,MOVED,MOVEP,MOVEDR,MOVEPR,MDV,
MOTION SUSPEND

MOTION

RESUME

GOTO

GOSUB

JUMP

ENABLE

GEAR

ON/OFF

VELOCITY

ON/OFF


Syntax

ON

FAULT

{…statements}

ENDFAULT


See Also

RESUME, RESET


Example:

…{statements}
FaultRecovery:
…{statements}

END

ON FAULT

;any fault gets program flow here

…{statements}

RESUME FaultRecovery

;execution of resume ends fault handler

;if resume is omitted program will terminate

ENDFAULT

;must end with this terminator

68

Advertising