skeet
Lifetime Supporting Member
A lot of what I'm reading is kinda what I do a lot of, latching bits to signify "states" of the machine during the various processes...
I worked for a packaging machine company. The program used latch bits to sequence thru the complex program and was written by a mechanical engineer. We received many positive comments from the users about the readability of the program.
Isn't that what it's about?
I have no clue how to read the code you posted. Here's my example.
The first two rungs show bit N7:0/0 being set with a digital input and being held in with a seal branch. The second two rungs show that same bit being set with a digital input and held in by being a Latch coil. In both cases, input I:1.0/1 will unset the N7:0/0 coil.
Using the seal circuit method in the first two rungs, coil N7:0/0 will not be on after a power cycle. Using the Latch-Unlatch method in the second two rungs, it will. N7:0/0 is a retentive data type.
I also could have just used the I:1.0/1 in the seal circuit directly it makes no difference.
The problem with latch instructions is that they introduce a lot more scan order dependency issues.
I avoid them at all costs, they make commissioning and troubleshooting a hundred times harder. Its is also an indication that most beginner PLC programmers use them constantly, whereas more experienced programmers avoid them.
Sometimes you cannot avoid them, but unless you cant find an alternative, I would not use them.
Pmf, but what the hell is a manual latch and a seal in latch? Are you guys talking about latching on an ote instruction? I guess i didnt realize people just used otl and otu to write a whole program. That does seem quaint and foolish. I appriciate the feedback.
This thread is full of superstitious nonsense.
What is "Pmf"
See picture for a seal in latch ( or manual latch if you prefer)
Nothing quaint or foolish about "OTL" or "OTU" you just have to understand the differences and use them cautiously.
Mickey i that is short for "Pardon My French"
----| |---+---|/|---( )--
x | y b3/1
|
----| |---+
b3/1
---| |---(L)--
x b3/1
---| |---(U)--
y b3/1
Need to remember through a power loss? Use a latch, otherwise seal it. (but never a real output, thank you)
But isn't that irrelevent? If 3.1 is used to set an output true, then the output is effectively latched.
It always comes down to knowing how to use the instruction set properly and writing code properly.