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
REAL
TO
WORD
IN
Output
Q
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
%I0002
%R0001
%R0003
RANGE
WORD
L1 Q
REAL
TO
WORD
IN Q
L2
IN
%Q1001
HI_LIM
LOW_LIM
%R0003
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
REAL
TRUN_
INT
IN
Output
Q
160
GFK-1503E
VersaMax PLC User Manual
For public disclosure
Summary of Contents for VersaMax PLC
Page 16: ...Notes 16 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 38: ...Notes 38 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 50: ...Notes 50 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 92: ...Notes 92 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 112: ...Notes 112 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 224: ...Notes 224 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 292: ...Notes 292 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 316: ...Notes 316 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Page 317: ......