CPU Clock for frequency/speed measurement

naturephoenix

Member
Join Date
Jan 2015
Location
Vienn
Posts
181
I'm reading someone else manual inside which is described speed measuremnt by measuring the time in between 2 signals. It says "The 24VDC rectangle voltage is measured directly by the PLC CPU with a 2MHZ clock". The time beetween two rising edges is measured."
I know it is CPU 412-2DP 6ES7 412-2XJ05-0AB0


My questions are:
1. How exactly they measure this? I mean this CPU has some high speed digital inputs or what?. It is not mentioned that it is measured by DI module or Counter module. Actually in hardware configuration the is no counter module. DI module are present.


2. Is this solution with this clock speed possible with S7-300CPU or with S7300 counter module

3. Is this solution with this clock speed possible with ET200S CPU or with ET200S counter module
4. Is this solution with this clock speed possible with S7-1500CPU or with S7-1500 counter module

5. Is this solution with this clock speed possible with ET200SP CPU or with ET200SP counter module
 
1 - A bit more detail on your setup or at least the source of that sentence would be useful. That sentence says that the speed is measured by a CPU running on a 2MHz clock. The frequencies it can measure are definitely much lower than that and, if it is really done via CPU, the cycle time will also impact on the measurement.

2 - No definition on what solution you are actually talking about... the code that would count on the S7-400 Input, will work on the S7-300 input as well. Same conditions would apply though.
A counter module won't do 2MHz, but they can reach well into the kHz and they're not dependent on cycle time.

3 - No definition on what solution you are actually talking about... If there is a counter card for ET200, then it works too.

4 - No definition on what solution you are actually talking about... S7-1500 input cards have a configuration where you can have a pulse counter in a normal input. I believe the frequency you can measure in them goes up to 10kHz.

5 - Read above and shouldn't be much different.
 
I have no idea what CPU a CPU 412 has and it is probably a Siemens specific CPU. However, most microntrollers have 2 or 3 timer/counters on board that can be enabled or disabled by other inputs usually called gates.
Another approach is to have a free running counter that counts at the CPU speed and when an input turns on, the current counter is moved to another register.


I could tell you how this works if I had the pdf that describes the technical information. People that design PLCs and motion controllers need to know this.
 
Thank you both for quick replays. I checked all counter modules
from S7-300 or S7-400 or S7-1500 are going up to 500kHz, that's not 2MHz.



I still don't know how statement from this manual can be true than.
So in a case you have requirements to measure frequency with precion of 1mHZ at 50Hz you can not do it with Siemens PLC equipment?
 
Does the quoted text mean that the CPU is updating with a "clock" of 2 MHz ?
That would be every 0.5 µs.

Or does the text mean that it is sampling a signal that cycles with a frequency of 2 MHz ?
That would mean you need to sample approximately every 0.2 µs.

Anyway, there is no S7-400 CPU that can update with a clock cycle of 0.5 or 0.2 µs. I dont think any PLC can do that.

An S7 412-2DP CPU can update hardware interrupts down to 500 µs. That is still far from 0.2 µs.
And as naturephoenix has already found out there does not exist a counter card for S7-400 that can go to 2 MHz either.

So the orignal stipulation cannot be correct.
Find out what they are measuring, then we can asnwer your 4 questions.
 
Thank you both for quick replays. I checked all counter modules
from S7-300 or S7-400 or S7-1500 are going up to 500kHz, that's not 2MHz.

I still don't know how statement from this manual can be true than.
So in a case you have requirements to measure frequency with precion of 1mHZ at 50Hz you can not do it with Siemens PLC equipment?

The sentence you wrote specified that the CPU frequency was 2MHz. Nowhere did it mention the frequency of the wave.

Taking into account Nyquist-Shannon's sampling theorem would indicate that the square wave you're referring to would be less than 1MHz.

Is it possible that this is concerning a position control card with integrated encoder inputs?
 
The sentence you wrote specified that the CPU frequency was 2MHz. Nowhere did it mention the frequency of the wave.

Taking into account Nyquist-Shannon's sampling theorem would indicate that the square wave you're referring to would be less than 1MHz.

Is it possible that this is concerning a position control card with integrated encoder inputs?


This is full text


"An additional measurement of the governor frequency is used as additional speed signal. Here a voltage transformer is used to feed the generator voltage to a transducer (VFU-device). This transducer only triggers a 24VDC every time the input voltage is > 35 mV. This means from a Sinus-signal from the generator voltage the VFU-device is producing a 24VDC pulsing rectangle signal with sharp trigger edges. The trigger level of the VFU-device is low so that even an unexcited generator can produce enough voltage to drive the speed measurement.
The 24VDC rectangle voltage is measured directly by the PLC with a 2MHz clock. The time between two raising edges is measured. At a frequency of 50Hz the accuracy is 2,5 mHz.
This speed signal is used if the unit is in normal operation."


I was wondering is it possible to resolve this using hardware interrupt and measuring times in between two hardware interrupts
 

Similar Topics

We recently purchased a IC693CPU352 module and it appears the internal time clock is static. I can set the time and date but once set it does not...
Replies
5
Views
162
Hello everyone... I'm working on a project where I want to use the time of the PLCs to do a specific process. In both PLCs (cpu 224 & cpu 315)...
Replies
10
Views
4,326
Hi I want to know Whether Mitsubishi Q02UCPU have Real time clock inbuilt. if so how to access those time and date values. I tried "Set clock"...
Replies
0
Views
1,364
hello there, I am a beginner and would like to get a program example of using the real time clock for starting and stopping a device at a given...
Replies
1
Views
2,927
Dear Kind advisors, I need help on the title mentioned subject. The logic i wrote as attached is working and will update the CPU time clock after...
Replies
15
Views
14,832
Back
Top Bottom