EasyManua.ls Logo

SEW-Eurodrive IPOS plus - Arithmetic Commands; Fundamental Operations ADD; SUB; MUL; DIV

SEW-Eurodrive IPOS plus
384 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
302
Manual – IPOSplus®
23
Arithmetic commands
Assembler – Commands
23.3 Arithmetic commands
23.3.1 Fundamental operations ADD / SUB / MUL / DIV
The four basic arithmetical functions are performed taking account of signs. They can
also be performed with variables H and constants K. The 1st argument is always a vari-
able H, the 2nd argument can either be a second variable H or a constant K.
ADD The ADD command adds a variable to a constant and a variable (observing the signs).
SUB/SUBTRACT The SUB command subtracts a variable or constant from a variable (observing the
signs).
Command structure
Mxxx ADD X1 + X2
Mxxx: Label (optional)
X1: Variable (summand and sum)
X2: Variable or constant (summand)
ADD HXX + HYY Variable HXX is the sum of variables HXX and HYY.
ADD HXX + K Variable HXX is the sum of variables HXX and a constant K.
Example 1 SET H01 = 100ADD H01 + H01
After the ADD command, H01 = 200.
Example 2 SET H01 = 100ADD H01 + 1
After the ADD command, H01 = 101.
Example 3 SET H01 = 2000000000SET
H02 = 2000000000ADD H01 +
H02
[0x77359400][0x77359400][0
xEE6B2800]
The number range has been exceeded.
After addition, H01 has the value -294967296.
Note If the number range is exceeded during addition, the result is incorrect.
There is no error message.
Command structure
Mxxx SUB X1 - X2
Mxxx: Label (optional)
X1: Variable (minuend and difference)
X2: Variable or constant (subtrahend)
SUB HXX - HYY Variable HXX is the result of the subtraction of variables HXX and HYY.
SUB HXX - K Variable HXX is the result of the subtraction of variables HXX and a con-
stant K.
Example 1 SET H01 = -10SET H02 = +50SUB H01 - H02
After the SUB command, H01 = -60.
Example 2 SET H01 = +50SET H02 = -
2147483600SUB H01 - H02
[0x00000032][0x80000030][0
x80000002]
The number range has been exceeded. After subtraction, H01 has the
value -2147483646.
Note If the number range is exceeded during subtraction, the result is incorrect.
There is no error message.
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n

Table of Contents