SLC grow-your-own totalizer

williamlove

Member
Join Date
Jul 2007
Location
phoenix
Posts
59
I want to totalize a gas flow mass flow rate so that I get the mass that has flowed in a specified time. The mass flow rate (gram/hour) is available as a real time measurement on an analog input in an SLC500. It is scaled and accurate. It is steady but fluctuates enough that I cannot just multiply to get the total.

The mass flow controller has no totalizer so to achieve this I will have to roll my own totalizer in the SLC...if that is feasible.

Is it realistic to try to do this in code? If the flow changes significantly (I'm not talking about noise, just flow variation), is it significantly less feasible?
If so, is the algorithm published in an easily understood form?
 
Last edited:
there is a variety of ways I'm sure..
I use an RTO with a time base of .01 preset to 600. If the flow is greater than my low flow cutoff every DN bit of the timer(reset tmr) I add the flow to a total1... When that register reaches 10000 I add 1 to my kgal register(float) and subtract 10000 from my total1... when kgal register reaches 999999 I zero it out
 
It is steady but fluctuates

It's one or the other...

The analog is presented as a number. How long, when it is 'steady but fluctuating' does it take to change by one increment. To be the most accurate you must sample the value at least that quickly. If you sample less often but it is fluctuating up and down then you may be able to average.

For argument let's say it changes by one increment in 5 seconds. Then every 5 seconds you record the reading. Transfer it to a floating point value if it is available. Divide by 720 (5 second increments in an hour) and add it to total. After 720 samples you have the total for the previous hour.
 
and yes as bernie says..depends on what resolution you want to record.. maybe every 6 seconds... 1/10 of a minute would be ok for your application.
 
thanks

What I was trying to say about "steady but fluctuating" is that the measurement is not very noisy but the flow does change fairly rapidly sometimes.

I appreciate the feedback and will try this. If you have any more insight based on my last comment above I'd be interested. Thanks.
 
Last edited:
This is very common and relatively simple to do. I prefer to use an STI routine.

You need to convert the flowrate from gram/hour to gram/(whatevertime unit your STI is). So, if i wanted to sample every second, convert the flowrate to gram/second, and add that to a total amount each scan the STI runs.

Now, if you are smart, you'll use the STI address in your flowrate conversion, so that way if someone ever changes the STI time set point, your totalizer changes with it.
 
I have used STIs for PID loops and never thought of the fact that the STI time setpoint is just another address. I guess you might also have to keep an eye on the Resolution Select Bit too, right? I may try your idea out. Thanks.
 

Similar Topics

I’m attempting to send a temperature from a SLC-5/02 to an EZiMarquee display. The vendor said to use a MSG instruction to send the data to the...
Replies
1
Views
86
Hello all. I have a few SLCs in my plant and of late we've seen a weird issue: The system will be running normally and then randomly the outputs...
Replies
2
Views
100
I am working on setting up a Prosoft Datalogger model PLX51-DLplus-232. This unit will be collecting data from a SLC 5/05 on the DB9 port set to...
Replies
3
Views
103
I have a redundant ControlLogix being set up. This program reads a value from a remote site which happens to be SLC PLC. Rockwell mentions SLC...
Replies
2
Views
96
Hello, I have a ControlLogix redundant controller being set up. The program reads a value from a remote site which hosts a SLC PLC. Rockwell...
Replies
0
Views
80
Back
Top Bottom