%I0002
%I0017
%Q0033
%Q1432
INT
_
TO
BCD4
IN Q
10.4.2
Data Type Conversion Functions Convert to
Signed Integer
The Convert to Signed Integer function outputs the integer equivalent of BCD-4 or 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 always passes power flow when power is received,
unless the data is out of range.
Value to be converted
OK
Enable
BCD4
_
TO
_
INT
IN
Output
Q
10.4.2.1
Parameters of the Convert to Signed Integer Function
Input/
Output
Choices
Description
enable
flow
When the function is enabled, the conversion is
performed.
IN
For BCD-4: I, Q, M, T, G,
R, AI, AQ,
constant
For REAL: R, AI, AQ
IN contains a reference for the BCD-4, REAL, or
Constant value to be converted to integer.
ok
flow, none
The OK output is energized whenever enable is
energized, unless the data is out of range or NaN
(Not a Number).
Q
I, Q, M, T, G, R, AI, AQ
Output Q contains the integer form of the original
value in IN.
10.4.2.2
Example
In the example, whenever input %I0002 is set, the BCD-4 value in PARTS is converted to
a signed integer and passed to the Addition function, where it is added to the signed
integer value represented by the reference RUNNING. The sum is output by the Addition
function to the reference TOTAL.
%I0002
PARTS
%R0001
BCD4
_
TO
_
INT
IN Q
%R0001
TOTAL
ADD_
INT
IN1 Q
RUNNING
IN2
Instruction Set Reference
GFK-1503E User Manual 157
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: ......