Installation manual

Publication 1747-RM001G-EN-P - November 2008
4-24 Math Instructions
Absolute (ABS)
Use the ABS instruction to calculate the absolute value of the Source and place
the result in the Destination. This instruction supports integer and floating
point values. Use this instruction with SLC 5/03 (OS302), SLC 5/04 (OS401),
and SLC 5/05 processors.
Entering Parameters
Enter the following parameters when programming this instruction.
Source can be a word address, an integer constant, floating point data
element, or a floating point constant
Destination can only be a word address or a floating point data element
Updates to Arithmetic Status Bits
The arithmetic status bits are found in Word 0, bits 0 to 3 in the status file.
After an instruction is executed, the arithmetic status bits in the status file are
updated
ABS
Absolute Value
Source N7:34
0<
Dest N7:35
0<
ABS
Output Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••
Table 4.15 Processor Function
With this Bit The Processor
S:0/0 Carry (C) always resets.
S:0/1 Overflow (V) always resets with a floating point value; sets if the input is
-32,768 (integer value).
S:0/2 Zero (Z) sets when destination value is zero; otherwise resets.
S:0/3 Sign (S) always resets.