EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 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
Loading...
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
555
Technology instructions
10
10.1
Counting (High-speed counters)
The basic counter instructions, described in
"Counter operations" (Page 244)
,
are limited to
counting events that occur at a rate slower than the scan cycle of the S7-1200 CPU. The
High-speed counter (HSC) function provides the ability to count pulses occurring at a higher
rate than the PLC scan cycle. In addition, you can configure the HSC to measure the
frequency and period of the occurring pulses, or be setup such that motion control can use
the HSC to read a motor encoder signal.
To use the HSC function, the HSC must first be enabled and configured using the CPU’s
Properties tab in the Device Configuration screen. To get started configuring the HSC, refer
to "Configuring a high-speed counter" (Page 572).
After you download the hardware configuration, the HSC can count pulses or measure
frequency without the need for any instructions to be called. When the HSC is in Count or
Period mode, the count value is automatically captured and updated in the process image (I
memory) each scan cycle. If the HSC is in Frequency mode, the process image value is the
frequency in Hz.
In addition to counting and measuring, the HSC can generate hardware interrupt events,
operate dependent on the state of physical input points, and produce an output pulse
according to a specified counter event (V4.2 or above CPUs only). Technology instruction
CTRL_HSC_EXT allows the user program to control the HSC programmatically.
CTRL_HSC_EXT updates HSC parameters and returns the most up-to-date values when
executed. You can use the CTRL_HSC_EXT instruction while the HSC is in Count, Period,
or Frequency mode.
Note
The CTRL_HSC_EXT instruction replaces the legacy CTRL_HSC instruction for projects
targeting V4.2 CPUs and later. All of the functionality of the CTRL_HSC instructi
on, plus
several additional features, is available with the CTRL_HSC_EXT instruction. The legacy
CTRL_HSC instruction is only available for compatibility with older S7
-1200 projects and
should not be used in new projects.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals