Calculating Rate from HSC

YELMRAP

Member
Join Date
Dec 2010
Location
MN
Posts
17
My application includes positive displacement gear type flow meter (500 pulses per liter). PLC is ML1400
I need to totalize the fluid being dispensed. I’m thinking I should be able to simply take my HSC.X.ACC and divide this by the flow meters “K” factor to get favorable results.
A little background on the fill volumes to be dispensed, the max volume dispensed will be around 350 liters. With the pump I’m using the fill time should be around 6 minutes. I’m not too concerned about fill accuracy, (+/- 3L) would acceptable. Am I on the right track?
 
My application includes positive displacement gear type flow meter (500 pulses per liter). PLC is ML1400
I need to totalize the fluid being dispensed. I’m thinking I should be able to simply take my HSC.X.ACC and divide this by the flow meters “K” factor to get favorable results.
A little background on the fill volumes to be dispensed, the max volume dispensed will be around 350 liters. With the pump I’m using the fill time should be around 6 minutes. I’m not too concerned about fill accuracy, (+/- 3L) would acceptable. Am I on the right track?

I would write some code to increment a memory location by 1 whenever the ACC = 500. When the memory location = 350 (350 liters), stop the pump.
 
What are you using to enter your preset volume? Is it the same all the time?

To expand on what david90 said:
I would set up the HSC to a preset of 50 or every 0.1 Liter. Then every time the HSC hits the preset you can add a 1 to a CTU or N file. When that file reaches 10 you can then add a 1 to another CTU or N file.

When the second file reaches your preset amount you can then shut off the pump. You may want to make the shut off point your preset less some volume as there will always be some "over run" unless you use a solenoid valve or something like that.

Your total would be the amount in each file. That will give you volume total to 0.1 Liter, instead of whole Liters. Depending on what accuracy you require you may want to write some logic to change the K-Factor or add a Meter Factor to the delivery to correct for any errors.
 
The volume will always be the same. I do have a solenoid valve on the circuit so the overrun will not an issue. I'm still thinking that if just divide the .ACC by the rate it accomplishes the same with less impact of scan times. Am I wrong in thinking this?

Thanks again guys for opinions!
 
I think your first post makes sense.

I would not reset the HSC and would set the rollover point to a maximum sensible number, you must recognize and account for rollover in the logic that calculates the delta of the Volume, and if you trigger it at one second intervals it should be quite accurate, but I believe the HSC has a built in rate function depending on the mode you choose.

I am not intimate with the HSC on the Micrologix, it may be different than it's big brothers.

As far as scan time? Have you really looked at the speed of these newer little Micros? They're probably ten times faster than a SLC5/05.
 
I had a chance to test the logic on the actual machine, in the field and my results were not favorable with the complete program. I seem to be missing pulses.
Here’s my findings when dispensing 30 liters of fluid:
Flow meter “K” factor is 500, so 500 pulses equal one liter of fluid or 2cc per pulse. So with 30 liters I should see 15000 pulses (which closes a solenoid valve).
But when dispensing the actual total volume is more than 30L. The discrepancy is not repeatable and is around 30% more volume.

A little background of the machine itself. The flow meters are mounted on grounded 480/3/60 service panel. The wiring is shielded running to the control panel (but not grounded).
The flow meters have two pickup’s one is being used in a STI to calculate and display the GPM on the HMI. The other is used calculate the volume dispensed.

The last 100 scan for the program is ~56 uSec. But not sure what is when doing the filling. HCS counters setup for “0” mode. Input filter setup for 5uS.

With results not being favorable I setup a test in house using the same flow meter and just the logic required to show volume and STI, I only had the base ML1400 plc and not any of the expansion mods). The results were perfect. The scan was ~5 uSec.

Do you think I’m seeing a scan time issue or electrical interference? Should I be isolating the fill logic to function file?

Thanks in advance!
 
You shouldn't be concerned with scan time, with the tolerance you are looking for. Scan time will only effect the shut off time once the preset is reached.

I suspect, the input filters are set to default. Check under I/O configuration, Select the correct base, and goto the embedded I/O tab. Change the input filter for the corresponding HSC inputs to 5us. You can increase this later, I calculated about 2 ms duty cycle, but decreasing the filter to minimum will quickly show you if this is the problem.

Also, I the K factor should get you a good starting point, but I would calibrate it to a known volume to get good accuracy. With that, in instrumentation accuracy anywhere close to important as repeatability.
 
Brijm,
I already had the filters set to 5us, both in my testing here and in the field.
Thanks,
 
You have a double coil problem on HSC:0/CE... Lad 2:48 and Lad 16:1

I'm not sure if the HSC.CE is enabled mid-scan, or if it waits until the end of the scan. This may be causing your problem
 
I can fix the double coil. Looking back at my revisions of the program I added LAD16 recently, this issue has arose well before that.
 
I'm assuming the the pulse to the hsc is 24v.... I'm not saying it is not possible, but I've rarely seen noise effect a 24v sensor assuming you are not running the signal cable with 24v. Is your fill consistently high or low??? Is it possible that you could be getting air or turbulence where the flow meter is reading? The only thing that I would recommend program wise is to try Leaving the HSC enabled, and see if that helps (although this should only give you a low error)
 
This is going to be a noise, configration, or logic thing. I can't open the file from home.

Based on above comments:
Ground the shield at the counter module with the PS power supply and chassis.

There should be no need for an STI to calculate the rate for the HMI or for control. You should easily be able to totalize the delta of the total in the counter during a normal scan. If you use the raw count multiple times, you should copy it, and work with the copy. I am not certain, but in some models, I think the HSC counter value is updated asynchronously and may change if accessed multiple times, and probably is slower to access than a data table element.

The cutoff timing can benefit from the STI if you can use IOM with that platform. But, in my opinion, you will do much better with a dribble valve, and throttle the last few drips to hit target dead nutz.

The ML1400 is lightning freaking fast, I can't see messing with the overhead to try to trim a few microseonds. Get it to within 0.2% accuracy and repeatability 1st.

If the logic is perfect in the shop...take a scope to the site and look for noise especially around the frequencies of any drives using a fixed carrier pulse.
 
Last edited:
Okie,
I'm leaning towards noise too. Unfortunately the machine is three hours away from my facility and I won't be out there for at least one week.
I was able to get additional technical documentation on the flowmeter and in this document it references the potential differences and between the pre-amplifier housing advice and evaluation device can cause issues.
I'm really hoping this the culprit.
Thanks to all for your input and I will be sure to update the thread when I resolve the issue.
 

Similar Topics

Seems like this should be a simple thing but I’m struggling with it. The basis is that I am trying to detect if a linear assembly is stopped or...
Replies
6
Views
3,092
I have a vibratory conveyor that is being fed from another conveyor. The feeding conveyor does not always deposit a consistant flow of "product"...
Replies
14
Views
5,264
Hi All novice question. Using RSLogix 5000. If rate is (quantity/time) in real format. I want to calculate the time left (Min:Sec format) to...
Replies
5
Views
2,427
This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,364
I need to keep a running pass/fail yield of the previous 5,000 parts produced. I have used this formula before to calculate average: AvgValue =...
Replies
6
Views
2,152
Back
Top Bottom