Programming chapter 3 – Rockwell Automation 1772-AF4,D17726.5.3 User Manual, AUX FUNCT PROM User Manual
Page 38

Programming
Chapter 3
3Ć30
Figure 3.23
AF4 Binary to BCD Conversion Function Format After Address Entry
17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0
S
Digit 1 (MSD)
(Always = 0)
Digit 3
Bit No.
Data Address
Digit 5
S
Result Address
Result
D
E
E = Enable Bit (1 = Function in Progress)
S = Sign Bit (1= Negative)
D = Done Bit (1 = Function Complete)
MSD = Most Significant Digit
LSD = Least Significant Digit
11497
Operand
Digit 4
Digit 6
(LSD)
Digit 2
(Always = 0)
12 Bit Binary Number
200
300
301
4.
Enter the operand.
You can enter the operand from the keyboard of your industrial terminal or
through ladder diagram functions. If we choose to set bits 0 through 13 in word
200, that is, insert the largest possible binary number in 12 bits, we obtain 4095
for the corresponding BCD number (Figure 3.24). The ones in bits 0 through
13 of word 200 indicate that each bit is set.
Figure 3.24
AF4 Binary to BCD Conversion Function Format After Execution
17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0
S
Bit No.
Data Address
S
Result Address
Result
D
E
E = Enable Bit (1 = Function in Progress)
S = Sign Bit (1= Negative)
D = Done Bit (1 = Function Complete)
11498
Operand
200
300
301
(0) (0) (1)
0
0
4
0
9
5
1 1 1 1 1 1 1 1 1 1 1 1