Entry type: FAQ, Entry ID: 35934628, Entry date: 05/08/2009
(0)
Rate

How do you reset the high-speed counters of the S7-200?

  • Entry
  • Associated product(s)

Description:
Table 01 shows which high-speed counters in which counter mode you can reset via the input concerned.
 

High-speed counters Counter mode
1 2 4 5 7 8 10 11
HSC0 E0.2
HSC1 E1.0
HSC2 E1.4
HSC4 E0.5
Table 01

In addition to the external reset option, you can also reset the high-speed counters internally triggered via the special flags listed in Table 02.
 

High-speed counters New current value Write new current value to HSC
HSC0 SMD38 SM37.6
HSC1 SMD48 SM47.6
HSC2 SMD58 SM57.6
HSC3 SMD138 SM137.6
HSC4 SMD148 SM147.6
HSC5 SMD158 SM157.6
Table 02

For this, you download the value 0 into the special flag word "New current value", write the "New current value" to the high-speed counter via the relevant special flag and activate the high-speed counter (HSC0).
Fig. 01 shows the function code in STEP 7 Micro/WIN for resetting the high-speed counter HSC0.


Fig. 01

In this example, resetting is triggered by the variable bit 0.0 that is reset again immediately after action and is thus available only for one cycle.

Note:
By loading the "New current value" you can also set the high-speed counters to any other values.

Note:
More information on the high-speed counters is available in the S7-200 system manual (Entry ID: 1109582).

Keywords:
Setting high-speed counters