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 #238 background imageLoading...
Page #238 background image
Program instructions
7.6 Counters
S7-200 SMART
238 System Manual, 09/2015, A5E03822230-AC
Table 7- 7 Status bits for HSC0, HSC1, HSC2, and HSC3
HSC0
HSC1
HSC2
HSC3
Description
SM36.5 SM46.5 SM56.5 SM136.5
Current counting direction status bit:
0 = Counting down
1 = Counting up
SM36.6 SM46.6 SM56.6 SM136.6
Current value equals preset value status bit:
0 = Not equal
1 = Equal
SM36.7 SM46.7 SM56.7 SM136.7
Current value greater than preset value status
bit:
0 = Less than or equal
1 = Greater than
See Also
High-speed counter instructions (Page 220)
Example initialization sequences for the high-speed counters (Page 238)
7.6.5
Example initialization sequences for high-speed counters
HSC0 is used as the counter in the following descriptions of the initialization and operation
sequences.
HSC0 and HSC2 support counting modes (0, 1), (3, 4), (6, 7), and (9, 10).
HSC1 and HSC3 only support counting mode 0.
The initialization descriptions assume that the CPU has just been placed in 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.
Note
Although the following sequences show how to change direction, current value, and preset
value individually, you can change all or any combination of them in the same sequence by
setting the value of SM
B37 appropriately and then executing the HSC instruction.

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