Midweek PLC Musings

Truth And Fake News

Those of us still using Ladder Logic during some part of our day have a great advantage over the rest of the poor sods traversing this vail of tears: We have access to a resource only precious few have. Right there on the left rail of our ladder logic, is a pool of ultimate truth. Never to be soiled by conditions, opinions, tweets or other social postings. So far, not even the Russians have been able to dilute it. There is real truth there on the left!

Ok, and then you place an instruction there, on a new rung, say a Compare If Equal instruction. Now the ultimate truth moving into the instruction from the left is conditioned, diluted somewhat, made subject to something. It’s not nice what’s happening to our ultimate truth there. It can only squeeze through, if the two variables that the instruction is instructed to seek out, are equal. And I mean equal, real equal! Not in some approximate sense like North and South Vietnam, or the two Dakotas. No, our truth is particular, right down to the last bit. It will for instance not allow 5.00001 to be seen equal to 5. Nobody would be that fussy, but our truth processors, the PLCs we are privileged to work with are. Most of us have learned not to compare a floating point number to another (or to even an integer for that matter) to detect an equal state. Well, that is a lot more than can be said for a lot of public representatives. But things do not stop there, we are only mid-rung, even if it is a simple one. Once we have a state that we can trust to be either true - or not - we find a good use for it in applying it to do our bidding. We can feed this switching state into an output instruction that will turn on a dime (unlike your typical north american pickup). One instant the output, when fed the truth, turns on and like I said runs your bidding - a motor contactor say (and thereby a motor). And a mere ten milliseconds later when it is discovered that truth no longer matters, the output turns off (turning the contactor and thereby the motor off). Better be prepared for this. Truth is a sharp task master. When an output rapidly turns on and off what is the effect on the real world? The consequences of truth and its opposite should have been evaluated by you. Because the question is - can you and your logic handle he truth?

But, consider this: Some will call this fake news! Because by the time you try to prove that it happened, it’s long gone. If you are real crafty, you can set a trap to prove to yourself and others that it did happen. Some will use a latching instruction, but I have found that applying a counter instruction in parallel with the output provides more information. Now you not only find out if the rung ever turns true (if only for the few microseconds while it is being executed), but you also get an appreciation about how often it happens. But keep in mind that a counter instruction requires a transition from false to true in the rung condition feeding it. So you will only count half of the actual rung-output-true occurrences. You need to set up a counter enable unlatch instruction right after the counter instruction has been executed to count correctly every time the rung is true.

Do you have any experiences with truth or fake news?

Darko Ivanovic

Automation Team Lead | Process Industry | O&G Upstream and Midstream | Extroverted Nerd

5 年

Yes sir, I have experience with fake news...try not having your JSRs, that happens when you sometimes troubleshoot someone's code and you expect proper things to be done.

回复

要查看或添加评论,请登录

Hugo Ahrens的更多文章

  • Midweek PLC Musings

    Midweek PLC Musings

    There was some commentary about function block programming and its suitability for the application at hand. It might be…

  • Midweek PLC Musings

    Midweek PLC Musings

    Last week I regaled you with the ever lasting impact of ladder logic. Turns out I’m not done with that topic, because…

  • Midweek PLC Musings

    Midweek PLC Musings

    In Support of Ladder Logic Not that ladder logic needs my support specifically to keep it alive. It’s doing quite well…

    4 条评论
  • Midweek PLC Musings

    Midweek PLC Musings

    Last week I developed some general thoughts about what you would include in a typical single speed motor control…

  • Midweek PLC Musings

    Midweek PLC Musings

    Thinking about a General Motor Logic Block. So last week we looked at abstraction, and I thought it might be helpful to…

  • Midweek PLC Musings

    Midweek PLC Musings

    Abstraction in Art and the Art of PLC Programming What is it about abstract art that gets so many people unsure…

  • Midweek PLC Musings

    Midweek PLC Musings

    Alternating Logic What are we talking about when confronted with the requirement to discuss something that requires…

  • Midweek PLC Musings

    Midweek PLC Musings

    Back To The Simple Toggle You would think that a simple toggle bit instruction would be one of the simplest items to…

  • Midweek PLC Musings

    Midweek PLC Musings

    Calling a Spade a Shovel In the technical world we live in there is no faster way to discount your trade value - than…

  • Midweek PLC Musings

    Midweek PLC Musings

    Programmers Notebooks, what are they for? No they are not a design tool. They are a memory aid and progress reference.

社区洞察

其他会员也浏览了