Greetings nqn827 ...
this is probably nothing to worry about – but since you're asking about things like "Power-Up Handlers" there is a possible issue that you might want to think about ...
consider that there can be a significant difference in how the processor responds to a full "power FAILURE" – when compared to its response to a brief "power FLICKER" ...
the point is that in most PLC systems the processor can continue to scan its ladder program for an additional second or two AFTER the line power feeding the processor dies ... (the buzzword here is "power supply holdup time") ... a potential problem arises IF (that's a big IF) a field input device to the processor reacts to the power failure by incorrectly responding as an OPEN circuit ...
an example: suppose that an input switch is being fed by a 120VAC power line ... suppose that the switch is presently CLOSED ... suppose that an XIO instruction in the PLC processor's program regards the input signal as a FALSE condition ... let's assume that this situation is the "normal" running condition for the system ...
so - the sun is shining - the birds are singing - life is lovely ...
now suppose that a plant-wide power FAILURE occurs ... in most systems, the 120VAC power source to the input switch will drop to ZERO instantly – but (and here's the tricky part) the PLC processor may continue to scan its program for an additional second or two ... it does this because its own power supply "holds up" the backplane power for a brief period ... now then, during those "extra" scans, the processor will erroneously see the input from our sample switch as a TRUE condition – not as the "normal" FALSE condition that we described above ...
so ... what effect will this have on your system? ... if the answer is "nothing" then you don't really need to worry about any of this ... party on ... on the other hand, in SOME systems, this erroneous input signal could be catastrophic ... specifically, consider that the switch did NOT really get actuated – but the PLC processor (bless its little heart) sure THINKS that it did ...
now then ...
a properly implemented "Power-Up Handler" can indeed come in useful in situations like this – by having the system respond in a graceful manner to a sudden "LOSS of POWER" which occurs while the processor is in the Run mode ...
BUT ... (and now to my major point) ...
suppose that instead of a full "power FAILURE" we only have a brief "power FLICKER" ... specifically, suppose that the power goes off just long enough for the processor to erroneously see our "closed" circuit as an "open" circuit instead ... BUT (and here comes trouble) the power was NOT off long enough to trigger the "Power-Up Handler" into operation ...
specifically, it's quite possible to program a Power-Up Handler which will work flawlessly in cases where the power FAILS and is off for more than a few seconds ... BUT ... that very same Power-Up Handler might not work at all in cases where the line power only FLICKERS off for something less than a few seconds ... oops! ...
many (most?) programmers never even consider situations like this ... and honestly in many (most?) applications the potential for a problem doesn't amount to a hill of beans ... but in other applications, there could certainly be some serious ramifications to the effect that I've just described ... (your mileage may vary) ...
I've attached a screen shot of a quick two-rung "test program" below that might help demonstrate what I'm talking about ... the conditions shown are the result of just "flickering" the power off for one or two seconds ...
notice that the test rung in the top window saw the field input as an OFF signal for 691 scans through the program during the brief "flicker" ...
but also notice that the test rung in the bottom window shows that the Power-Up Handler was NOT triggered into operation ...
so now the big question:
in YOUR particular system would an erroneous signal from a field device be possible in a "power FLICKER" situation? ... and more to the point – would that erroneous signal be something to worry about? ... depending on your answer, you might need to go further than just programming in a Power-Up Handler ...
finally ... if you're interested in this topic, you can find a few more examples in Email Quiz #121 – linked from the "Sample Lessons" page of my website ...
I hope this was helpful – or at least mildly entertaining ...