Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 455

Advertising
background image

Appendix E
Application Example Programs

E–12

Rung 7:3
Converts the BCD thumbwheel value from BCD to integer. This is done
because the controller operates upon integer values. This rung also
”debounces” the thumbwheel to ensure that the conversion only occurs on
valid BCD values. Note that invalid BCD values can occur while the
operator is changing the BCD thumbwheel. This is due to input filter
propagation delay differences between the 4 input circuits that provide
the BCD input value.

| 1’st previous debounced |
| pass scan’s BCD value |
| bit BCD input |
| value |
| S:1 +EQU–––––––––––––––+ +FRD–––––––––––––––+ |
|–+––]/[–––––––+EQUAL +–+–––––––+FROM BCD +–+––+–|
| | 15 |Source A N7:13| | |Source N7:14| | | |
| | | 0| | | 0000| | | |
| | |Source B N7:14| | |Dest N7:12| | | |
| | | 0| | | 0| | | |
| | +––––––––––––––––––+ | +––––––––––––––––––+ | | |
| | | Math Math | | |
| | | Overflow Error | | |
| | | Bit Bit | | |
| | | S:0 S:5 | | |
| | +––––] [–––––––––(U)–––––––––+ | |
| | 1 0 | |
| | this | |
| | scan’s | |
| | BCD input | |
| | value | |
| | +MOV–––––––––––––––+ | |
| +––––––––––––––––––––––––––––––––––––––––––––+MOVE +–+ |
| |Source N7:14| |
| | 0| |
| |Dest N7:13| |
| | 0| |
| +––––––––––––––––––+ |

Rung 7:4
Ensures that the operator cannot select a paper thickness of 0. If this
were allowed, the drill bit life calculation could be defeated resulting
in poor quality holes due to a dull drill bit. Therefore the minimum
paper thickness used to calculate drill bit wear is 1/4 in.

| debounced debounced |
| BCD BCD |
| value value |
| +EQU–––––––––––––––+ +MOV–––––––––––––––+ |
|–+EQUAL +–––––––––––––––––––––––––––+MOVE +–|
| |Source A N7:12| |Source 1| |
| | 0| | | |
| |Source B 0| |Dest N7:12| |
| | | | 0| |
| +––––––––––––––––––+ +––––––––––––––––––+ |

Rung 7:5
Keeps a running total of how many inches of paper have been drilled with
the current drill bit. Every time a hole is drilled, adds the thickness
(in 1/4 ins) to the running total (kept in 1/4 ins). The OSR is necessary
because the ADD executes every time the rung is true, and the drill body
would actuate the DRILL DEPTH limit switch for more than 1 program scan.
Integer N7:12 is the integer-converted value of the BCD thumbwheel on
inputs I:0/11 – I:0/14.

| Drill |Drill Wear 1/4 in. |
| Depth LS | OSR 1 increments |
| |
| I:0 B3 +ADD–––––––––––––––+ |
|––––] [–––––––[OSR]–––––––––––––––––––––––––––––+ADD +–|
| 4 24 |Source A N7:12| |
| | 0| |
| |Source B N7:10| |
| | 0| |
| |Dest N7:10| |
| | 0| |
| +––––––––––––––––––+ |

Advertising