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

Page 448

Advertising
background image

Appendix E
Application Example Programs

E–5

Rung 2: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).

| High Speed Counter |
| +HSC––––––––––––––––––––+ |
|––––––––––––––––––––––––––––––––––––––+HIGH SPEED COUNTER +–(CU)–|
| |Type Encoder (Res,Hld)+–(CD) |
| |Counter C5:0+–(DN) |
| |High Preset 1250| |
| |Accum 1| |
| +–––––––––––––––––––––––+ |

Rung 2:2
Forces a high-speed counter low preset interrupt to occur each RRUN mode
entry. An interrupt can only occur on the transition of the high-speed
counter accum to a preset value (accum reset to 1, then 0). This is done
to allow the high-speed counter interrupt subroutine sequencers to
initialize. The order of high-speed counter initialization is: (1)load
high-speed counter parameters (2)execute HSL instruction (3)execute true
HSC instruction (4)(optional) force high-speed counter interrupt to
occur.

| 1’st High Speed Counter |
| Pass |
| S:1 +RAC––––––––––––––––––+ |
|––––] [––––––––––––––––––––––––––––––––––+–+RESET TO ACCUM VALUE +–+–|
| 15 | |Counter C5:0| | |
| | |Source 1| | |
| | | | | |
| | +–––––––––––––––––––––+ | |
| | High Speed | |
| | Counter | |
| | C5:0 | |
| +–––(RES)–––––––––––––––––+ |

Rung 2:3
Starts the conveyor in motion when the start button is pressed. However,
another condition must also be met before we start the conveyor: the
drill bit must be in its fully retracted position (home). This rung also
stops the conveyor when the stop button is pressed.

| START |Drill STOP |change | Machine |
| Button |Home LS Button |drill bit | RUN |
| |NOW | Latch |
| I:0 I:0 I:0 O:0 B3 |
|–+––––] [––––––––][–––––+––––]/[––––––––]/[––––––––––––––––––( )–––––|
| | 6 5 | 7 6

0 |

| | Machine | |
| | RUN | |
| | Latch | |
| | B3 | |
| +––––] [––––––––––––––––+ |
| 0 |

Rung 2:4
Applies the above start logic to the conveyor and drill motor.

| Machine Drill |Conveyor |
| RUN Home LS |Enable |
| Latch |
| B3 I:0 O:0 |
|––––] [––––––––––––––––––––––––––––––––––––+––––] [––––––––( )–––––+–|
| 0 | 5 5 | |
| | Drill | |
| | Motor ON | |
| | O:0 | |
| +–––––––––––––––( )–––––+ |
| 1 |

➀ This instruction accesses I/O only available with 32 I/O controllers. Therefore, do not include this

instruction if you are using a 16 I/O controller.

Advertising