News:

SMF - Just Installed!

Main Menu

Liquid Tank Built in System

Started by brooksg44, November 28, 2021, 08:34:14 AM

Previous topic - Next topic

brooksg44

Starting to play around with Machine Simulator 3. Created a scene using the Liquid Tank Built in System. When controlling the valves with analog values the level doesn't seem to correlate correctly. It doesn't seem to matter what I set the discharge valve to compared to the inlet level always levels off.  So several questions. What is the maximum value or scale for the analog outputs? Is the code available for Built in Systems, i.e. the Liquid Tank? The Modbus Server I am using drops the decimal point (AutomationDirect Domore). I assume that issue is a Domore issue? Basically, I am trying to duplicate what I have done using FactoryIO with the Liquid Tank.  I want to be able to set the outlet valve to a fixed value and have a PID Controller adjust the level of the tank by controlling the Inlet valve. This makes the tank act like a first order plus dead time process.  If I can accomplish this with Machine Simulator, I could have different tank heights and diameters to have different time constants for simulation. Any help or direction would be appreciated.

EasyPLC_Master

Hi!

The Tank level component is designed to manage and practice the PID PLC programming using this component. You can manage a PID system with this  tank due has all the available devices/sensors to do it:

According with the documentation explained in the Machines Simulator Instruction Guide (pag.48) the Tank works in the following way:

Liquid Tank: this is a device composed by a tank can be filled with liquids (configurable colors) with 2 valves, one for filling an other for empty. There's a radar level transmitter to read the current liquid level in the tank (in liters). The Tank have a maximun capacity of 3000 Liters. Each valve is controlled by a PLC analog output (from 0 to 10V) the  analog value is proportional to the opening / closing of the valve, 0V is totally closed, 10V is totally open. For the drain valve, there is a flow meter that indicates the amount of flow of the liquid coming out of the tank (m³/s). Tank technical details:

Height: 2m.
Diameter: 1.4m
Discharge pipe radious: 0.1m

Take note that you can also to use digital I/O signal to manage the input and outlet valves, but when you activate it, the valves pass to closed (0) to maximun open (10), for more accuracy control is remcommended to use instead, analog I/O to manage the valves with values from 0 to 10.

The problem regarding the ModBus driver is that doesn't manage the decimals, then you must work only with whole numbers without decimals.

Attached is a diagram where are explained the valves & sensor level values indicating the PID connection to the PLC.

Also I recommend you to see the Shane video explaining how to operate the Tank:  https://youtu.be/mLefRGTyzoo

brooksg44

Thanks for the detailed information. Especially, the the pg of manual and pictures of using PID. Watched several of Shane's videos. He is doing a great job in promoting the use of Machine Simulator. This particular video he doesn't seem to be doing any PID control. With this supplied information I will be able to complete my testing. Also like what what Garry of ACCAutomation is doing with Machine Simulator.

brooksg44

I am pretty sure the tank model is not taking into account the static head pressure of the liquid. http://eleceng.dit.ie/gavin/Control/Modeling/Filling%20a%20Tank.htm. The tank is acting like an integrator (Fin-Fout) which is apparent because any time the Inlet Valve is the same as the Outlet Valve are the same the tank levels off. This would be true if the Outlet valve is not set at a fixed position. In other words if both valves were controlled by PIDs. But ideally, I would expect the Tank to act similar to the way it does in FactoryIO. See attached pictures of Machine Simulator and FactoryIO. Noticed that with the Outlet valve set at a fixed position, with PID in manual and manually bumping the output that Machine Simulator acts like an Integrating Process and FactoryIO acts like a Self Regulating Process.

brooksg44


EasyPLC_Master

Indeed, the simulation of the operation of the tank inlet and outlet valves works in a linear manner.

I will take your suggestion in consideration to implement this behaviour as more realistic and will be implemented in the new M.S 3.10 version which will be ready starting next year (within a month or so).

Remember the updates are free for registered users, keep an eye out for new version notifications in our thread:  http://nirtec.com/forum/index.php?board=6.0 to update when it's released

Thanks for your suggestion.

brooksg44

Looking forward to it. Major improvements from when I first looked at EasyPLC 5 years ago.  I recommended the EasyPLC Suite to my current students this morning.  Hard to beat at the current pricing. Keep up the good work.