12scanned event statements, Scanned event statements, 12 scanned event statements – Lenze PMSS1000 Simple Servo User Manual

Page 39

Advertising
background image

Indexer-Programmer-Manual.pdf REV 1.3

2.12 Scanned Event Statements

Scanned event statements establish conditions that are scanned on regular basis. SSi scans events
every 256uS. Scan and Scan rate independent of main program timing or conditions. Once established,
the scanned event can be enabled or disabled in the main body of the application program, in another
event or itself (see explanations below). If condition is true, and the scanned event is enabled, when
scanned, the specific action(s) is (are) executed.
Scanned events are used to record events and perform actions independent of the main body of the
program. For example, if you want output 3 to come ON when the position is greater then 4 inches, or if
you need to turn an output 4 ON whenever input 2 and 3 are ON, you may use the following scanned
event statements.

EVENT

PositionIndicator APOS > 4

OUT3=1
ENDEVENT

EVENT

Inputs3and4

IN_A4 & IN_B1

OUT

4=1

ENDEVENT

…statements

Scanned events may also be used with 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: Subroutine calls (GOSUB), DO/WHILE, WHILE, WAIT, GOTO and also motion
commands: MOVED,MOVEP,MDV,STOP, MOTION SUSPEND/RESUME.

EVENT <name> INPUT <inputname> RISE/FALL
The scanned event statement is used to execute block of code every time when specified input
<inputname> changes its state from low->hi (RISE) or from hi->low (fall).

EVENT <name> TIME <timeout>
The scanned event statement is used to execute block of code with repetition rate specified by <timeout>
argument.

EVENT <name> expression
The scanned event statement is used to execute block of code when expression evaluates to true.

EVENT <name> ON/OFF
This statement is used to enable/disable scanned event. Statement can be used within event's block of
code.

39

Advertising