I'm going to go a step farther back with Steve Bailey's holdover comment. It really goes back to true relay logic. With relay logic it was very common to have a contact from a Master Control Relay (often the e-stop of the day, right or wrong) supplying power to all of the output logic. This design method was carried forward when PLCs came on the scene the make transposition of ladder circuit diagrams that much easier for early programmers. Now the instruction is just a holdover from early programming environments.
The function of the MCR can be duplicated by leading each rung in the MCR zone with the conditions controlling the MCR zone. So in the most fundamental sense there is no real good use for the MCR construct, especially the way the development environments I have used implement it. There isn't any obvious way to determine if you are in an MCR zone. That can make troubleshooting tricky, especially if you got to a specific rung inside an MCR zone via a serch.
Keith
Blimey Keith, you must have been in one of my classes !!
That is almost word-for-word how I describe my sentiments when discussing the dreaded MCR instruction....
In the A-B world, I don't think it helps that it isn't a
pair of instructions with different names, (like UID and UIE for instance). Nor does it help that the current name for MCR is MASTER CONTROL RESET, and that is arguably
wrong. When the instruction is TRUE, it
enables the subsequent rungs, and when FALSE, it
disables them. To be pedantic, the instruction should be called MCE - Master Control Enable, to better match its function. My memory is hazy on this, but didn't it used to be called Master Control Relay ? That would make more sense of how you construct the logic.
Anyway, as you say, a proverbial nightmare when debugging - you are staring at a rung that is showing Rung Logic Continuity, but the output is off, when it should be on.
My thought process would be....
Rung isn't being scanned.
1. Check that the subroutine is being called.
2. Check that it isn't being JMP'd.
Output bit being turned off elsewhere.
1. Check with cross-reference.
Conclude that it must be being controlled with an MCR.
1. Call up the Search facility, reconfigure it to search for Instruction Names, and remember to change the search direction to UP, and search for MCR.
OK, found the problem, MCR zone is RESET for some reason.
Now check that the programmer has done the job correctly, and used a "closing MCR" instruction (some don't, they leave it to the subroutine instruction END rung to do it!!).
1. Call up the Search facility, reconfigure it to search this routine only, remember to change the search direction to DOWN, and search again.
Not found, so assume the programmer was lazy, best to put one in so that anyone adding code to the end of this routine at a later date can clearly see that an MCR zone is implemented.
As a maintenance engineer, I'm not allowed to make changes, other than specific "corrections" to existing code, so decide not to bother adding the unconditional (closing) MCR rung, because it would mean a raft of paperwork, and I'd have to revisit the plant area to do the job, so just ignore the omission.
As already mentioned, whatever "permissives" are used on the opening MCR rung, I would put on every rung controlled by them, at least I will be able to see immediately why my output bit isn't on.