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

Page 467

Advertising
background image

Appendix E
Application Example Programs

E–24

File 7, Rung 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.

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
20 |–] [– LD
Drill Depth LS
I/4 0

29 –OSR– AND–OSR
Tool Wear OSR 1
B/24 0

80 ADD SRCA N12 0000H
1/4 in. increments
SRCB N10 0000H
1/4 in. increments
DEST N10 0000H

File 7, Rung 6

When the number of 1/4 in. increments surpasses 1000, finds out now many
increments are past 1000 and stores in N7:20. Adds 1 to the total of
’1000 1/4 in.’ increments, and re-initializes the 1/4 in. increments
accumulator to how many increments were beyond 1000.

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
65 |–GEQ– LD–GEQ
1/4 in. increments
SRCA N10 0000H
SRCB 1000

81 SUB
1/4 in. increments
SRCA N10 0000H
SRCB 1000
DEST N20 0000H

80 ADD SRCA 1
1/4 in. Thousands
SRCB N11 0000H
1/4 in. Thousands
DEST N11 0000H

106 MOV SRC N20 0000H
1/4 in. increments
DEST N10 0000H

Advertising