L9_BCD: Binary to Binary Code
(Original Document)
Naming
Name in LL984 Editor
Function Block Name
name of legacy 984 instruction
name in other tools and editors like:
  • Type Library Browser
  • Data Editor
  • Animation Tables
  • Search Results
Function Description
The BCD procedure can be used to convert a binary value to a binary coded decimal (BCD) value or a BCD value to a binary value.
The type of conversion to be performed is controlled by the state of the input BCD2BIN.
BCD has two control inputs. ENABLE initiates the operation when it is ON.
The state of BCD2BIN indicates the type of conversion to be performed when ON, a BCD-to-binary format conversion is performed, and when OFF, a binary-to-BCD format conversion is performed.
BCD produces two possible outputs. The output from OUT echoes the state of ENABLE. The output ERR will pass power if an event has been detected in the conversion operation.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
ON = enable conversion
Bottom
BCD2BIN
BOOL
ON = BCD → binary conversion
OFF = binary → BCD conversion
Node
Node Type
Name
Data Type
Address Range
Meaning
Top
IN
SOURCE
UINT
%IW, %MW
source parameter where the numerical value to be converted is stored
Middle
IN/OUT
DEST
UINT
%MW
destination parameter where the converted numerical value is posted
Bottom
IN
CONST
UINT
1
constant value of 1, can not be changed
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
echoes the state of ENABLE
Bottom
ERR
BOOL
ON = event in the conversion operation