PLC code for the water purification plant