Develop a PLC code to control the following process control, HL sensor is No, and LL Sensor is Nc, add Start/Stop/Reset as required.

 Fill the tank if it is empty or stopped.
 Close the inlet valve if the tank is full.
 Heat up the liquid to the set point temperature.
 Start the internal agitator for 60 sec.
 Discharge the mixture.
 Draw the IO modules.
 If the operator did not reach the setpoint temp for 2 min, shut down the whole process.
 This process should be repeated 8 times only.

The PLC code below describes the required process control steps, assuming that there is an inlet valve, an outlet valve, a heating element, and an agitator, and that HL and LL sensors are located at the top and bottom of the tank respectively. IO addresses will be used for simplicity.

Inputs:
I0.0: Start
I0.1: Stop
I0.2: Reset
I0.3: HL sensor (NO)
I0.4: LL sensor (NC)

Outputs:
Q0.0: Inlet valve
Q0.1: Outlet valve
Q0.2: Heating element
Q0.3: Agitator

Timers:
T0: 2 min timer
T1: 60 sec timer for agitation

Counters:
C0: Counter for 8 repetitions

PLC Code

```
Network 1:
(Start)_I0.0----+-----( )I0.1------------(RES)C0
|
+-----( )T0.Q------------( )C0----(END_PROCESS)_Label

Network 2 (Fill tank):
( )I0.3----------( )Q0.0
( )I0.4----------(NOT_FILLING)_Label

Network 3 (Close Inlet Valve when full):
( )I0.3----+----( )I0.4----( )Q0.0
|
+----( )Q0.0----(FULL)_Label

Network 4 (Heat up liquid):
(FULL)_Label----( )Q0.2

Network 5 (Start agitation if the setpoint temperature is reached and timer inactive):
(SP_TEMP_REACHED)_Label----+----( )T1.Q----( )Q0.3
|
( )T1.Q----+( )Q0.3----(TIMER_AGITATION)_Label
|
+----(AGITATION_DONE)_Label

Network 6 (Agitate for 60 seconds):
(TIMER_AGITATION)_Label----(TON)T1

Network 7 (Discharge the mixture):
(AGITATION_DONE)_Label----( )Q0.1

Network 8 (Check setpoint temperature):
(SP_TEMP_REACHED)_Label----(RTO)T0

Network 9 (Shutdown process for not reaching setpoint temperature in 2 minutes):
( )T0.Q----(END_PROCESS)_Label

Network 10 (Counter for 8 repetitions):
( )T0.DN----(CTU)C0

```

IO modules can be drawn as below:
```
-------------------------
| PLC CPU Module |
-------------------------
-----------I O-------------
| Input Module |
| I0.0: Start |
| I0.1: Stop |
| I0.2: Reset |
| I0.3: HL Sensor (NO) |
| I0.4: LL Sensor (NC) |
--------------------------
-----------I O---------------
| Output Module |
| Q0.0: Inlet Valve |
| Q0.1: Outlet Valve |
| Q0.2: Heating Element |
| Q0.3: Agitator |
-----------------------------
```