I am wondering why at Rung 24 (HMI COMMAND RESETS), there is no XIC in input side and the OTUs, which includes ManC, are connected directly like this. Maybe this is the cause, it is unlaching all the time.
There's no need for an XIC before the OTU. By scan order, all the actions ManC needed to perform (setting ManS and resetting AutoS) were taken care of above. This rung is just clean-up housekeeping so that, when the next command comes in, it acts on it.
Note that the rung says, "
HMI Command Resets". It is likely that the original intent (and perhaps current execution) is to have the HMI set the Auto and Man
Commands to put the valve in the Auto or Man
State (or rather, Auto or Not Auto). What the sequence is doing, as I stated above, is to act like an HMI pushbutton, sending a value of 1 to the "Valve Controller" which then clears the bit.
If that function still exists, on some valve pupup on the HMI, then your OTE coils are going to screw up the HMI. The HMI operator could potentially push the MAN button, setting ManC. But that '1' in ManC could hit your OTE when the sequence isn't running, and thus get reset so that when it hits the AOI, there is no '1' from the operator to go into ManS. Or they might successfully go into Man, but hitting the Auto button would hit the OTE and he wouldn't be able to go back to Auto -- only the PLC can do that.
Again, you'd be better off using OTL's in the logic in your first post rather than OTEs for this reason. They'll still twinkle, but it'll be clearer why -- that logic will set the bit; the AOI will reset it.
I am at a loss to understand why you have any ManC coils in your first post. The Auto state has the valve listen to a "AutoCtrlC" bit (rungs 9&10, since AutoCtrlS = AutoCtrlC) while the Not Auto state listens to OpenC and CloseC commands. I would expect your logic would be a lot cleaner if you have a single AutoCtrlC OTE (not a series of OTL / OTUs in this case -- that would be really poor programming) to say when the automatic sequence(s) want YV-xxx to be open (and closed otherwise).
Perhaps you plan to use a bunch of OpenC and CloseC commands. But again, if you do, those are going to act like "HMI commands" -- set by the sender; reset by the receiver.
And I cant edit this AOI logic.
Two possible reasons for this:
A) the original programmer didn't want to get blamed if someone edited his master code, breaking every other valve in attempt to "fix" one, and so password protected the AOI, allowing "Look, but don't touch".
B) you're trying to edit the AOI while online. AOIs can only be edited offline and then compiled and downloaded to the processor. (Most likely).