$IF with frequency

The $IF control structure has an extended syntax in the realtime cycle. Every $IF can be qualified by several keywords.

$IF [ONCE | EDGE | ALWAYS]=..

; instructions

$ENDIF

Keyword

Meaning

ONCE

If the condition is fulfilled, the instruction section is executed exactly once.

EDGE

For every change in value of the condition from FALSE to TRUE.

ALWAYS

As soon as the condition is fulfilled, the instructions are executed in every run-through.

Notice

notice

In the case of an $IF with a specified frequency, multiple branches with $ELSEIF and $ELSE are not available.