6F3B0250
Basic Hardware and Function 249
7. Instructions

FUN 180 ABS Absolute value

Expression
Input -[
A
ABS
B
]- Output
Function
When the input is ON, this instr uction finds the absolut e value of operand
A
, and stores it in
B
.
Execution condition
Input Operation Output
OFF No execution OFF
ON Execution ON
Operand
Name Device Re
g
ister Constant Index
X Y R S T. C. XW YW RW SW T C D I J K
A
Source ÖÖÖÖÖÖÖÖÖÖ Ö
B
Destination ÖÖÖÖÖÖÖÖÖ
Example
When X 006 is O N, t he absolute value of RW38 is st or ed in D0121.
For example, if RW38 is -12000, the absolut e value 12000 is stor ed in D0121.
Note
· The data r ange of
A
is -32768 to 32767. I f the data of
A
is -32768, 32767 is stor ed in
B
.
32767
12000
0 32767-12000-32767
D0121
RW38
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net