Midweek PLC Musings

There was some commentary about function block programming and its suitability for the application at hand. It might be useful to offer the following for discussion: Right at the very beginning of my upcoming PLC Coding Standard, in the Audience Guidelines section, I’ve positioned this topic:

§ AG-1: Address the Right Audience

The PLC code must be written to address the audience who will maintain and work with the application.

Reasoning:

·        Maintenance and operations support staff who are tasked with troubleshooting and making improvements later on, are the target audience who need to understand the code.

·        It will do no good to claim these individuals do not have the education required to understand the code. It is up to the solution provider to determine the appropriate complexity.

·        The PLC code must not be written in such a way that it address other knowledgeable programmers as the audience.

From what I have experienced, this very much contrasts with the way most PLC program providers justify their methods. They are addressing their equals. And I’m sure it is not done maliciously, it’s much easier to assume the people you are providing your solutions for are your equals. But it does neither them, nor you much good in the long term if your solutions are deemed to be too difficult to maintain! So it is my suggestion to establish a rapport with your client, to discover what their support staff’s level of comfort is with the code you provide. Yes, it will take some back and forth, but it will be a much longer sustainable business model.

And then, much further down in a section on what not to do, I offer the following rule:

§ PN-11: Do Not Build AOIs to replace normal LD Rung Logic

Where AOIs (Function Blocks) are created they should contribute something to the understanding, methodology or standardized use, not simply hide otherwise simple logic inside a block.

Reasoning:

·        The temptation to build clever function blocks that only exist to replace simple ladder logic rungs is to be discouraged.

·        Generating logic by scripting, or other automatic means, when applied to simple ladder logic, to build these into AOIs for the programmers convenience is to be avoided.

·        AOIs are harder to understand, troubleshoot and edit. So their use must be justified by benefits such as standardization, reduction of complexity, providing a useful interface, re-use of tested and proven code.

This guideline I felt compelled to contribute because of the increasing use of function blocks I see used, that contribute nothing but making the programmers life easier – and at the same time making the maintainers life a lot harder. This is the sort of thing that happens when work is executed without guidelines, and you just have to live with the way the work was supplied. That’s a miserable way to live. But then, you get what you pay for and what you contracted for…

What’s your experience? Do you have guidelines you have found valuable that you would like to see included?

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

Hugo Ahrens的更多文章

  • 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

    Truth And Fake News Those of us still using Ladder Logic during some part of our day have a great advantage over the…

    2 条评论
  • 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.

社区洞察

其他会员也浏览了