TConnolly
Lifetime Supporting Member
+1
I have another way using 19 instructions, but it looks a bit clearer, I think?
By my count you have 27 instructions, not counting the output (or SOR, EOR)
Double click on the rung number to open the mnemonic editor and count them. Branching instructions BST, NXB, and BND are instructions that you cannot ignore as they must be executed and involve storage of rung state in memory, so they do take time to execute.
osmanmom's solution is readable and Bubba can readily determine at a glance what the rung is supposed to do. When I was fresh out of college I applied Boolean reduction on my first few programs. Then after about a year and a half I had to go back and look at one of my own programs and had a WTF moment when I realized that what I was doing wasn't even obvious to myself after a short time. Now I focus on making the job obvious. I've even been known to add extra instructions on an output rung, knowing that the output is the first place Bubba is going to go when troubleshooting and if I can make likely culprits obvious then he won't have to dig through the program to find out why some permissive is not met.
Sometimes it is a fun challenge and I myself like to play around with various clever tricks and hacks, but the older I get the more I hate the 3:00 am phone calls. At the end of every wire is a sensor or actuator and the problem is almost always with one of those and almost never with the program, so the more obvious I can make it the fewer phone calls I get.
Last edited: