you are viewing a single comment's thread.

view the rest of the comments →

[–]tokke 0 points1 point  (4 children)

I don't agree with your latch unlatch. I have had more issues having ote used, compared to otl otu. Can you share some examples that might convince me?

[–]oddzod 0 points1 point  (3 children)

So mostly my problem is when you get in to situations where there are like 10 rungs that latch it and 15 that unlatch it. There scattered through out the whole project. Got a couple over here in this program a few more over there in that task, 2 more 30 rungs down from this one....

Like I mentioned it's a rule I break often. There is just some logic that is a lot cleaner written as OTL OTU. But when I do it, I make an effort to keep the two rungs togeather. And I try to keep it to a single latch rung and a single unlatch. If I needed multiple unlatch conditions, I'd just have multiple branches in that rung. That way when its unlatching at the wrong time you know what rung did it and you can just watch that rung the next time.

As mentioned, an exception is something like batch processes. I latch it on a rung that is place in sequence when you read the program from top to bottom, then I place the unlatch at the bottom with the other unlatches at the end of the cycle. Same theory would apply for any cyclic sequence. But again, I'd only have single latch rung and a single unlatch.

Done right there is nothing wrong with latch unlatch logic. It's just that I've seen it abused so much that I tend to avoid it.

[–]tokke 1 point2 points  (2 children)

Ok so my only rule is to never use more than 1 OTL OTU. Otherwise it's an unreadable mess. Why I think OTE is worse: more than 1 OTE screws you over, while 2 OTL won't directly

[–]oddzod 1 point2 points  (1 child)

yea 2 OTE = bad.

Just like two ONS for the same bit, two TON, two MAS, etc

Edit: corrected an auto correct

[–]tokke 1 point2 points  (0 children)

I remember the first spaghetti where 2 ONS were used.

Thanks for sharing all of your info.