Averaging pulse count in RSL500 using HSC

thuynink

Member
Join Date
Apr 2014
Location
Canada
Posts
2
Micrologix 1400 reading an anderson flow meter. HSC is used to detect flow. Meter set to 1000 pulses per HL. I need to display the flow rate on an AB Panelview 550 HMI. The flowmeter was connected using a converted 4-20mA signal and displayed flow in the HMI. No HMI programming is needed. This was not as accurate as was required. My volume count is good I just dont know how to build the logic required to find the average pulse count in say; HL/minute. Im sure this is easy for you guys!
Thanks
Tanner
GWB elec/inst.
 
Just as an update: Im not looking for copy and paste logic i just need to be pointed in the right direction. Ive looked for examples, unfortunatly this is one of the few "upgraded" pieces of equipment we have. Im learning, slow but steady.
 
Here's a (very) rough description how to do it. Hope it helps...

Step #1: create an HSC that will count up and wraparound forever:
A) Setup the HSC in Function files ->HSC.
B) Make sure your flow meter is wired to the specific input for that HSC.
C) Setup the HSC for a type 0 counter and turn on autostart. Create an empty function file to point the PFN to.

Step #2: Write ladder logic to read accumulator value of HSC at regular intervals. Pick an interval long enough to avoid sampling inaccuracies but good enough for your HMI updates.
A) Move the HSC:0.acc into a long L variable. Keep another Long variable with the prior value of this same accumulator. We'll call this the count change value.
B) Move the S:4 variable into a word N variable. This is the 1400 free-running clock at 100uS resolution: this will avoid scan time inaccuracy in your calculations. Keep another word variable with the prior value of this same time. We'll call this the time change value
C) Once the time change value is greater than your sample interval that you decided above, just divide the count change value by the time change value to get your counts per time result that you need.
 

Similar Topics

Hi, I have a bit of PLC experience in Siemens and have unfortunately been blessed with working on Automation Studio and B&R which has been a big...
Replies
5
Views
1,365
The PLC code calculates oil flow rate and outputs it on D420. It is represented on the HMI as a vertical bar. Problem is that the operator says...
Replies
33
Views
4,940
Hello, I am working with a laser encoder that is providing the speed of a fiber strand to our AB 1756-L61 PLC. In order to calculate the amount...
Replies
3
Views
3,152
Hi ;Configure A1s64AD card in slot 3 is as attached. This is averaging count. my signals are coming in at channel 3 and 4. There are spiking so i...
Replies
1
Views
1,633
Hi, folks. Thanks for taking the time to read this. I need to average 5 numbers, they being an accumulated value (mSec) from a timer. My director...
Replies
19
Views
5,649
Back
Top Bottom