and then
#4. YOU HAVE TO EXPECT DETOURS.
With the completed code, you start asking yourself "What-If" question?
"I know what's supposed to happen when the valve sticks OPEN. What if the valve sticks CLOSED?"
How will I know? Is staying at LOW for more than XX time good enough, or should I have a limit switch on the valve so the PLC can compare what's happening to what it thinks SHOULD be happening?
"What if the valve sticks OPEN (or CLOSED). Shouldn't the PLC tell somebody?"
If so, how. Lights? Noise? How will those be turned off once the problem is fixed?
"What if BOTH the valve stick OPEN?!?"
Should I shut down the Pump? Sound the Alarm? And how will I know? HI_LEVEL staying ON for too long?