The INT_TO_WORD type conversion function converts an input value of the INT data type into a WORD output value.
|
Parameter |
Data type |
Description |
|---|---|---|
|
IN |
INT |
Input value |
|
OUT |
WORD |
Output value |
The WORD_TO_INT type conversion function converts an input value of the WORD data type into an INT output value.
This function performs a signed conversion because the most significant bit (msb) of the input WORD is interpreted as sign bit and transferred to the most significant bit (msb) of the INT output which is also considered as sign bit.
This way, the input value
16#7FFF (32767) results in 32767 (16#7FFF)
16#8000 (32768) results in -32768 (16#8000)
16#FFFF (65535) results in -1 (16#FFFF)
|
Parameter |
Data type |
Description |
|---|---|---|
|
IN |
WORD |
Input value |
|
OUT |
INT |
Output value |