Ampere Hour Totalisation/Timer Accuracy

pauly

Member
Join Date
May 2002
Location
South Wales,U.k
Posts
244
We have a contract part of which involves totalising ampere hours and switching dosing pumps on at a certain value of A/H. I need to log the value of current every 6 seconds and generate an A/H total. I am proposing to do it with a one shot every six seconds according to this simple formula: 6*Amps Value/3600. I can remember seeing somwhere on this site a posting about timer accuracy, I think that was something to do with totalising as well but I can't seem to find it now. Does any one see anything wrong with totalising like this(the specification talks about logging once every six seconds)and any thoughts on timer accuracy? This is a PLC5
 
There are two issues to consider. First is the accuracy of the six second timer. The timer's DN bit will be true in the first program scan in which the ACC value equals or exceeds the PRE. That can be off by as much as the time for one scan. Also, when you reset the timer you lose the time in the scan in which you perform the reset as well as losing the residual time in the ACC register.

The second issue is the amount of variance in the current. When you sample once evry six seconds, you are making a tacit assumption that the sampled value of the current is the same as the actual current over the entire six second interval.

There are techniques you can use to minimize the impact of both effects. For the timer, instead of resetting at the end of six seconds, subtract the PRE from the ACC. When you sample a new value, keep track of the previous sample value. Each time you sample, calculate the average between the current sampled value and the previous and use the average to add to the amp-hour accumulator.
 
Timer accuracy

Thanks for the reply,do I not need to subtract Acc from Pre?Does the timer get reset from a comparison of these? And won't the same problem exist with scan times?
 
The status on DN is based on a comparison of ACC to PRE. Reset drives ACC to zero. Let's say that your PLC has a scan time of 25 milliseconds. The ACC value in the scan in which the DN bit is true could be as high as 6.024 seconds. If you reset the counter when the DN bit is true, you start the next scan with an ACC value of zero. If you subtract PRE (6.000 seconds) from ACC, you start the next scan with an ACC value of 0.024 seconds.
 
As an alternative, you may want to look into trying a watthour meter. They usually put out a pulse for every kw or some portion of a kw. Then count the pulses for a total.
 
Pauly

Since you are measuring AH I assume that it is a DC application and the dosing pumps suggest some kind of plating. Steve's suggestion re the timing sounds ideal(I might use it myself someday) but I think that the simple averaging of 2 values is unlikely to be good enough to be accurate. I would think that the amp values could change quite significantly and very quickly and taking a reading every 6 seconds will only give you a snapshot at that particular time. A better solution might be to look at the value every scan, add all of the values over a six second period and count the number of scans so that you can calculate a truer average. This will still not be perfect as the sample time of your A-D card comes into play but it will be quite close.
Andybr
 
With a PLC 5 I would use the STI function. I normally set the STI to 500ms, which should give adequate resolution for totalization. The total can then be logged every six seconds to a db.
 
Go to Processor Status - STI tab. Choose the Setpoint ms (S:30), and the routine to be used (S:31). I lable the routine 'STI' so that I remember which one it is.
 

Similar Topics

Hi guys, May I know how can I calculate the total current consumption for 1756-PA72 power supply? My input is 240V AC. I'll use input power...
Replies
2
Views
5,032
Hi guys, I'm doing some current consumption for a panel, hope to get some advice from you guys here. My control panel will be supplying 24V DC...
Replies
12
Views
5,036
Hello, I am trying to setup on plc so If I enter 60 jph (job per hour) it will send the vfd hertz based on what jph is entered by...
Replies
2
Views
178
Hi team, I am setting up my first E200 overload unit. I came across parameter 205 StartsPerHour. The default setting is 2. I presume, the motor...
Replies
2
Views
506
Hello, I have inherited an old machine with a PLC unit that needs to be reset after a batter replacement. I don't know what I'm doing! Here's...
Replies
5
Views
1,038
Back
Top Bottom