x02 c0 -----| |---------------------(SET)------ x02 c0 -----| / |---------------------(RST)------ x01 c0 c1 -----| |-----| |-----------(SET)------ x01 c1 -----| / |---------------------(RST)------ c1 y0 -----| |---------------------(OUT)------ _______ -------------------| End |-------------- ------- x01 = Sensor for high water level x02 = Sensor for low water level c0 = Water level low variable c1 = Indicates that the we whant to fill the tank y0 = the actual motor that fills the tank Bit Sate 0 0 1 0 1 1 --x01--x02- --x01--x02- --x01--x02- | | | | | | | | | | | | |''|''''|'| | | | | | | | | | | | |'''''''|'| | | | | | | | |'''''''''| |_________| |_________| |_________| Process State 1 2 3 In process state 1 the waters sensors indicate that there are water in the tank by being of. In process state 2 sensor x01 tells the plc that it is not touching water we don't want to fill the tank yet. In process state 3 both x01 and x02 tells the plc that they are not touching any water. Now we want to fill up the tank line 3 sees that x02 is on an that the water level low variable is on, so it requestss for the tank to be filled by setting variable c1 to on line 5 puts the fill motor on. As the water fills sensor x02 tells the PLC that it sees water and turns off the water level low variable, the tank still fills up despite of line 3, because we set the variable c1. After 'n while the sensor x01 sees water an turns the Fill Tank variable c1 off. And this stops the motor in line 5.