so how many worms are there in this can anyway?
Greetings to all:
responding to Roy C.’s excellent points and welcome comments in post #17:
1. Saw example: I am not sure about SLC500 PLC's but in ControlLogix5000 I believe that outputs will stay "sealed" in during prescan. Other Booleans do not but outputs are treated differently.
Roy, I’m not sure that I understand precisely what you’re saying here ... but I just finished trying out exactly the same “saw” and “grinder” program from post #15 on a set of ControlLogix hardware ... and I got exactly the same results as I did with the PLC and the SLC systems ... specifically, after a power cycle, the “sealed-in” saw did NOT come back on – but the “latched-on” grinder DID ... and I also got exactly the same results when I used internal BOOLEAN bits as when I used actual real-world hardware addresses for the rung “outputs” ... please post again and let me know if I’m missing anything here ...
2. Saw example: One note about inputs and power cycles. I have seen a couple of cases where a lot of confusion was caused by the fact that during a total machine power cycle the power supply to the inputs can die before the PLC power supply dies. In these cases the PLC is happily cycling along and interpreting the inputs going off as real events rather than being due to the power going off. Depending on the robustness of the code this can lead to interesting and confusing situations when the power is restored.
an EXCELLENT point (I was hoping that someone would bring this one up) ... and believe it or not, it has a LOT to do with whether the inputs (especially the inputs from normally-closed “stop” buttons) are powered by line-supply AC or by a DC power supply ... that’s right – there are DIFFERENCES between AC inputs and DC inputs ...
basic idea: during a “plant-wide” power failure, the AC line power drops out immediately - while the PLC keeps right on reading the field inputs for a number of scans ... so the PLC gets a chance to see a normally-closed “ON” input as an “OFF” signal ... that will cause the seal-in for the saw example to drop out ...
now let’s compare that to a DC-powered “stop” button ...
during a “plant-wide” power failure, the DC power supply for the inputs does NOT drop out immediately ... hint: think about that big old final “ripple-removal” filter capacitor on the output side of the DC power supply ... so while the PLC keeps right on reading the field inputs for a number of scans, it still continues to see the normally-closed inputs as ON (=1) signals ... that would NOT cause the seal-in for the saw example to drop out ... BUT ... PLEASE KEEP READING ...
the saw example in post #15 would STILL drop out (even with a DC powered “stop” button) if for no other reason than the processor’s PRESCAN routine which would automatically UNseal the saw’s “sealed-in” rung ...
so now let’s go back to post #15 and revisit our programmer “I-love-latches-Greg” and look at the grinder system in more detail ...
for my original grinder example, I had Greg use a “stop” button that was field-wired as a normally-open input ... (frankly I really expected someone to point out that this arrangement is not generally accepted as a good “failsafe” practice) ... so why did I choose a “non-failsafe” wiring method for my example? ... because that way, regardless of whether the power supply to the “stop” button is supplied by AC line power or by a DC power supply, I knew that the grinder would still come back up in the run condition after a power cycle ... I wanted to drive home the fact that “latched-on” and the “sealed-in” logic techniques can behave quite differently after a PLC power cycle ...
but now that we’re ready to dig deeper, let’s suppose that Greg had used a “failsafe” normally-closed “stop” button for the grinder ... and let’s suppose that the power supply for this particular input comes “right-out-of-the-wall” from an 120 volt AC line source ... in this situation the normally-closed “stop” button is usually giving us an ON (=1) signal ... so the XIC instruction on Greg’s “unlatch” rung will have to be changed to an XIO instruction ... once that programming change has been made, then during normal operation the unlatch rung will be false and the grinder will be allowed to run ... when the operator eventually presses the “stop” button, the XIO will be evaluated as “true” and the unlatch rung will stop the grinder ... perfect ... the boss checks it out ... he likes it ... he signs off on the checkout sheet ... life is lovely ...
so now ... how about a plant-wide power cycle? ... place your bets, gentlemen ...
when the power to the plant drops out, the AC supply to the grinder’s “stop” button INSTANTLY dies ... BUT (as Roy C. so wisely pointed out) the PLC processor keeps right on executing the ladder logic for a number of scans ... and (this is the point) the processor now sees the normally-closed field input from the “stop” button as an “OFF” (=0) signal ... and so the XIO on the grinder’s unlatch rung is suddenly evaluated as a “true” condition ... (hint if you need it: as far as the PLC processor knows, the operator reached over and pushed the “stop” button just as soon as the power failed) ... and the program logic tells the processor to unlatch (turn OFF) the grinder ...
that sounds GOOD to me ... I mean who wants the grinder to come back up in the run mode after a power cycle anyway? ... but think again folks: what if this happened to be the RECIRCULATION PUMP for our nuclear reactor instead of the grinder? ... with the setup I just described, the pump would still be turned OFF after a power cycle EVEN THOUGH we really-and-truly desperately wanted it to come back ON after the power cycle ...
interesting side trip: does "failsafe" always mean "go off"? ... it all depends doesn't it? ... sometimes "on" is safer than "off" ... now back to the main line of discussion ...
still with me? ... now let’s go back to post #15 and this time let’s suppose that Greg has once again used a “failsafe” normally-closed “stop” button for the grinder ... but this time let’s suppose that the power source for this particular input comes from a 24 volt DC power supply ... once again, in this situation the normally-closed “stop” button is usually giving us an ON (=1) signal ... and so once again the XIC instruction on Greg’s “unlatch” rung will have to be an XIO instruction ... and during normal operation the unlatch rung will be false and the grinder will be allowed to run ... when the operator eventually presses the “stop” button, the XIO will be evaluated as “true” and the unlatch rung will stop the grinder ... perfect ... the boss checks it out ... he likes it ... he signs off on the checkout sheet ... life is lovely ...
but again ... how about a plant-wide power cycle? ...
this time when the power to the plant drops out, the DC supply to the grinder’s “stop” button does NOT instantly die ... and even though the PLC processor keeps right on executing the ladder logic for a number of scans, (this is the point) the processor continues to see the normally-closed field input from the “stop” button as an “ON” (=1) signal ... and so the XIO on the grinder’s unlatch rung is still being evaluated as a “false” condition ... and this time the program logic does NOT tell the processor to unlatch (turn OFF) the grinder ...
that sounds BAD to me ... but ... regardless of whether it’s GOOD or BAD – do NOT (I repeat: do NOT) miss the point that it is DIFFERENT ... and !THAT! is the point of all of this ... many (most?) programmers do NOT know about this, folks ... most programmers are just interested in getting the darn machine to work ... PERIOD ... seldom (if ever) do they stop to consider what is going to happen in situations where the plant power eventually fails ... (or even in OTHER weird conditions beyond the scope of this post – yes, Virginia, there ARE other boogie-men out there) ...
so just to recap:
A. Greg uses a “stop” button which is field-wired normally-OPEN and is supplied by an AC power source ... when the system is power-cycled, the grinder stays “ON” ...
B. Greg uses a “stop” button which is field-wired normally-OPEN and is supplied by a DC power supply ... when the system is power-cycled, the grinder stays “ON” ...
C. Greg uses a “stop” button which is field-wired normally-CLOSED and is supplied by an AC power source ... when the system is power-cycled, the grinder goes "OFF" ...
D. Greg uses a “stop” button which is field-wired normally-CLOSED and is supplied by a DC power supply ... when the system is power-cycled, the grinder stays “ON” ...
[attachment]
now take a deep breath ... want to play hardball? ... then on to the next post ...