Programming – Lenze PM94P01C User Manual

Page 49

Advertising
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 <name> INPUT <inputname> RISE
This scanned event statement is used to execute a block of code each time a specified input <inputname> changes its
state from low to high.

EVENT <name> INPUT <inputname> FALL

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

EVENT <name> TIME <timeout>
This scanned event statement is used to execute a block of code with a repetition rate specified by the <timeout>
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 <name> expression
This scanned event statement is used to execute a block of code when the expression evaluates as true.

EVENT <name> 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 <name> ON/OFF

enable / disable event

EVENT <name> INPUT <inputname> RISE

Scanned event when <input name> goes low to high

EVENT <name> INPUT <inputname> FALL

Scanned event when <input name> goes high to low

EVENT <name> TIME <value>

Periodic event with <input name> repetition rate.

EVENT <name> expression

Scanned event on expression = true

Advertising