High Speed Counter Configuration


Thread Starter


Hi all,

I have never used high speed counter modules. I have task of counting high speed pulses (3kHz from sensor) every 100 msec for about 5 min. Counted pulses for every 100 msec shall be stored in PLC registers (for further calculation).

Can some one help with pointers how to set up a high speed counter module for this ...

Any help in this regard is appreciated.

Hi LuckyA,

Configuration for High Speed Counter is depend on the PLC brand. you need to mention what is PLC brand and type you are using.

You said that the frequency is 3 KHz or 3000 Hz. it is mean the pulse period will be 1/3000 Hz or 333 us, but you said you will be counting every 100 ms which is too slow. your PLC have to capable of counting speed twice than maximum frequency.

Thanks for input Ikhtiander,

I would use m340 plc (Schneider) with p342020 CPU. They have two counter modules BMXEHC0800 with counting frequency of 10KHz and BMXEHC0200 with counting frequency of 60KHz.

Also 3KHz is switching frequency of sensor (I assume its the pulse per second given by sensor when detection occurs. i.e., if my wheel rotates very fast, the sensor can capture maximum of 3000 rotations in a sec). The application where sensor is set gives the frequency in varying ranges. i.e., first 100 msec it can *guessed to* be 50Hz (wheel starts slowly), next 100 msec it can *guessed to* be 120Hz (wheel gathers speed). if sensor is fully utilised, then max we can get is 3000Hz in 1 sec implying 300Hz in 100 msec.

I want to capture these varying pulse frequencies (or counts) in defined interval and then take to PLC register for further processing

If you feel following counter and PLC specs can't handle application can you please suggest a solution

BMXEHC0200 - http://datasheet.octopart.com/BMXEHC0200-Schneider-Electric-datasheet-14408438.pdf

BMXEHC0800 - http://www.alliedelec.com/m/d/b280fab6230d8de6130c7238f4ffe6d9.pdf
Hi LuckyA,

I don't have experience with M340. But based on my experience using AB PLC, High speed counter have their own processor and algorithm to counting incoming pulse, calculate and provide result in form of frequency, counting, pulse width, flow rate, etc, this calculation result are ready to use for PLC main CPU. The main CPU only need to read particular tag/variable that assigned to the high speed counter.

Actually I don't understand your control philosophy that you explained, but there are two loops here:

- 100 ms loop that is belong to main CPU, 100 ms should be achievable by most of PLC, so M340 should be capable, CPU will
read pulse counter module calculation result and execute your algorithm. This called outer loop.

- High speed counter loop with 3 KHz frequency, if datasheet said it will be able to count pulse train with frequency up to 60 KHz, then 3 Khz should be no problem. This called inner loop with 333 us update time.

The practical guidance is, in order for cascade control system for working properly, inner loop control should be as fast as twice of outer loop. so 333 us more than twice of 100 ms and I felt with m340, your application will be working just fine
Hi Ikhtiander,

My control philosophy is simple. Count incoming pulses every 100msec for 5 min. Rate of incoming pulses is not constant. i.e., for every 100msec of 5 min the number of pulses counted varies.

Once i have the pulse counts (obtained at 100msec intervals over period of 5 min). I want to use them in main CPU logic for further processing.

Any document/tutorial that will introduce me to high speed counters of AB PLC ...