10.4.5 Data Type Conversion Functions Convert Real
Data to Word Data
The Convert to Word function outputs the Word equivalent of Real data. The original data
is not changed by this function.
When the function receives power flow, it performs the conversion, making the result
available via output Q. The function passes power flow when power is received, unless
the specified conversion would result in a value that is outside the range 0 to FFFFh.
Value to be converted
OK Enable
10.4.5.1 Parameters of the Convert to Word Function
Input/ Output
Choices
Description
enable flow
When the function is enabled, the conversion is
performed.
IN
R, AI, AQ, constant
IN contains a reference for the value to be
converted to Word type.
ok
flow, none
OK is energized when the function is performed
without error.
Q
I, Q, M, T, G, R, AI, AQ
Contains the word form of the original value in IN.
10.4.5.2 Example
10.4.6 Data Type Conversion Functions Truncate
Real Number
The Truncate function copies a Real number and rounds the copied number down to an
integer or double precision integer. The original data is not changed by this function.
When the function receives power flow, it performs the conversion, making the result
available via output Q. The function passes power flow when power is received, unless
the specified conversion would result in a value that is out of range or unless IN is not a
number.
Value to be converted
OK Enable
160 GFK-1503E VersaMax PLC User Manual
For public disclosure