|IN||VD, ID, QD, MD, SD, SMD, LD, AC, Constant, *VD, *AC, *LD||REAL|
|OUT||VD, ID, QD, MD, SD, SMD, LD, AC, *VD, *AC, *LD||DINT|
|Memory Ranges||ENO||Errors||Instruction Support for S7-200 CPUs||SIMATIC/International Mnemonics|
|The Truncate instruction converts a 32-bit real number (IN) into a 32-bit signed integer and places the result into the variable specified by OUT. Only the whole number portion of the real number is converted, and the fraction is discarded.
If the value that you are converting is not a valid real number or is too large to be represented in the output, then the overflow bit is set and the output is not affected.
Error Conditions that Set ENO = 0:
0006 (indirect address), SM1.1 (overflow), SM4.3 (run-time)
This instruction affects the following Special Memory bits: