Convert from bcd (frd), Programming, Updates to arithmetic status bits – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual
Page 153

Using Data Handling Instructions
9–5
Convert from BCD (FRD)
Use this instruction to convert BCD values to integer values.
The source parameter can be a word address in a data file, or it can be the math
register, S:13. The destination must be a word address.
Updates to Arithmetic Status Bits
With this Bit:
The Controller:
S:0/0
Carry (C)
always resets.
S:0/1
Overflow (V)
sets if non-BCD value is contained at the source or the value
to be converted is greater than 32,767; otherwise reset. On
overflow, the minor error flag is also set.
S:0/2
Zero (Z)
sets if destination value is zero.
S:0/3
Sign (S)
always resets.
Note
Always provide ladder logic filtering of all BCD input devices prior to performing
the FRD instruction. The slightest difference in point-to-point input filter delay can
cause the FRD instruction to overflow due to the conversion of a non-BCD digit.
]/[
S:1
15
EQU
EQUAL
Source A
N7:1
0
Source B
I:0.0
0
MOV
MOVE
Source
I:0.0
0
Dest
N7:1
0
FRD
FROM BCD
Source
I:0.0
0000
Dest
N7:2
0
The two rungs shown cause the controller to verify that the value I:0 remains the
same for two consecutive scans before it will execute the FRD. This prevents the
FRD from converting a non-BCD value during an input value change.
Programming
Execution Times
(
µ
sec) when:
True
False
56.88
5.52
FRD
FROM BCD
Source
Dest