Dear all , i have to know the ladder logic for bottle filling system, if the tank is empty the sensor will detect and sends the signal to the plc after that i have to open the valve for water filling in the tank , after tank gets full level sensor detects and sends the signal to the plc , now i have to close the valve . so how can i write the program for these functions? NOTE : Above mentioned all were automated not by manual . please give me some ideas or program. with regards , engineer