Automatic Tank Level Control with PLC
Automatic liquid level control system for an industrial tank, implemented on a Siemens S7-1200 Programmable Logic Controller and validated against a three-dimensional virtual plant. The architecture integrates three environments: TIA Portal for engineering and Ladder programming, S7-PLCSIM for controller emulation, and Factory I/O as the 3D plant providing process physics - tank, analog level sensor, flow sensor, and proportional inlet and outlet valves. Analog signal handling uses NORM_X and SCALE_X blocks, converting the raw 0-10 V range from the input card into 0-100% engineering units, letting the control logic reason in fill percentage rather than voltage. Control is On-Off with hysteresis: below 20% the inlet valve opens fully, above 80% it closes, and the dead band between the two limits is what prevents actuator chattering - the same principle that preserves mechanical valve life in a real plant. A manually actuated outlet valve simulates process consumption, making it possible to verify that the system automatically resumes the filling cycle once the lower limit is crossed. Integration required non-trivial hardware configuration: offsetting I/O addresses to avoid collision with the simulator, enabling PUT/GET access on the controller, and importing the synchronization library into the OB1 block.