%I0002
%I0017
%Q0033
%Q1432
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
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.
Instruction Set Reference GFK-1503E User Manual 157
For public disclosure