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

Page 276

Advertising
background image

Chapter 14
Using High-Speed Counter Instructions

14–26

Example 3

To enter the RRUN mode and have the HSC ACC and Interrupt Subroutine
resume their previous state, while externally initializing the HSC outputs,
apply the following:

Ladder Rungs

Rung 2:0
Unlatch or latch the output bits under HSC control during the first scan
after the HSC instruction is executed for the first time. (Note, you

could

place this rung before the HSC instruction; however, this is not
recommended.)

| S:1 +HSL–––––––––––––––+ |
|––][–––––––––––––––––––––––––––––––––––––––––––––––+HSC LOAD +–|
| 15 |Counter C5:0| |
| |Source N7:0| |
| |Length 5| |
| +––––––––––––––––––+ |

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

Rung 2:2
This rung is programmed with the knowledge of an HSL mask of 0007 (Outputs
0–2 are used) and initializes the HSC outputs each RRUN mode entry.
Outputs O/0 and O/1 are off, while Output O/2 is on.

| S:1 O:0 |
|––][––––––––––––––––––––––––––––––––––––––––––––––––––––––––+––(U)––+|––|
| 15 | 0 | |
| | O:0 | |
| +––(U)–––+ |
| | 1 | |
| | O:0 | |
| +––(L)–––+ |
| 2 |

Advertising