Hi guys. This is kind of an odd question for EE I know but I thought it was worth giving it a shot.
I'm making a project for my company where we use a PLC/HMI to get real-time data from several transmitters both digital and analog (pressure, on/off switches and level). The level is measured with a HART radar using a 4-20mA loop from Siemens in a tank.
What I need is to calculate the flow of the liquid going into the tank using only the level. If I were using a PC programming language like C++, Basic, Java or even PHP, it would be easy but since the calculation has to be done by the PLC which uses LADDER programming, I don't know what is the best way to calculate it.
The flow calculation doesn't even has to be in real-time. I mean, I can refresh it every 10 to 30 seconds.
We've tried using a BLINK for X seconds (tried 10 and 20 seconds) that grabs the level when the blink began and then the level when the blink ends but I don't like that. Is it possible to use a ramp calculation or something like that? What would be the best (with the less error) way?
Thanks in advance!