Data Type Conversion Functions Convert To Signed Integer - GE VersaMax PLC User Manual

Table of Contents

Advertisement

%I0002
%I0017
Input/
Output
enable
IN
ok
Q
Instruction Set Reference
For public disclosure
_
IN Q
%Q0033
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.
Enable
Value to be converted
10.4.2.1 Parameters of the Convert to Signed Integer Function
Choices
flow
For BCD-4: I, Q, M, T, G,
R, AI, AQ,
constant
For REAL: R, AI, AQ
flow, none
I, Q, M, T, G, R, AI, AQ
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
_
_
IN Q
%R0001
PARTS
OK
_
_
Output
IN
Q
Description
When the function is enabled, the conversion is
performed.
IN contains a reference for the BCD-4, REAL, or
Constant value to be converted to integer.
The OK output is energized whenever enable is
energized, unless the data is out of range or NaN
(Not a Number).
Output Q contains the integer form of the original
value in IN.
IN1 Q
TOTAL
%R0001
IN2
RUNNING
%Q1432
GFK-1503E User Manual 157

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents