Hi,
I wonder if I could ask for some advice regarding the accurate determination of frequency of a pulsing input on a Micrologix 1100.
I have a density meter that gives out a pulse train, the frequency of which is proportional to the periodic time of the vibration of the tube. The pulse frequency will be around the 700 hz range.
I need to able to accurately determine the frequency (hz or pulses per second) so that I can use this value to feed into floating point equations so that I can determine the density of the fluid in engineering units.
The Micrologix 1100 has a single high speed counter (20 khz) related to inputs 0-3, and it has STI ability (Selectable Timer Interrupts), so what I need it to do is as follows:
Time 0 ------ Reset ACC Value, start counting up.
Time 1000 ms ------ Store ACC Value in register, reset ACC Value, start again.
In essence, every 1000 ms, the number of pulses counted by the HSC would be updated into a register and I can take it from there.
Sounds simple enough, but having spent a morning reading through the manual regarding HSC and STI, I still can't really "see the wood for the trees".
If anyone has done anything similar, I would be grateful for some advice, as the accuracy of this number determines the accuracy of the whole job.
Many thanks,
Colin