Paper drilling machine instruction list program – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 457

Advertising
background image

Appendix E
Application Example Programs

E–14

Paper Drilling Machine Instruction List Program

File 2, Rung 0

Initializes the high-speed counter each time the RRUN mode is entered.
The high-speed counter data area (N7:5 – N7:9) corresponds with the
starting address (source address) of the HSL instruction. The HSC
instruction is disabled each entry into the RRUN mode until the first time
that it is executed as true. (The high preset was ”pegged” on
initialization to prevent a high preset interrupt from occurring during
the initialization process.)

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
20 |–] [– LD 1’st Pass

S1/15 0

106 MOV SRC 1
Output Mask (only use bit 0 ie. O:0/0)
DEST N5 0000H

106 MOV SRC 0
High Output Pattern (turn off O:0/0)
DEST N6 0000H

106 MOV SRC 32767
High Preset Value (counts to next hole)
DEST N7 0000H

106 MOV SRC 1
Low output pattern (turn on O:0/0 each reset)
DEST N8 0000H

106 MOV SRC 0
Low preset value (cause low preset intat reset)
DEST N9 0000H

171 HSL
High Speed Counter
CNTR C0
Output Mask (only use bit 0 ie. O:0/0)
SRC N5
LEN 5

File 2, Rung 1

This HSC instruction is not placed in the high-speed counter interrupt
subroutine. If this instruction were placed in the interrupt subroutine,
the high-speed counter could never be started or initialized (because an
interrupt must first occur in order to scan the high-speed counter
interrupt subroutine).

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
170 HSC TYPE Encoder (Res,Hld)
High Speed Counter
CNTR C0
PRE 1250
ACC 0000H

Advertising