Introduction
An operator is a symbol for:
an arithmetic operation to be executed,
a logical operation to be executed or
calling an elementary function block - DFBs or subroutines.
Operators are generic, i.e. they adapt automatically to the data type of the operands.
Load and Save Operators
IL programming language load and save operators:
Operator |
Modifier |
Meaning |
Operands |
Description |
---|---|---|---|---|
|
(only
for operands of data type |
Loads the operands value into the accumulator |
Literal, variable, direct address of any data type |
The value of an operand is loaded
into the accumulator using Example: In this example the
value of
|
|
(only
for operands of data type |
Saves the accumulator value in the operand |
Variable, direct address of any data type |
The current value of the accumulator
is stored in the operand using Example: In this example the value of
The "old" result is used in subsequent calculations, depending
on whether or not an Example: In this example the value of
|
Set and Reset Operators
Set and reset operators of the IL programming language:
Operator |
Modifier |
Meaning |
Operands |
Description |
---|---|---|---|---|
|
- |
Sets the operand to 1, when the accumulator content is 1 |
Variable, direct address of |
Example: In this example the value of
Usually this operator is used together with the reset operator Example: This example shows a
RS flip-flop (reset dominant) that is controlled through the two Boolean
variables
|
|
- |
Sets the operand to 0 when the accumulator content is 1 |
Variable, direct address of |
Example: In this example the value of
Usually this operator is used together with the set operator Example: This example shows a
SR flip-flop (set dominant) that is controlled through the two Boolean
variables
|
Logical Operators
IL programming language logic operators:
Operator |
Modifier |
Meaning |
Operands |
Description |
---|---|---|---|---|
|
|
Logical AND |
Literal, variable, direct address
of |
The In the case of Example: In the example
|
|
|
Logical OR |
Literal, variable, direct address
of |
The In the case of Example: In the example
|
|
|
Logical exclusive OR |
Literal, variable, direct address
of |
The If more than two operands are linked, the result with an uneven number of 1-states is 1, and is 0 with an even number of 1-states. In the case of Example: In the example
If more than two operands are linked, the result with an uneven number of 1-states is 1, and is 0 with an even number of 1-states. Example: In the example
|
|
- |
Logical negation (complement) |
Accumulator contents of data types |
The accumulator content is inverted
bit by bit with Example: In the
example
|
Arithmetic Operators
IL programming language Arithmetic operators:
Operator |
Modifier |
Meaning |
Operands |
Description |
---|---|---|---|---|
|
|
Addition |
Literal, variable, direct address
of data types |
With Example: The example corresponds to the formula
|
|
|
Subtraction |
Literal, variable, direct address
of data types |
With Example: The example corresponds to the formula
|
|
|
Multiplication |
Literal, variable, direct address
of data type |
The Example: The example corresponds to the formula
Note: The |
|
|
Division |
Literal, variable, direct address
of data type |
The Example: The example corresponds to the formula
Note: The |
|
|
Modulo Division |
Literal, variable, direct address
of |
The Example: In this example
|
Comparison Operators
IL programming language comparison operators:
Operator |
Modifier |
Meaning |
Operands |
Description |
---|---|---|---|---|
|
|
Comparison: > |
Literal, variable, direct address
of data type |
The Example: In the example the value of
|
|
|
Comparison: >= |
Literal, variable, direct address
of data type |
The Example: In the example the
value of
|
|
|
Comparison: = |
Literal, variable, direct address
of data type |
The Example: In the example the value of
|
|
|
Comparison: <> |
Literal, variable, direct address
of data type |
The Example: In the example the value of
|
|
|
Comparison: <= |
Literal, variable, direct address
of data type |
The Example: In the example the
value of
|
|
|
Comparison: < |
Literal, variable, direct address
of data type |
The Example: In the example the value
of
|
Call Operators
IL programming language call operators:
Operator |
Modifier |
Meaning |
Operands |
Description |
---|---|---|---|---|
|
(only if the accumulator contents are of the |
Call of a function block, DFB or subprogram |
Instance name of the function block, DFB or subprogram |
A function block, DFB or subprogram
is called up conditionally or unconditionally with see also Calling Elementary Function Blocks and Derived Function Blocks and Subroutine Call |
|
- |
Executing a function |
Literal, variable, direct address (data type is dependent on function) |
A function is performed by specifying the name of the function. see also Calling Elementary Functions |
|
- |
Executing a procedure |
Literal, variable, direct address (data type is dependent on procedure) |
A procedure is performed by specifying the name of the procedure. see also Calling Procedures |
Structuring Operators
IL programming language structuring operators:
Operator |
Modifier |
Meaning |
Operands |
Description |
---|---|---|---|---|
|
(only if the accumulator contents are of the |
Jump to label |
|
With see also Labels and Jumps |
|
(only if the accumulator contents are of the |
Return to the next highest program organization unit |
- |
|
|
- |
Processing deferred operations |
- |
A right bracket Example: In the example
|