hit counter script

Siemens SIMATIC S7 System Manual page 273

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

HSC Control bytes
HSC0
SM37.3
SM37.4
SM37.5
SM37.6
SM37.7
Read the HSC current value with your program
You can only read the current value of each high-speed counter using the data type HC
(High-Speed-Counter Current) followed by the counter identifier number (0, 1, 2, 3, 4, or 5)
as shown in the following table. Use the HC data type whenever you wish to read the current
count, either in a status chart or in the user program. The HC data type is read-only double
word value; you cannot write a new current count to the high-speed counter using the HC
data type.
Current values of HSC0, HSC1, HSC2, HSC3, HSC4, and HSC5
Value to be read
CV (counter current value) HC0
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
HSC1
HSC2
HSC3
SM47.3
SM57.3
SM137.3 SM147.3 SM157.3 Counting direction control bit:
SM47.4
SM57.4
SM137.4 SM147.4 SM157.4 Write the counting direction to the
SM47.5
SM57.5
SM137.5 SM147.5 SM157.5 Write the new preset value to the
SM47.6
SM57.6
SM137.6 SM147.6 SM157.6 Write the new current value to the
SM47.7
SM57.7
SM137.7 SM147.7 SM157.7 Enable the HSC:
HSC0
address
HSC4
HSC5
Description
HSC:
HSC:
HSC:
HSC1
HSC2
HSC3
address
address
address
HC1
HC2
HC3
Program instructions
7.6 Counters
0 = Count down
1 =Count up
0 = No update
1 =Update direction
0 = No update
1 = Update preset
0 = No update
1 =Update current value
0 = Disable the HSC
1 =Enable the HSC
HSC4
HSC5
address
address
HC4
HC5
273

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents

Save PDF