Using High-Speed Counter Instructions
12–29
High-Speed Counter Instructions in the Paper Drilling
Machine Application Example
The ladder rungs in this section demonstrate the use of the HSC instruction in the
paper drilling machine application example started in chapter 6. Refer to
appendix E for the complete paper drilling machine application example.
20226
Drill Home
I/5
Drill Depth
I/4
Drill On/Off O/1
Drill Retract O/2
Drill Forward O/3
Photo-Eye Reset I/2
Counter Hold I/3
Photo-Eye
Reflector
Conveyor Enable wired in series to the Drive O/5
Conveyor Drive Start/Stop wired in series to the Drive O/0
Quadrature A-B Encoder and Drive
I/0 I/1
Drilled
Holes
The main program file (file 2) initializes the HSC instruction, monitors the machine
start and stop buttons, and calls other subroutines necessary to run the machine.
Refer to the comments preceding each rung for additional information.
Rung 2:0
Initializes the high-speed counter each time the REM Run 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 REM run 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.)
| 1’st Output Mask |
| Pass (only use bit 0 |
| ie. O:0/0) |
| S:1 +MOV–––––––––––––––+ |
|––––] [–––––––––––––––––––––––––––––––––––––+–+MOVE +–+–|
| 15 | |Source 1| | |
| | | | | |
| | |Dest N7:5| | |
| | | 0| | |
| | +––––––––––––––––––+ | |
Programming
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive