Example 6 - retentive counters, Example 6 - retentive counters -23 – Rockwell Automation 1746-HSCE2 Multi-Channel High Speed Counter Module User Manual

Page 115

Advertising
background image

Publication 1746-UM002B-EN-P - August 2004

Application Examples 6-23

Example 6 - Retentive
Counters

The 1746-HSCE2 configuration and count values are not retentive. If
power is cycled to the chassis, the module must be re-initialized and
the count value re-entered (preset) if desired. To simulate a retentive
counter, the 1746-HSCE2 count values can be read by the processor
and “stored” in the Min/max Count Value Block preset value. When
the ladder logic re-initialized the module after power-up, the last read
count values can be loaded using the Min/max Count Value Block
preset value and auto-preset bit. The following example shows how
to “store” the count values and use the auto-preset bit to load the
preset during 1746-HSCE2 initialization.

1. The following procedure uses the Example 2 program (SLC 5/03

or higher processor in Class 4, mode 1). The ladder logic stores
and reloads the Counter 1 count value.

2. The Counter 1 min/max count value block auto-preset bit

(N10:20/10) was set to automatically download the preset value
during 1746-HSCE2 initialization.

3. Rung 0002 was added to ladder file 8 to copy the Counter 1

count value to the preset value during each program scan.

IMPORTANT

The ladder logic will simulate a retentive counter
best if the counter is either static or changing slowly
during power down. If the Counter 1 count value is
changing rapidly, the module’s internal count value
and the count value in the processor’s input image
could differ due to the time delays in the system
(including 1.5 ms in the module and processor scan
time).

Advertising