beautypg.com

Programming – Lenze PM94P01C User Manual

Page 49

background image

PM94P01C

47

Programming

Scanned events may also be used with a timer to perform an action on the periodic time basis.

The program statements contained in the action portion of the scanned event can be any legal program statement except
the following statements: Subroutine calls (GOSUB), DO/WHILE, WHILE, WAIT, GOTO and also motion commands:
MOVED,MOVEP, MDV, STOP, MOTION SUSPEND/RESUME.

EVENT INPUT RISE
This scanned event statement is used to execute a block of code each time a specified input changes its
state from low to high.

EVENT INPUT FALL

This scanned event statement is used to execute a block of code each time a specified input changes its
state from high to low.

EVENT TIME
This scanned event statement is used to execute a block of code with a repetition rate specified by the
argument. The range for “timeout” is 0 - 50,000ms (milliseconds). Specifying a timeout period of 0 ms will result in the
event running every event cycle (256ms).

EVENT expression
This scanned event statement is used to execute a block of code when the expression evaluates as true.

EVENT ON/OFF
This statement is used to enable/disable a scanned event. Statement can be used within event’s block of code.

Scanned Event Statements Summary

Table 15 contains a summary of instructions that relate to scanned events. Refer to Section 3 “Language Reference”
for more detailed information.

Table 15: Scanned Events Instructions

Name

Description

EVENT ON/OFF

enable / disable event

EVENT INPUT RISE

Scanned event when goes low to high

EVENT INPUT FALL

Scanned event when goes high to low

EVENT TIME

Periodic event with repetition rate.

EVENT expression

Scanned event on expression = true