Macro Function
|
Function |
Properties |
Values |
Comments |
|---|---|---|---|
|
MACRO |
Actions
|
Call |
Call another macro. The called macro must end with a “Macro return” function, otherwise it could misbehave |
|
Return |
Return to the caller of this macro |
||
|
Jump |
Jump to a macro |
||
|
Repeat |
Repeats the current macro from the start the number of times given. 0 means repeat forever (endless loop) |
||
|
End program |
Example: Jump from macro #4 to macro #2 without return
If Function
|
Function |
Properties |
Values |
Comments |
|---|---|---|---|
|
IF |
If |
|
Use the IF command to execute a block of commands based on a condition that is provided. Different 'is' properties are available based on the different 'if' conditions to evaluate.
|
|
Is |
|
Logical comparison between values |
|
|
Than |
Constant / variable |
It can use any readable variable in the controller or an integer value |
|
|
Then |
|
Type of macro action. See Macro function above. |
|
|
Macro number |
Integer between 0 and 63 |
||
|
Else |
|
Type of macro action. See Macro function above. |
|
|
Macro number |
Integer between 0 and 63 |
Example:
This program shows how to set a digital output depending on an analog input signal value.
Check Analog input #1 value: If greater than 100 ADC counts jump to macro #2 and set digital output #1 to ON, otherwise jumps to macro #2 and set digital output #1 to OFF.
Wait Function
|
Function |
Properties |
Values |
Comments |
|---|---|---|---|
|
Wait
|
Timer |
Time in ms |
The macro execution waits for a given time before processing the next function. |
|
Register Value Timer |
Time in ms |
Time (ms ) can be defined as constant value or read from an internal register. This option uses the internal value of 'wait register' as variable. |
|
|
Conditional |
|
The macro execution waits for an event, motion value or input signal status before processing the next function. |
Example:
Program waits for digital input = ON before executing the next macro instruction.
Stop Function
|
Function |
Properties |
Values |
Comments |
|---|---|---|---|
|
Stop |
Mode |
|