
cpfeiffer55 (Customer) asked a question.
How to measure an analog pulse duration and compare to maximum time period
I am just starting out with programming using ladder logic so I am sure this problem is easily solved by any experienced programmer out there. I have a magnetic flow sensor. I have written the ladder logic to count pulses from it when fluid is flowing through it. Since this flow sensor only uses 10VDC I am using AD1 to detect pulses. The issue is that sometimes when no fluid is flowing, the magnet is stopping right at the sensor so the signal stays high. This has my program falsely counting pulses when there is no fluid flow.
Maybe have a timer in place that uses the high signal as its input to start and if the timer ever reaches 250ms or something then the done bit goes on and blocks the counter from being active?
I looked at the spec sheet of the click high speed inputs and that 10v is unfortunately right in the middle of no mans land. lol. Too high for low voltage high speed inputs and too high for the higher voltage ones.
You may want to use something like an FC-ISO-C to convert the voltage level from 10v to 24v, it will trigger an on pulse starting at 4.8v. Otherwise, a Productivity 1000 HSC also will count a pulse starting at 4.5v if you were to change PLCs.
Hi PouchesInc, Thanks for the advice. I tried using a timer however since I am using a Click PLC their timer only delays the on or off of the input. In addition, the high-speed input for the PLC only handles 24VDC. One trick I was thinking of was adding a simple diode based voltage multiplier to get the flow sensor's output up to 24 VDC.
The boost module is probably more trouble than it's worth plus the doide based only works AC to DC. Now I am thinking of using the opto-isolator below to make the 5VDC flow sensor signal drive the coil and the contacts will give me a 24VDC pulse to the high-speed input might be better.
https://www.automationdirect.com/adc/shopping/catalog/relays_-z-_timers/optocoupler_relays/52502?_gl=1*1h39brp*_up*MQ..*_gs*MQ..&gclid=Cj0KCQjw_IXQBhCkARIsADqELbIKQEAae7tVVjDOyT2VFj-HJ54wHYNdmXH_doWkDKoktxaIIu_8pyEaAmI6EALw_wcB
I have actually tested those modules in a high speed frequency pulse application like this before and they work pretty decently. They are not meant for this at all, so I was surprised how high an accurate frequency I could get them to. I dont remember the specifics, and searching on this forum I couldnt find my old post from years back. I was to say it was somewhere around 1KHz accurately? But Im not positive.
Im not sure what frequency your flow sensor is actually sending out, but definitely do some testing on ensuring repeatable accuracy with known flow volumes to verify it is working as it should.