Automatic tank filling, written in CODESYS
Manual and auto modes, high and low level switches, latching, an emergency stop, interlocks, and a timeout alarm for when the tank simply refuses to fill. I wrote seven test cases and the logic passed all seven in simulation.