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

Page 181

Advertising
background image

Chapter 10
Using Math Instructions

10–15

To demonstrate the use of math instructions, this section provides ladder
rungs followed by the optimized instruction list for these rungs. The rungs
are part of the paper drilling machine application example described in
appendix D. You will be adding to the subroutine in file 7 that was started in
chapter 9.

Ladder Rungs

Rung 7:1
Resets the number of 1/4 in. increments and the 1/4 in. thousands when the
”drill change reset” keyswitch is energized. This should occur following
each drill bit change.

| drill change 1/4 in. |
| reset keyswitch Thousands |
| I:0 +CLR–––––––––––––––+ |
|––––] [–––––––––––––––––––––––––––––––––––––+–+CLEAR +–+–|
| 8 | |Dest N7:11| | |
| | | 0| | |
| | +––––––––––––––––––+ | |
| | 1/4 in. | |
| | increments | |
| | | |
| | +CLR–––––––––––––––+ | |
| +–+CLEAR +–+ |
| |Dest N7:10| |
| | 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, the thickness (in
1/4 ins) is added 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| |
| +––––––––––––––––––+ |

Rungs 7:2 through 7:4 are added at the end of Chapter 11.

Math Instructions in the Paper
Drilling Machine Application
Example

Advertising