High−level Instructions
3 − 198
Outline Takes absolute value of signed 16-bit data.
For the FP0R/FPΣ/FP−X/FP0/FP−e, the P type high−level instruction
“P87 (PABS)” is not available.
Program example
modifier
D N/A A A A A A A A A A A N/A N/A A
(*1) This cannot be used with the FP0 and FP−e.
(*2) This cannot be used with the FP0, FP−e, FP0R, FPΣ, FP−X.
(*3) With the FP0R, FPΣ,FP−X, FP2, FP2SH, and FP10SH, this is I0 to IC.
(*4) With the FP0R, FPΣ,FP−X, FP2, FP2SH, and FP10SH, this is ID.
Explanation of example
Takes absolute value of data register DT0 when trigger R20 turns on.
For instance, regardless of whether the value of DT0 is K1 or K−1, it will be K1 when the instruction is
executed.
Description
Takes absolute value of signed 16-bit data specified by D. The absolute value of the signed 16-bit data is
stored in D.
This is effective for processing data in which the polarity (+ or −) changes.
Flag conditions
・Error flag (R9007): Turns on and stays on when:
・Error flag (R9008): Turns on for an instant when:
− The area specified using the index modifier exceeds the limit.
− The 16-bit data is the negative minimum value “K-32768 (H8000).”
・Carry flag (R9009): Turns on for an instant when 16-bit data is the negative value “range: K-1 to
K-32767 (HFFFF to H8001).”
F87
P87
(PABS)
(ABS)
16-bit data absolute value
A: Available
N/A: Not Available