6. Function blocks
6.1 Manufacturer function blocks
6.1.7.9 NC - Numerical converter
General
easyE4base devices provide 32 numerical conversion function
blocks NC01...NC32.
A decimal number can be represented either as being binary-
coded or BCD-coded. Depending on the operating mode you
select, this function block will convert BCD-coded numbers to
binary-coded numbers (BCD mode) or vice verse, i.e., binary-
coded numbers to BCD-coded numbers (BIN mode).
Operating principle
EN=1 enables the function block so that the number conversion will be carried out
every cycle. The following applies when using LD, FBD, ST: As soon as there is a
changed value at I1, the new conversion value will appear at output QV. When using
EDP, the converted value will be provided until the next cycle.
The maximum data size that can be connected to the inputs/outputs is a double word
(32 bits). A BCD-coded number requires four bits (a nibble). This means that the biggest
BCD-coded numbers that can be converted are 7-digit BCD-coded numbers, since the
most significant nibble is used for the sign.
0000 means +
1111 means –
EN=0 initiates a reset in which the output QV is reset to 0.
The function block and its parameters
Function block inputs
Description Note
(Bit)
EN 1: Activates the function block.
(DWord)
I1 Operand to be converted Integer value range,
decimal not all the way due to BCD lim-
itation
BCD: -9 999 999 … +9 999 999
Decimal: -161 061 273 … +161 061 273
Assigning operands
You can assign the following operands to the function block inputs that are numeric
inputs.
easyE4 11/18 MN050009 EN www.eaton.com
397