EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #235 background imageLoading...
Page #235 background image
Program instructions
7.6 Counters
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
235
HSC Control bytes
HSC0
HSC1
HSC2
HSC3
Description
SM37.3 SM47.3 SM57.3 SM137.3 Counting direction control bit:
0 = Count down
1 =Count up
SM37.4 SM47.4 SM57.4 SM137.4 Write the counting direction to the HSC:
0 = No update
1 =Update direction
SM37.5 SM47.5 SM57.5 SM137.5 Write the new preset value to the HSC:
0 = No update
1 = Update preset
SM37.6 SM47.6 SM57.6 SM137.6 Write the new current value to the HSC:
0 = No update
1 =Update current value
SM37.7 SM47.7 SM57.7 SM137.7 Enable the HSC:
0 = Disable the HSC
1 =Enable the HSC
Read the HSC current value with your program
The current value of each high-speed counter can only be read using the data type HC
(High-Speed-Counter Current) followed by the counter identifier number (0, 1, 2, or 3) 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, and HSC3
Value to be read
HSC0 ad-
dress
HSC1 ad-
dress
HSC2 ad-
dress
HSC3 ad-
dress
CV (counter current value)
HC0
HC1
HC2
HC3
Example: Reading and saving the current count value
LAD
STL
MAIN
Save the value of HSC0 into
VD200 when I3.0 transitions
from OFF to ON.
Network 1
LD I3.0
EU
MOVD HC0, VD200

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals