horus
Member
Good Evening, All,
Let me first apologize for this becoming something of a rant. I have a sort of a style-related question running around in my head after working today at a pumping station where I am following behind another contractor (who left the job half finished and shall remain nameless in this forum).
Here's the deal: after several days of searching for a problem with "Cooldown Cycle" logic for two diesel powered pumps, I realized that the "cooldown enable" bits for each pump were being commanded from a rung in each pump's file as OTEs, but that another file in the program (Level Control) was commanding the same bits as OTLs/OTUs based on runtime hours. (Yeah, it's an A-B - a Micrologix 1200).
I'm being vague on purpose - here's my question: Should it not be a best practice in PLC programming to use a bit as an output in ONE and ONLY ONE place in a PLC program? Isn't commanding multiple output instructions from multiple rungs addressed to the same bit address just asking for trouble when it comes to maintainability and readability of the overall program (not to mention possible program stability/operability issues this could introduce...)
The more I deal with this particular program, the more I feel like it was designed by committee, or less charitably, that it was not designed at all. I see a lot of "trick" logic that relies on quirks of the hardware to reduce scan time and memory footprint when neither of these is at issue in this application. What I don't see is any indication that the previous programmers had anything resembling a clear vision of what they would be doing with this program in ten or even twenty years.
All that said, I have managed to go through and document this mess, and at least get it doing what the customer wants. It's in my mind, though, that I should probably look at doing a total re-write after the theory of operation is well documented and defined. but part of me leans toward the "if it ain't really broke, don't fix it" direction.
So... am I right about what I think should be a best practice, or just being something of a Luddite? To those of you who managed to read this far, thanks for putting up with my ravings - I needed to rant about this somewhere...
Later On,
D
Let me first apologize for this becoming something of a rant. I have a sort of a style-related question running around in my head after working today at a pumping station where I am following behind another contractor (who left the job half finished and shall remain nameless in this forum).
Here's the deal: after several days of searching for a problem with "Cooldown Cycle" logic for two diesel powered pumps, I realized that the "cooldown enable" bits for each pump were being commanded from a rung in each pump's file as OTEs, but that another file in the program (Level Control) was commanding the same bits as OTLs/OTUs based on runtime hours. (Yeah, it's an A-B - a Micrologix 1200).
I'm being vague on purpose - here's my question: Should it not be a best practice in PLC programming to use a bit as an output in ONE and ONLY ONE place in a PLC program? Isn't commanding multiple output instructions from multiple rungs addressed to the same bit address just asking for trouble when it comes to maintainability and readability of the overall program (not to mention possible program stability/operability issues this could introduce...)
The more I deal with this particular program, the more I feel like it was designed by committee, or less charitably, that it was not designed at all. I see a lot of "trick" logic that relies on quirks of the hardware to reduce scan time and memory footprint when neither of these is at issue in this application. What I don't see is any indication that the previous programmers had anything resembling a clear vision of what they would be doing with this program in ten or even twenty years.
All that said, I have managed to go through and document this mess, and at least get it doing what the customer wants. It's in my mind, though, that I should probably look at doing a total re-write after the theory of operation is well documented and defined. but part of me leans toward the "if it ain't really broke, don't fix it" direction.
So... am I right about what I think should be a best practice, or just being something of a Luddite? To those of you who managed to read this far, thanks for putting up with my ravings - I needed to rant about this somewhere...
Later On,
D