
ssweber (Customer) asked a question.
Catching common ladder logic bugs
I probably program a new click project once or twice a year. It's not my every day job. And every time I do, I can't believe all the simple ways I write bad code.
"Why isn't this working?"
- |--[ Mode < 1 ]--[ Mode > 3 ]--------( InvalidMode )--| accidental AND
-
- fixed (OR):
- |--+--[ Mode < 1 ]--+----------------( InvalidMode )--|
- | | |
- | +--[ Mode > 3 ]--+
-
- |--[ Setpoint > TD1 ]-----( Done )--| "setpoint is greater than... wait"
-
- fixed:
- |--[ TD1 > Setpoint ]-----( Done )--|
If you're like me, these actually cost you time finding & fixing. I've found some in my machines that have been running for years!
The new version of ClickNick has a new 'Check Program' button that catches a bunch of common issues like this. Hope it helps someone here. see https://pyrung.com/clicknick/tour/checks/