5.11 Expansion Module MAC00-R1/R3/R4
Example 1- Conditional jump controlled by level at an input
The program example below shows how a jump to line 5 is done IF input 3 is active (ap-
plied with a voltage from outside).
If input 3 is NOT active the program execution just goes on from line 2.
Example 2- Conditional jump controlled by shift at an input
The program example below shows how a jump to line 5 is done IF a rising edge (shift
from 0 to 1) at input 1 has happened since last jump with the same condition was exe-
cuted.
If no shift was detected the program execution just goes on from line 2.
Notice that the function do not check directly at the input but uses an internal flag which
is set every time a rising edge is detected.
JVL A/S - User Manual - Integrated Servo Motors MAC050 - 4500
Rising edge
1
Input 1
0
1
Internal flag is set as function
Internal flag
of rising edge at input 1
0
The IF command checks if the internal
flag has been set as function of a previous
rising edge at input 1.
After checking the flag is cleared.
329