The P&ID diagram illustrates a batch-mixing process through a single mixing tank. The process involves collecting and mixing two materials, A and B, for a set time. Once the mixing is finished, the product is drained through the outlet valve. Inlet valve 1 is opened when a low level is detected, and the tank is filled with Material A until the mid-level is reached. After the mid-level is detected, inlet valve 1 is closed, and inlet valve 2 is opened to fill the tank with Material B until the tank is full. Both inlet valves will be closed, and the agitator motor will mix the materials. Once thoroughly mixed with materials, the product is drained out through the outlet valve.
To accomplish this operation, three level sensors, LLS, ALS, and BLS, are installed at the tank's bottom, mid, and top to detect low-level, material A, and B levels. Additionally, an agitator connected to the motor shaft controls the mixing. Two inlet valves are used to regulate material A and B levels. The outlet control valve is used to drain the mixed product.
The PLC diagram has five inputs: Start, Stop, LLS, ALS, and BLS, and four outputs: Inlet Valve 1, Inlet Valve 2, Agitator Motor, and Outlet Valve. A timer value, Desired Time, can also be set to determine the preset time.
The PLC ladder diagram for this experiment has three rungs. The first rung includes the latching coil and master start-stop buttons. The second rung operates the Inlet Valve of Material A (Inlet Valve 1) when the Low-Level Sensor (LLS) detects the tank's low level. This valve is closed when the Material A Level Sensor (ALS) detects the tank is full. The third rung opens the Inlet Valve of Material B (Inlet Valve 2) when Material A is filled to its desired level by the Material B Level Sensor (BLS). In other words, the Valve of Material B (Inlet Valve 2) opens when the ALS detects that the Level of Material A is reached. It closes when the BLS detects that the Level of Material B is reached or when the tank is full.
The following two rungs control the Agitator Motor. Upon detecting Materials A and B in the tank, the Agitator Motor is energized, and the ON Timer is activated. The Motor Agitator will start mixing Material A and B for 200 seconds, which is the Timer ON preset. When the Preset Time (PT) matches the Elapsed Time (ET), the Agitator Motor will turn off. The last rung is for the Outlet Valve. It is activated when the mixing process is completed when PT and ET equal 200 seconds. The Outlet Valve is closed again when a low level of Materials A and B is detected.
The runtime test cases for this are given in the following Table. The tests include various sensor scenarios, such as LLS, ALS, and BLS. In addition, there are also tests related to the mixing time of the tank. Considering all possibilities while testing a program is essential to ensure it properly attains the given automation process under different conditions.