Reference – Lenze E94P PositionServo with MVOB User Manual

Page 91

Advertising
background image

PM94H201B_13xxxxxx_EN

L

89

Reference

Table 33: EVENTS ON/OFF

EVENTS OFF/ON Globally Disables/re-enables events

Statement

Purpose

EVENTS OFF command when executed will disable any events currently enabled (running). EVENTS
ON Command re-enables any events previously disabled through the EVENTS OFF command.
EVENTS ON is not a global enable of all declared events. Events status is indicated through bit #30 of
the DSTATUS register or by system flag ‘F_EVENTSOFF’. EVENTS OFF/ON allows for easy disable
and re-activation of events in sections of the main program or subroutines that the programmer
doesn’t want interrupted by event code.

Syntax

EVENTS OFF

Disables execution of all events

EVENTS ON

Restores execution of previously enabled events.

Remarks

Events are globally disabled after a program reset is made or a fault occurs. Events are re-enabled by
executing the individual EVENT <name> ON statement following either a Reset or a Fault Condition.

See Also

EVENT

Example:

********************************************************************************

EVENT SKIPOUT IN_B4 RISE

;check for rising edge of input B4

JUMP TOGGLE

;redirect code execution to TOGGLE

ENDEVENT

;end the event

EVENT OVERSHOOT IN_B3 RISE

;check for rising edge of input B3

JUMP SHUTDOWN

;redirect code execution to SHUTDOWN

ENDEVENT

;end the event

********************************************************************************

EVENT SKIPOUT ON

EVENT OVERSHOOOT ON

********************************************************************************

……….…User code……………..

EVENTS OFF

;turns off all events

……….…User code……………..

EVENTS ON

;turns on any event previously activated

Table 34: FAULT

FAULT

User generated fault

Statement

Purpose

Allows the user program to set a custom system fault. This is useful when the programmer needs to
define a fault code and fault process for custom conditions like data supplied by interface out of range
etc. Custom fault numbers must be in region of 128 to 240 (decimal)

Syntax

FAULT <FaultNumber>

Sets system fault.
<FaultNumber> constant in range 128-240

Remarks

Custom fault will be processed in the same way as a system fault. There will be a record in the fault
log. Variables are not allowed in this statement.

See Also

ON FAULT

Example:

FAULT 200

;Sets fault #200

Advertising