6F3B0250
7. Instructions
FUN 180
ABS
Absolute value
Expression
Input
Function
When the input is ON, this instruction finds the absolute value of operand A, and stores it in B.
Execution condition
Input |
| Operation | Output |
OFF | No execution |
| OFF |
ON | Execution |
| ON |
Operand
| Name |
|
| Device |
|
|
|
|
|
| Register |
|
|
|
| Constant | Index | ||
|
| X | Y | R | S | T. | C. | XW | YW | RW | SW | T | C | D | I | J | K |
|
|
A | Source |
|
|
|
|
|
| Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö |
|
B | Destination |
|
|
|
|
|
|
| Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö | Ö |
|
|
Example
When X006 is ON, the absolute value of RW38 is stored in D0121.
For example, if RW38 is
D0121
32767
12000
0 | 32767 | RW38 |
Note
·The data range of A is
Basic Hardware and Function 249
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net