What is HSC?

The high frequency counter is an internal component of PLCs that is responsible for counting high frequency input pulses in various forms. By using this counter, in addition to the possibility of counting high frequency input pulses, other features are added to the control program, which is usually a difficult task for programming to create features.

 

In other words, according to the programmer's diagnosis, HSC can be used to count input pulses with low frequencies, in which case the purpose of using HSC is to use its specialized facilities to count pulses. With HSC, there is no need to write a program for counting and it is only necessary to define HSC tasks in the control program. After the HSC definitions, the CPU itself assumes the task of counting and the user program uses the results of this count according to the definitions. The high frequency counters or HSCs on the S7 1200 allow the counting of input pulses up to 100KHz at the same time as the CPU scan. An example of the use of HSCs is the counting of pulses generated by incremental encoders. S7 1200 family PLCs allow the use of up to 6 high frequency counter channels (HSC 1 to HSC 6). Each HSC can be defined and used in one of the following four operating modes according to the need and depending on the type of pulse shape to be counted.
Mode one: Single-phase counter with internal direction control
In this case, by creating each ascending edge at the pulse input of the counter and according to the counting direction (ascending-descending) which is done according to the bit control direction, the counter will count ascending or descending.
Second mode: Single-phase counter with external direction control
The only difference between this mode and the first mode is in the control bit for counting. The direction control bit in the second case is a hardware input.
Third mode: Two - phase counter with 2 clock inputs
In this counting mode, two pulse inputs are defined as Clock down and Clock up for the counter. If the down input is zero and any ascending edge is created in the up input, the counter is counted. At the down input, the counter counts down.
Fourth mode: A / B - phase quadrature counter
This mode is the most important working mode of high frequency counters, which allows connecting different types of incremental encoders to the PLC. By using the encoders whose performance description is provided below, it is possible to control the position and the encoder is used as a position detection sensor.
Taken from the book of practical training PLC S7 1200 & PROFINET written by Mehdi Tavana Shirvan and Navid Entezari

Mad Control Aria

Mad Control Aria strives to raise the level of industry and achieve a better and more effective position in the field of global industry in line with current world standards.


Address: No50, Ipcheelor Alley, Pastor Sq, Tehran, Iran
Cell No:00989124128075

All rights of this site are reserved by Mad Control Aria Management.