Difference in steam flow totalizer value, Fatek PLC vs Redlion PAXP

Ok so we know that there is a difference between the two, however, is the difference the same regarding percentage for example 203.0 ton on one & 205.02 is a difference of 1.98 tons this roughly equates to 1% so if the next daily totals were 303 & 306.02 then again it is roughly 1% give or take a bit as there could be presicion of the way the floating point maths work.
This would indicate that the main error is to do with scaling I would guess that the precision of the Red lion is not better than 0.2% given that the PLC may be the same but in opposite direction that could be 0.4%. So I think you need to log days of data to see if there is a similar difference, adjust the scaling on the PLC, & check again.
Regardless of if it is a scaling error or clock accuracy, if reasonably consistent then adjustment of one of the scaling parameters should bring it in closer, you will never get it exact, unless you use the atomic clock to drive both.
 
Last edited:
I would suggest that you switch to double instead of float. When there is added to small amount comparing to totalizer, due to IEEE floating point constraints there will be nothing added.
 
Please find the attached PDF file of relevant ladder logic of PLC program.

Ah, this is more than one day's accumulation, more like a couple or three weehs.

The ratio between the totalizer value, 1457+, and the one-second increment, 7e-5, is about 2e6, or 21 bits of the 24 available in the mantis of a 32-bit single-precision floating-point value. So only 3(. 5?) significant bits (binary digits) of that small an incremental sample can be added to a totalized value that large. So the error, per sample, would be up to 6‰+ ~ 4-5g* per sample ~ half a ton per day, and over several days that could account for a few tons of error.

* yes a ton is not a tonne, but near enough for this estimation.
 
I was assuming that every 24 hours the accumulated value was stored then the value per day reset to 0 ready for the next 24 hours, I did something like this on a system that had power meters, rather than take a sample every second I used the total flow of the power meter, snapshot it, subtracted the previous total for reports, to give per day usage, had a bit of code when the power meter overrun (never happened during my time) , checked for a negative reading then did the sums accordingly.
I did try sampling every second & minute but also would give errors.
So, errors could be if the meter & PLC were to be sampling on the same 1 second intervals, as these clocks not syncronised then each sample in theory could read a different value i.e. the Meter reads 0.2 seconds before the PLC then the value could change (especially if there is a lot of turbulence), a difference in the actual 1 second accuracy again this would accumulate over time, A scaling difference between the PLC & Meter conversions again could be also giving a difference, Also, it appears the PLC a-d converter is 14 bit, what if the meter is different ? that means the real resolution is different it all adds (or subtracts) to the final values.
 
Also note, if this is over a few weeks and totalizer values ove 1400, then 2-5tons of error is a fraction of a percent (0.1-0.3%+, ballpark), not the 1-2% minimum I was calculating based on a single day's total at 9t/d max.
_
 
So the "right" way to do this without loss of precision is in two steps:

  1. Today's sum of 1Hz samples in 32-bit (long?) integers
  2. Ongoing sum of past days' tonnage in 32-bit floats.
1) the range of values for 0-9t/h is 3276 to 16383 from R3840, which is equivalent to a range of 0-13107, where 1 count in a 1Hz sample represents 0.19e-6 ton. So on each second subtract 3276 from R3840, and add that difference to today's running total that is reset to 0 at midnight and is stored in a 32-bit integer, Long_Integer_Total. 86400 samples of the max value (13107) would total less than 2G, so it would not overflow Long_Integer_Total. That long value in Long_Integer_Total could be multiplied by 0.1997377737e-6 to get today's running total tonnage.

2) At the end of the day (midnight on the next day), that running total, as a float (a.k.a. REAL), is added to another float (REAL; Float_Dailies_Total) that keeps the running total of the tonnage however many days it has been since it was last zeroed. There will be some roundoff, but it will be out in the fifth significant decimal digit or beyond.

At any time (.i.e. on any scan), today's tonnage (1 above, 0.19e-6 * Long_Integer_Total) and the running past dailies' totals (2 above, Float_Dailies_Total) can be added to get the current running total.

If the PLC in use does not have 32-bit integers, it gets trickier, so a better option would probably be to push the Redline value down to the PLC.

One thing we have not addressed, although some have mentioned it, is whether the PLC or Redlion, or neither, is generating the most accurate value.


And this still does not address possible flow rate measurement errors or typos in conversion constants.
 
Hi;


Just for an experiment, i created another totalizer within same interrupt in which i did multiply the value by 10000 and after process, divided by 10000 to minimize the error in floating point conversion. I found that just within almost a day (almost 60k+ interrupt cycles), there was 0.1204 difference in between two counters.



Please find the attached relevant rungs of the program in PDF and suggest how do i more minimize the floating point error.
 
“A man with one watch always knows what time it is. A man with two watches is never sure.”

Segal's Law
 

Similar Topics

We have remote IO 1734-AENTR and all of them seem to be recognized in Logix except in, RIO-5000. When we look at the revision, all the ones that...
Replies
4
Views
684
From a FAT it appears that a struct containing bits/int/real can't be sent from a 1513 to a 1200. When using two 1513 there is no issue. Total...
Replies
5
Views
678
Hello, I have a problem with AO- and AA-Tags. When I use for example the tag AO_Test with the address 200 and type the value 1,2 in, the AA-Tag...
Replies
7
Views
1,386
As per the title. This might seem like a basic question to many, but I'm unclear about the difference between a coil ( ) and an application...
Replies
28
Views
3,929
Good Morning , I have 2 Frequency Drive panels to build and commission . It is for 2 pump systems . Just wondering , what is the...
Replies
4
Views
1,940
Back
Top Bottom