Sparkyman1
Member
What do you guys think of the use of duplicate destructive bits for the ONS tags? This exact same setup is used in many other places in the program, it hasn't ever caused a problem, just curious about everyone's opinion.
Totally absurd piece of code - way overkill !
I'm happy with the pushbuttons (from the HMI) and their respective OTU's, but....
If Roaster05 is disabled - it can't be enabled, and vice-versa, so why have separate bits for enabled and disabled ?
And there's no need for One-Shots at all....
Here's my take on it, tested, working, although I don't see why you need the "Disabled" state bit, you can just use XIO Enabled...
EDIT : You don't need the 3 instruction on the first two rungs either.....
I think that the duplicate ONS bit is required to make it function. It looks like the "EnablePb" toggles the "Enabled" bit on and off and the "DisablePb" toggles the "Disabled" bit on and off. I think that the ONS storage bit is still on when it gets to the second branch (the OTU one). This prevents the "Disabled" bit from being unlatched immediately.
I'd be careful about implementing that logic. Just because "Enabled" and "Disabled" have opposite meanings in the English language doesn't mean that they are used that way in the PLC program.
That being said, it does seem like an odd way to have the original program, and probably adds a lot of unnecessary complexity (the fact that the OP is asking questions about it is an indication of that) to the program.
I would change the second use of the ONS for each rung into an XIO.
Then it would be a fairly common flip-flop circuit.
AgreeThat's only if that was the intention....
That's only if that was the intention....