See the ladder logic from example 2 on page 6-9 – Rockwell Automation 1746-HSCE2 Multi-Channel High Speed Counter Module User Manual

Page 112

Advertising
background image

Publication 1746-UM002B-EN-P - August 2004

6-20 Application Examples

Ladder File 8 Continued

Ladder File 9 - HSCE2 Initialization Routine

See the ladder logic from Example 2 on page 6-9.

0003

B3:0

4

PRESET_CHANGE_LATCH

0004

END

0002

B3:0

0

HSCE2_INIT_DONE

B3:0

2

SOFT_PRESET_TRGR

B3:0

OSR

3

PRESET_CHANGE_LATCH

PRESET_CHANGE_LATCH

L

B3:0

4

L

B3:0

5

PRESET_ENABLE

JSR

Jump To Subroutine
SBR File Number

U:14

This rung triggers a dynamic change of the Counter 1 preset. The preset trigger bit (B3/2) sets the preset change latch bit (B3/4). The
preset change latch bit (B3/4) remains latched until the Counter Control Block is restored to the 1746-HSCE2 output image. Use B3/4 to
ensure that other logic (soft presets) do not write to the output image until the Counter Control Block is restored. The preset enable bit
(B3/5) allows the first handshake rung (ladder file 14, rung 0000) to run just once.

Jump to the preset change subroutine (ladder file 14) until the preset change handshaking is
complete (B3/4 is reset).

Advertising