Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using tank level sensor to detect leaks

Status
Not open for further replies.

garyg2006

Civil/Environmental
Mar 21, 2010
7
Just wrote my first function block program to monitor tank level in a batch process. The tank is incrementally filled over a 1 week period then gets processed and emptied manually. The Fill cycle is monitored by an ultrasonic level sensor using 4-20 mA input to a Crouzet PLC. I want to write a funciton block sequence that will notice and enable an alarm whenever the tank level decreases due to evaporation or leakage. Once the fill cycle begins, there should be no level decrease until the tank is completely full.
Does anyone know a "simple" way to do this using function blocks?
 
Replies continue below

Recommended for you

Set-up a timer, say every couple of hours, to record the tank level to a PLC variable, then compare the current tank level with the PLC variable on every PLC cycle. If current tank level < (PLC variable + a tolerance) then enable alarm. You need the tolerance to prevent spurious alarms. You could also update the PLC variable if the current tank level > PLC variable (i.e. if tank is being filled then update the PLC variable to the new level).

The only thing is that you'll get the alarm when you're emptying the tank. But there are ways to mask this depending on how the tank is being emptied.

 
Thanks, it makes sense and I can figure out how to mask it when emptying but I'm not sure how to create the PLC Variable for each cycle.
 
I'm not sure what PLC you're using, but can you assign the tank level to a PLC memory address (variable)? Usually there are Data Files or Variable configuration set-ups where you can configure the PLC memory locations as variables.

You only need one PLC variable and you should set up an integer variable.

Then in the rung of ladder:

|---[TIMER COMPLETE]-----------(MOVE CURRENT_TANK_LEVEL TO PLC_INTEGER_VARIABLE]----|

 
Yes, there is Data file function. That should do it. Thanks again for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor