Endress Hauser Flow Meter 4-20ma

Yes it is a batch application , run x amount of gallons. reset mag after batch is complete. Repeat

The HMI matching the meter is the issue i'm having. Because that HMI register is what tells the valves when to close.

I agree with the pulse application , but we had no luck.
 
Update: fixed a lot of typos.


...
The HMI matching the meter is the issue i'm having. Because that HMI register is what tells the valves when to close.
...

@mavrick, I see some ambiguity in the language there, so just to be clear, when you say "HMI" and "HMI register," you mean a value in the PLC, and it is the PLC that watches that accumulated value in the PLC to choose when to close the valve.

The accumulated PLC value is only displayed by the HMI, not used by the HMI, and the HMI has nothing to do with closing the valve.

Is that right?

And the numbers that do not match are

  • the accumulated "HMI register" in the PLC, and displayed by the HMI
  • vs.
  • an accumulated value that is displayed by the flow meter, that has nothing to do with the PLC or HMI.
Is that right?

Finally, from what you said earlier,

  • when the accumulator setpoint is 700gal, after the PLC closes the valve, the PLC's HMI register and the flow meter's value both say the same thing i.e. 700 +/- a small number.
  • when the accumulator setpoint is 1500gal, after the PLC closes the valve, the PLC's "HMI register" says ~1500gal, and the flow meter's accumulated value says ~1400gal.
Is that right? Because 6%+ difference is a lot, too much to be explained by the difference between the 1000ms timer duration and an actual 1s sample period. Also, 100gal absolute difference is a lot of error e.g. compared to a reasonable amount of in-flight* noise in a system with 400gpm max flow rate.

Can you post the PLC program? PDF would probably be best.

* in-flight = volume that accumulates after the time of the command to close the valve.
 
Last edited:
Yes all the functions you have listed are correct. Thank you for explaining that much better than i could. I have little to no in flight accumulations.

They will not let me post the logic for proprietary reasons, I know that makes it hard.

I had someone suggest calibrating the analog input card, wasn't sure if that would help.

One thing i'm going to do is take the meter out of the pipe and verify that the meter is not dirty.

I have verified the meter signal is good.

The odd thing is the issues on the high end of the set point and not at all set points. The set points start to waiver around 600 or 700 gallons.
 
Also this system used to be within 10-20 gallons of total set point, and has been in service for a couple years. It just started wavering over past couple months. Meter has been verified good by OEM
 
The odd thing is the issues on the high end of the set point and not at all set points. The set points start to waiver around 600 or 700 gallons.


Yah that is very odd, and makes me wonder if there is something going on outside the obvious things we have been focused on, especially as you also said it used to agree with the E&H to within 10-20gal i.e. an order of magnitude better.


The accumulation internal to the E&H should be using the same flow rates as the PLC; the only difference between the E&H and PLC algorithms would be the sample interval and the clock rates, and I wouldn't expect sample intervals to make much of a difference, statistically, since I suspect the flow rate is fairly constant. Did the OEM check the E&H internal clock? Or is the E&H using internal pulses, so this paragraph is irrelevant?


Too bad about the proprietary nature of the code, but I get it. Anyway, if it used to work then the code is not likely to be the problem. Something changed.
 
I will verify the sample rates of the flow meter. I do appreciate all the help, i still would like to try the periodic task. Just to see what happens.
My assumption is that its ideal to have the sample timing of the controller and meter matching or could cause issues.
 
Without actually showing the code, can you describe what it does? Does it control the speed of the pump using an analog output speed command, accelerating to maximum GPM, then slowing down as the accumulated total closes in on the batch setpoint? Or are you just opening and closing valves?

If you were to plot the analog input signal over the course of a batch, would it look like a trapezoid? The area of that trapezoid represents the the accumulated total. Compare the area of a low batch setpoint trace with the area of a high batch setpoint trace.
 
Last edited:
Basically the meter only controls the valve on or off operation and the pump on or off. Other than that nothing else is controlled.
There is no vfd controlling the pump.

I'm not sure how to answer the second part of the question. Basically the flow meter goes from 0gpm to 250gpm in 2 seconds and holds a 250 gpm until the setpoint is reached. Then the pump goes off and valve closes. I know that's not much help.
 
Basically the meter only controls the valve on or off operation and the pump on or off. Other than that nothing else is controlled.
There is no vfd controlling the pump.


I thought the PLC controlled the valve. Does the meter manage the valve and pump control, and the PLC is simply a separate measurement method?


Also, when the two numbers were within 10-20gal of each other, before the recent 100gal differences, was the 1500gal setpoint ever used, or have the larger differences always shown up on the larger setpoint, but those larger setpoint never occurred until now?



Finally, the flow rate range is 0-400gpm, but what is a typical flow rate for this service?


Update: never mind on that last question; I just re-read the previous answer and the typical flow rate is 250gpm.


Sidebar: estimate effect of 32-bit floating point truncation


from 1024gal to 1500gal, anything in the (mag val/60) increment below (1024/1.6e7) ~ 0.6e-4 = 6e-5 might be truncated, 250gpm/60spm ~ 4gal/s, 6e-5/4 = 1.5e-5 = 0.0015%, which is several orders of magnitude too low to account for 100gal of error.
 
Last edited:
To use flowrate in a batch process is quite frankly ridiculous, I have been doing batch processes for over 30 years, I have come across flow calculations by others & TBH, very difficult to get right, in fact, I have modified a number of systems to pulse, one system although had load cells for weight & some E&H Coriolis flow meters (the most accurate), the reason for using the flow meter was for parallel batching of products (recipe decided if sequential (load cells) or parallel batch for reasons I will not go into), I never understand why you would use flow instead of pulse, even setting a larger amount for pulse (to overcome scan problems if not using HS inputs) is still pretty accurate.
 
To use flowrate in a batch process is quite frankly ridiculous, I have been doing batch processes for over 30 years, I have come across flow calculations by others & TBH, very difficult to get right, in fact, I have modified a number of systems to pulse, one system although had load cells for weight & some E&H Coriolis flow meters (the most accurate), the reason for using the flow meter was for parallel batching of products (recipe decided if sequential (load cells) or parallel batch for reasons I will not go into), I never understand why you would use flow instead of pulse, even setting a larger amount for pulse (to overcome scan problems if not using HS inputs) is still pretty accurate.

Integrating flow is accurate enough for a lot of batches. Whether it's good or not is mostly down to the time it takes to meter the product in. If it takes half an hour or more, the loss in precision from the startup is diluted and it works well. If it's a change that takes 12 seconds to complete, analog isn't going to cut it.

I do prefer pulse outputs and dedicated counter cards (using the normal inputs is worse than integrating flow in my view as you're putting a fair amount of faith and limitation to further development of the system).
 
I agree with using HS or int. However, 250 gpm is only 4.2 (approx.) gals per second so not really a problem, What I did was to update the PIW on regular basis just to be sure as the change to pulse was a quick add on, this was in litres so a little faster requirement, comparing the pulse reading to the load cells (known to be calibrated to within 0.3% by the supplier). the readings were within 0.5%.
 
...
Sidebar: estimate effect of 32-bit floating point truncation

from 1024gal to 1500gal, anything in the (mag val/60) increment below (1024/1.6e7) ...


Whoops, that divisor is off by a factor of 2, it should be 8e6 not 1.6e7, but the end result is the same i.e. 32-bit floating point accuracy should good enough and the 100gal error is coming from somewhere else.
 
i still would like to try the periodic task.
Again, I doubt the sample timing is the problem.

That said, an alternative, basically the same idea suggested by @5618, would be to use the rising edge of bit 19 of WallClockTime/CurrentValue instead of /LocalDateTime, which is a LINT (DINT[2]) counter that run at 1Mhz. Bit 19 of DINT[0] has a rising edge every 1,048,576µs i.e. 2**20 ticks of the clock, so the CPT formula would become
Code:
((MAG gpm)/57.22046)+(HMI Total)

where

         µs       1    sample            sample
60000000 --- * ------- ------ = 57.22046 ------
         min   1048576   µs                min

so (MAG gpm/57.22046) is in units of gal/sample.
and triggered by the rising edge of that bit 19. The WallClockTime comes from a GSV instruction.

It's a bit busier than one CPT instruction in a periodic task, but then again the periodic task has its own development overhead.

It should all fit on one rung and gets rid of the TON:
Code:
                    [B]us[/B][0].19   [B]usONS[/B]
 --[GSV          ]-----] [-----[ONS]---[CPT...]--
   [WallClockTime]
   [CurrentValue ]
   [[B]us          [/B] ]

Where

   [B]us[/B] is a DINT[2] array
[B]usONS [/B]is a BOOLEAN, the storage bit for the ONS instruction
Also, for diagnostics, we could log the values every 16+ seconds, like this:

Code:
     begtot
------] [-------[CLR]--[CLR      ]--
                [idx]  [HMI total]

         us[0].23  ONS16
--[LES]----] [-----[ONS]--[MOV        ]--[MOV        ]--[ADD]--
  [idx]                   [HMI total  ]  [MAGgpm     ]  [idx]
  [32 ]                   [totarr[idx]]  [gpmarr[idx]]  [1  ]
                                                        [idx]

Where

   idx is an INT
totarr is a REAL[32] array
gpmarr is a REAL[32] array
 ONS16 is a BOOLEAN
begtot is a BOOLEAN and oneshot that triggers the start of totalizing
Then, after a 1500gal run, the contents of the array could be posted here for diagnosis. The 21 or 22 unique totals in array totarr should be linear since the pump runs at a constant rate, the latter being verified or not by the array gpmarr, and the total through 700 gpm is correct, so at some point after 700gpm we should see a deviation.
 
Last edited:

Similar Topics

We have a contract to refurbish/upgrade a filling/bottling machine. We have the machine but not its control panel or PLC. We've built a new...
Replies
4
Views
3,891
I have an endress hauser flow meter to be connected and confiured to work with an existing Allen Bradley 5000 plc and a scada system.this is new...
Replies
5
Views
4,513
Hi, I have a Endress+Hauser Flow Meter (Model:Prowirl 72F). In the technical Details sheet it shows some details on Communication, What do you...
Replies
18
Views
5,945
Hi all, Well, here I find myself at a former client after I left water treatment trying to help him get the plant back up and running after a...
Replies
2
Views
1,047
E+H Promag P500 5069 Compact Logix implicit Ethernet IP using endress device description 30ish flowmeters, every time I download, some (but not...
Replies
2
Views
1,253
Back
Top Bottom