Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 557
Chapter
16
Math Conversion Instructions
(DEG, RAD, TOD, FRD, TRN, TRUNC)
The math conversion instructions convert values.
You can mix data types, but loss of accuracy and rounding error might occur and
the instruction takes more time to execute. Check the S:V bit to see whether the
result was truncated.
For relay ladder instructions, bold data types indicate optimal data types. An
instruction executes faster and requires less memory if all the operands of the
instruction use the same optimal data type, typically DINT or REAL.
Topic Page
Degrees (DEG) 558
Radians (RAD) 561
Convert to BCD (TOD) 564
Convert to Integer (FRD) 567
Truncate (TRN) 570
If you want to Use this instruction Available in these languages Page
Convert radians to degrees DEG Relay ladder
Structured text
Function block
558
Convert degrees to radians RAD Relay ladder
Structured text
Function block
561
Convert an integer value to a BCD value TOD Relay ladder
Function block
564
Convert a BCD value to an integer value FRD Relay ladder
Function block
567
Remove the fractional part of a value TRN
TRUNC
(1)
Relay ladder
Structured text
Function block
570
(1) Structured text only.