Specifications
SIMATIC Instructions
9-40
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
HSC Interrupts
All counter modes support an interrupt on current value equal to the preset value.
Counter modes that use an external reset input support an interrupt on external
reset activated. All counter modes except modes 0, 1, and 2 support an interrupt
on a counting direction change. Each of these interrupt conditions may be enabled
or disabled separately. For a complete discussion on the use of interrupts, see
Section 9.16
.
Note
When you are using the external reset interrupt, do not attempt to load a new
current value or disable, then re-enable the high-speed counter from within the
interrupt routine attached to that event. A fatal error condition can result.
To help you understand the operation of high-speed counters, the following
descriptions of the initialization and operation sequences are provided. HSC1 is
used as the model counter throughout these sequence descriptions. The
initialization descriptions make the assumption that the S7-200 has just been
placed in the RUN mode, and for that reason, the first scan memory bit is true. If
this is not the case, remember that the HDEF instruction can be executed only one
time for each high-speed counter after entering RUN mode. Executing HDEF for a
high-speed counter a second time generates a run-time error and does not change
the counter setup from the way it was set up on the first execution of HDEF for that
counter.