Capture pulses to compute gals/min

vin7102

Lifetime Supporting Member
Join Date
Feb 2012
Location
Ohio
Posts
30
I have a flow meter that has pulses coming into a ML 1500 HSC at 3238 pulses per gal. Can someone give me a little direction on how I should sample that pulse rate every 2 seconds or so and end up with gals per min? I assume I need to capture the pulse count for a one or two second interval then do the math, but not sure how to do the pulse capture. Thanks a lot.
 
Last edited:
I have never done it myself but I would say that you could set up a new program file in your project (eg. LAD 10 - GPM) that will be a timed interrupt used to do your calculation.

Then under Function Files, go to STI and set the program file number to 10 (or whatever your GPM program number is) with a set point of 1000 (1000ms = 1 sec sample time). This will set up the program file to be scanned every 1 second.

On first rung, I would MOV the HSC.ACC to an integer file to do a calculation (HSC.ACC * 60 / 3238 = GPM), and on the last rung reset the HSC.ACC.

Might need some tweaking or some extra logic but the general idea is there.

This will give you an instantaneous GPM reading, but depending on how stable the flow is and what sort of response time you need you may run into accuracy issues and have to move the GPM values into a buffer that is averaged out over a minute or so.
 
Last edited:
Brendan, Thanks for the info. Im going to try it out first thing in the morning. That will be a lot easier than i thought it was going to be. Thanks
 
It should already be there.

The AB HSC cards provide the rate along with the count. The 1769-HSC user manual shows the following for counter 0:
Words 4 & 5 contain the current count.
Words 6 & 7 contain the stored count.
Words 8 & 9 contain the current rate
Words 10 & 11 contain the pulse interval.

You should be able to use the current rate if the pulses are coming at a fast enough rate or the pulse interval if they are not.
 
I guess I should have asked if the OP is using an expansion module or the built in HSC.

My advice was for using built in HSC.

gmferg's way is easier if using 1769-HSC module.
 
Hey Guys

Well to be honest, your both right. As of right now, I am using the on-board HSC in the 1500 but I have the expansion card ordered and it will be here sometime this week. I remember reading about the added functionality that come with these cards but I figured I could try using the 1500's HSC while I am waiting for the card to show up. I'm going to give Brendon's idea a shot this morning and I'll post the results.

Thanks again.
 

Similar Topics

i need to capture the time between the rising edge of 1 pulse and the rising edge of the next pulse after it. i have a flow meter that gives a...
Replies
16
Views
5,123
I have 6 5V Outputs from a coin mechanism I want to capture on an Allen Bradley 1400 PLC. Can anyone suggest the best way of converting 5VDC to...
Replies
3
Views
2,668
Hi All I have a very simple logic with some light sensors and RFID reader, which are providing start and stop events for capturing some short...
Replies
10
Views
2,735
Working on a project using MQTT and an Automation Direct Click Plus. Have the bidirectional communication pretty much figured out. One of the...
Replies
1
Views
1,455
Is there anyway to replay the capture file from a PC to simulate traffic on a network. This would be to allow testing of some sensors and check if...
Replies
1
Views
1,060
Back
Top Bottom