FE MONITOUCH V8 SERIES Reference: Additional Functions page 372

Table of Contents

Advertisement

Mathematics/trigonometric
F0 = ABS (F1) (W) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WORD
F0 = ABS (F1) (D) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DWORD
F0 = ABS (F1) (F) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FLOAT
Function: Absolute value
This macro command is used to store an absolute value of [F1] in [F0].
WORD
F1
Available memory
Internal Memory
F0
F1
Range
WORD
F0
-32767 to +32767
(Decimal system
F1
with signs)
Example
• $u100 = ABS ($u200) (W)
When $u200 = "-1", on command execution "1" is stored in $u100.
$u200
$u100
Supplementary information
• $s1056 stores the result of macro execution.
When the execution of the macro is normally complete, the value at the address is not updated.
Therefore, before macro execution, resetting the value at the address to zero is recommended.
Code (DEC)
1
2
* An indefinite value is stored in [F0].
DWORD
FLOAT
F0
F1+1
+
PLC1 - PLC8
Memory
: Setting enabled (indirect designation disabled)
: Setting enabled (indirect designation enabled)
DWORD
-2147483647 to +2147483647
(Decimal system with signs)
1
1
1
1
1
1
1
1
1
1
F
F
F
-1
ABS
0
0
0
0
0
0
0
0
0
0
0
0
0
1
Contents
Overflow*
Underflow*
F1
F0+1
+
Memory Card
Constant
FLOAT
IEEE 32-bit single precision
real number
1
1
1 1
1 1 BIN
F
HEX
DEC
0
0
0 0
0 1 BIN
HEX
1
DEC
23
Macro
23
F0
23-3

Advertisement

Table of Contents
loading

Table of Contents