Example 2, Instruction list – Rockwell Automation 1761-HHP-B30 MicroLogix 1000 with Hand-Held Programmer (HHP) User Manual

Page 275

Advertising
background image

Chapter 14
Using High-Speed Counter Instructions

14–25

Example 2

To enter the RRUN mode and retain the HSC ACC value while having the
HSC Outputs and Interrupt Subroutine reassert themselves, apply the
following:

Ladder Rungs

Rung 2:0
Unlatch the C5:0/HP and C5:0/LP bits during the first scan BEFORE the HSC
instruction is executed for the first time.

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

|

Rung 2:1
| S:1 C5:0 |
|––][––––––––––––––––––––––––––––––––––––––––––––––––––––––––+–(U)––+|––|
| 15 | HP | |
| | C5:0 | |
| +––(U)––+ |
| LP |

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

Instruction List

File 2, Rung 0

Unlatch the C5:0/HP and C5:0/LP bits during the first scan BEFORE the HSC
instruction is executed for the first time.

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
20 |–] [– LD S1/15 0

171 HSL CNTR C0
SRC N0
LEN 5

File 2, Rung 1

FUN GRAPHIC PARAMETER
CODE SYMBOL MNEMONIC NAME ADDRESS VALUE FORCES
–––– ––––––– –––––––– –––– ––––––– ––––– ––––––
20 |–] [– LD S1/15 0

42 –(U)– RST C0/HP 0

42 –(U)– RST C0/LP 0

File 2, Rung 2

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

Advertising