Ladder Logic Program Documentation: Tank Filling System

Program Name: Temp Program: Design a tank filling system with level sensors, pump control, and overflow protection Project: Temp Project for Article Generation Description: Objective: Design a ladder logic program to automatically fill a water tank using a pump and level sensors. Created: 2025-08-21

1. Program Overview

This PLC program controls the automatic filling of a water tank using a pump and level sensors. The primary objective is to maintain a desired water level within the tank by starting the pump when the water level is low and stopping it when the tank is full. The program incorporates safety features to prevent overfilling and allows for manual stopping of the filling process.

Key Functionality and Control Objectives:

  • Automatic pump control based on water level.
  • Start/Stop control of the system.
  • Prevention of tank overfilling using a high-level sensor.
  • Latching logic to maintain operation after releasing the start button.

Industrial Application Context:

This type of control system is commonly used in various industrial applications, including:

  • Water treatment plants
  • Chemical processing facilities
  • Food and beverage production
  • Agriculture (irrigation systems)
  • Manufacturing processes involving liquid handling

2. Detailed Rung Analysis

Rung 1: Motor Start/Stop Latching Circuit

  • What the rung accomplishes: This rung implements a start/stop latching circuit to control the pump motor. The latch allows the system to continue running after the Start button is released, and the Stop button will interrupt power to the pump motor.
  • Input conditions required:
    • Start_Button (I0.0): Must be momentarily pressed to initiate the pump motor.
    • Stop_Button (I0.1): Must be open to allow the pump to run. This is a normally closed (N.C.) contact, meaning it's closed under normal (non-stop) conditions.
    • Motor_Run_Seal_In (Q0.0): The pump motor output, provides the latching seal-in.
  • Logic flow and decision-making:
    1. When Start_Button is pressed (becomes true) andStop_Button is not pressed (remains true because it's N.C.) and the motor is not yet running, the rung's logic becomes true.
    2. This activates the Motor_Run (Q0.0) coil.
    3. Once Motor_Run (Q0.0) activates, the Motor_Run_Seal_In contact, also located at Q0.0, closes providing a seal-in path around the Start_Button contact. Therefore, even after the Start_Button is released (becomes false), the circuit remains active, and the pump continues to run.
    4. If the Stop_Button is pressed (becomes false), the circuit breaks, de-energizing Motor_Run (Q0.0) and stopping the pump.
  • Output actions:
    • Motor_Run (Q0.0): Turns the pump motor ON when energized and OFF when de-energized.
  • Real-world operational meaning: This rung enables the operator to start the pump with a momentary press of the Start button. The pump continues to run until either the High-Level sensor activates, or the Stop button is pressed. The Stop button provides an immediate and direct way to halt the filling process.

Rung 2: Level Sensor Interlock

  • What the rung accomplishes: This rung provides an interlocking mechanism to stop the pump when the high-level sensor activates and to allow the pump to start only when the low-level sensor indicates a low water level in conjunction with the motor run status.
  • Input conditions required:
    • Low_Level_Sensor (I0.2): Must be active (TRUE) to signal that the water level is low. This contact indicates that the tank needs refilling.
    • High_Level_Sensor (I0.3): Must be inactive (FALSE) to allow the pump to run. This is implemented as a normally closed contact and opens when the tank is full.
    • Motor_Run (Q0.0): Must be active (TRUE) to indicate that the pump motor is already running
  • Logic flow and decision-making:
    1. For the pump to run based on the level sensors, the Low_Level_Sensor must be active (TRUE), the High_Level_Sensor must be inactive (TRUE because the contact is N.C.), and the Motor_Run must be active (TRUE).
    2. If the Low_Level_Sensor becomes inactive (FALSE), the motor will not continue running.
    3. If the High_Level_Sensor activates (becomes FALSE), the motor will not continue running.
  • Output actions: None on this rung. However, this rung indirectly affects Motor_Run (Q0.0) from rung 1.
  • Real-world operational meaning: This rung ensures that the pump only runs when the water level is low and the high-level sensor has not been triggered. This prevents overfilling of the tank. The combination of the sensors on this rung, tied to the output (pump) on Rung 1, is vital for the automatic control of the tank's water level.

3. Control Logic Flow

  1. Initialization: The system starts in an idle state. The pump is OFF. The Stop button is ready to be pressed. The Low-Level and High-Level sensors are in their default states based on the current water level.
  2. Start Sequence: The operator presses the Start button (I0.0). This triggers the latching circuit in Rung 1, activating the Motor_Run output (Q0.0), turning the pump ON.
  3. Filling Process: With the pump running:
    • If the water level is below the High-Level sensor, the High_Level_Sensor (I0.3) remains inactive (contact closed), and Rung 2 allows the pump to run, assuming the Low-Level Sensor is active and the pump has already been started by Rung 1.
    • As the water level rises, the Low_Level_Sensor (I0.2) will deactivate (become FALSE) and Rung 2 logic is maintained by the seal-in from the rung 1 logic.
    • When the water level reaches the High-Level sensor, the High_Level_Sensor (I0.3) activates (contact opens).
  4. Pump Shutdown: When the High_Level_Sensor activates (I0.3 opens), the Rung 2 condition becomes false preventing the pump to continue running.
  5. Stop Condition: At any time, the operator can press the Stop button (I0.1), which breaks the latching circuit in Rung 1 and immediately turns OFF the pump.
  6. Restarting: The system can only be restarted by pressing the Start button again after the water level has dropped below the High-Level sensor.

Conditional Logic Explanation:

  • The pump motor (Q0.0) will only run if the Start button has been pressed (and latched), the Stop button is not pressed, the water level is below the high-level sensor, and the low-level sensor is activated.

Interlocking and Safety Logic:

  • High-Level Sensor Interlock: The High-Level sensor (I0.3) is a critical safety feature. It ensures that the pump stops automatically when the tank is full, preventing overflows.
  • Stop Button: Provides an immediate and reliable method for the operator to stop the pump in any situation, including emergencies.

4. System Behavior

Normal Operating Sequences:

  1. Tank is partially filled.
  2. Start button is pressed.
  3. Pump starts filling the tank.
  4. Tank fills until the High-Level sensor is activated.
  5. Pump stops.
  6. Water is used from the tank, lowering the water level.
  7. Repeat steps 3-5 as needed.

Start-up Procedures:

  1. Ensure all sensors are properly connected and functioning.
  2. Ensure the pump is properly connected and powered.
  3. Verify the water level is below the High-Level sensor.
  4. Press the Start button.
  5. Observe the pump starting and the tank filling.

Shutdown Procedures:

  1. Press the Stop button to immediately halt the pump.
  2. Alternatively, allow the system to fill the tank until the High-Level sensor activates and the pump stops automatically.
  3. For maintenance, disconnect power to the PLC and pump.

Emergency Conditions:

  • Tank Overfill (Sensor Failure): If the High-Level sensor fails to activate when the tank is full, the operator must immediately press the Stop button to prevent overflow.
  • Pump Malfunction: If the pump malfunctions (e.g., runs continuously), press the Stop button and investigate the cause of the malfunction.

5. Technical Analysis

Logic Complexity Assessment:

The ladder logic is relatively simple, utilizing basic start/stop latching and interlocking concepts. The program is easy to understand and maintain.

Performance Considerations:

The program's performance is not critical, as the filling process is relatively slow. The scan time of the PLC is unlikely to be a significant factor in the system's operation.

Scan Time Implications:

Given the limited amount of logic, the impact on scan time is negligible. A typical PLC should be able to execute this program within a few milliseconds.

Memory Usage Analysis:

The program requires a minimal amount of memory due to its small size and simple structure.