NORD Drivesystems BU0550 User Manual
Page 27
3 AWL (Instruction List, IL)
BU 0550 GB-0813
27
3.2.2.7
MUX
Various constants or variables can be selected by means of an index which is located in front of the
command in the accumulator. The first value is accessed via Index 0. The selected value is loaded into the
accumulator. The number of values is only limited by the program memory.
BOOL
BYTE
INT
DINT
Possible data types
X
X
X
Commands
Explanation
LD 1
Select the required element
MUX 10,20,30,40,Value1
MUX command with 4 constants and one variable
ST Value2
Save the value 20 in Value2
Table 17 MUX
3.2.2.8
MOD and MOD(
The accumulator is divided by one or more variables or constants. The remainder from the division stands in
the accumulator as the result.
For bracket Modulus, the accumulator is divided by the result of the expression in the brackets and the
modulus is formed from this. Up to 6 bracket levels are possible.
BOOL
BYTE
INT
DINT
Possible data types
X
X
X
Commands
Explanation
LD 25
Load the dividends
MOD 20
Division 25/20
Modulus = 5
ST Var1
Save the result 5 in Var1
LD 25
Load the dividends
MOD( Var1
Result = 25/(Var1 + 10)
Modulus in the accumulator
ADD 10
)
ST Var3
Save the result 10 in Var3
Table 18 MOD and MOD(