guest,
Of course you can do what you described. Steve, he did say to:
"...make one input turn on 3 outputs one at a time?
Leave one on until the next one is turned on.
Do this without using osr or counter or timer."
And his answer is very close:
"If First Scan - Set FirstScan
If Input and Output 3 or FirstScan - Set Output 1, Reset Output 3, Reset FisrtScan
If Input and Output 1 - Set Output 2, Reset Output 1
If Input and Output 2 - Set Output 3, Reset Output 2"
If I were doing it, I would forget the First Scan bit. Your original instructions say nothing about a first scan being a condition, but only that the Input is a condition. So here is my solution:
"If Input and Output 3 or INPUT AND NOT OUTPUT 1 AND NOT OUTPUT 2 AND NOT OUTPUT 3, then - Set Output 1, Reset Output 3
If Input and Output 1 - Set Output 2, Reset Output 1
If Input and Output 2 - Set Output 3, Reset Output 2"
The above will always start with Output 1, anytime that Input is ON, and progress to Output 3, and then recycle. However, as has been pointed out by rdrast and others, the circuit will run through the logic and switch one output on each PLC scan, so the outputs will switch so fast that you probably will only see an erratic blink (if you watch the LED output indicators) every now and then, even though the logic is working correctly. In other words, it works logically, but has little practical application in the real world. Humans unfortunately cannot see and think as fast as the PLC. I wish I had a dime for every ladder routine that I have erroneously written like this one! To make it into something useful, you need another variable, such as a timer or another input, to control HOW LONG that each output is ON.
Of course you can do what you described. Steve, he did say to:
"...make one input turn on 3 outputs one at a time?
Leave one on until the next one is turned on.
Do this without using osr or counter or timer."
And his answer is very close:
"If First Scan - Set FirstScan
If Input and Output 3 or FirstScan - Set Output 1, Reset Output 3, Reset FisrtScan
If Input and Output 1 - Set Output 2, Reset Output 1
If Input and Output 2 - Set Output 3, Reset Output 2"
If I were doing it, I would forget the First Scan bit. Your original instructions say nothing about a first scan being a condition, but only that the Input is a condition. So here is my solution:
"If Input and Output 3 or INPUT AND NOT OUTPUT 1 AND NOT OUTPUT 2 AND NOT OUTPUT 3, then - Set Output 1, Reset Output 3
If Input and Output 1 - Set Output 2, Reset Output 1
If Input and Output 2 - Set Output 3, Reset Output 2"
The above will always start with Output 1, anytime that Input is ON, and progress to Output 3, and then recycle. However, as has been pointed out by rdrast and others, the circuit will run through the logic and switch one output on each PLC scan, so the outputs will switch so fast that you probably will only see an erratic blink (if you watch the LED output indicators) every now and then, even though the logic is working correctly. In other words, it works logically, but has little practical application in the real world. Humans unfortunately cannot see and think as fast as the PLC. I wish I had a dime for every ladder routine that I have erroneously written like this one! To make it into something useful, you need another variable, such as a timer or another input, to control HOW LONG that each output is ON.
Last edited: