DINT to SINT or INT
To convert a DINT value to a SINT or INT value, the controller truncates the upper portion of the DINT and sets the overflow status flag, if necessary. The following example shows the result of a DINT to SINT or INT conversion.
For example, the conversion of a DINT to an INT and a SINT:
This DINT value: | Converts to this smaller value: | |
16#0001_0081 (65,665) | INT | 16#0081 (129) |
SINT | 16#81 (-127) |
Provide Feedback