Introduction – Lenze E94P PositionServo with MVOB User Manual

Page 18

Advertising
background image

16

L

PM94H201B_13xxxxxx_EN

Introduction

With Fault Handler

Add the following code to the end of your sample program. When the program is running, switch the ENABLE input
IN_A3, to the off state. This will cause the drive to generate an F_36 fault ((Hardware disable while drive enabled in
inhibit mode) and put the drive into a Fault Mode. From this point the Fault Handler Routine will take over.

F_PROCESS:

WAIT UNTIL IN_A4==1 ;Wait until reset switch is made

WAIT UNTIL IN_A4==0 ;and then released before

GOTO RESET_DRIVE

;returning to the beginning of the program

END

;*********************** Sub-Routines **************************************

Enter Sub-Routines here;

;*********************** Fault Handler Routine *****************************

ON FAULT

;Statement starts fault handler routine

;Motion stopped, drive disabled, and events no longer

;scanned while executing the fault handler routine.

OUT2 = 0

;Output 1 off to Disengage gripper.

;This will drop the part in the gripper

OUT1 = 0

;Retract Pick arm to make sure it is up and out of the way

RESUME F_PROCESS

;program restarts from label F_PROCESS

ENDFAULT

;fault handler MUST end with this statement

NOTE

The following statements can not be used inside the Fault Handler Routine:

ENABLE
WAIT
MOVE
MOVED
MOVEP
MOVEDR
MOVEPR
MDV
MOTION SUSPEND
MOTION RESUME
GOTO, GOSUB
JUMP
VELOCITY ON/OFF
WHILE / ENDWHILE
DO / UNTIL
EVENT (ON, OFF)
EVENTS (ON, OFF)
HOME
HALT
STOP MOTION (QUICK)

Refer to section 2.1 for additional details and the Language Reference section for the statement
“ON FAULT/ENDFAULT”.

Advertising