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 using the wrong terminology in front of people who hold your future in their hands (clients or customers in other words). Yes there is a whole slice of the world with little in the way of understanding what we are talking about when we talk among ourselves. So often we are asked to reduce our technical “mumbo-jumbo”, to make ourselves understood. But, I've come to see, giving in to that is most often a mistake. Because only if your language is precise, can your work be expected to be the same. And maybe those who wish us to simplify - should learn the real meaning instead.
When someone is obviously talking about a PLC program and mentions relay contacts and coils, it immediately calls into question their real understanding of what the PLC is doing. Because, as you know, the are no relay instructions in the PLC! There are “Examine If On” instructions and “Examine If Off” instructions, and there are “Output Energize” instruction. The PLC has instructions and memory locations we more recently have come to call “Tags”. They are not relay contacts nor coils or labels. Lets take a closer look at the Tag and its components. Before we go there, remember the tag is just a reference to a location in PLC memory. It’s just that the PLC hides from us the absolute memory location and shows us the tag name instead. With the advent of ControlLogix, there are now tags and sub-tag components. A tag with a “/“ symbol in the tag name is called a tag with a “delimiter”. The delimiter announces to us that the part to the right of the delimiter is the next smaller sub-element of the tag. If the tag was a DINT (a 32 bit wide word), the characters to the right of the delimiter specify a bit within the word.
There is another delimiter in use, the “.” (period or dot). Here the meaning of the characters to the right of the dot can be a number of things - but what it always is - is a sub-component of a data structure that the tag stands for. So if the tag name to the left of the dot delimiter indicates a timer instruction, as in StartDelay.ACC, the ACC component is a part of the Timer structure - the accumulated value. But if the tag name to the left of the delimiter is an overload instruction, then the tag MainMotorOL.CfgOLtrip is likely a value that is part of the overload object which defines the overload trip setting (likely a floating point value).
There is another set of delimiters, the square brackets “[“ and “]”. These are used to describe individual words in an array structure. So the tag SortSize[12] specifies the thirteenth word in the SortSize array (because arrays start with zero). You can combine the delimiters in fun ways: SortSize[10].2 is a bit level address that points at the third least significant bit in the eleventh word in the SortSize array.
Oh, and the things that you plug into the rack, that the real world signals get connected to, are not “cards”! They are modules. And its not a rack by the way, its a chassis.
Lets not confuse the value of tags with the tag. A tag has a value. So a string tag named ValveLabel, that contains the string “Valve 34” is not Valve 34 - it is ValveLabel. Its content may change. That holds true until you encounter tags that are not really tags but constants. For instance the Source A of a MOV instruction may contain the number 3421. Is that a constant number 3421? Or is it a tag named 3421? It can not be a tag, because tag names are not allowed to start with a number - so it must be a constant.
The left vertical in the ladder logic view in your programming software is not a “power rail”. That’s what it would be called if it was a real relay control system. In the PLC it is called the “logic true state”. If you hear “the power rail provides power through the relay contact to energize the coil” - what should have been said is: “the logic true state is affected by the condition of the examine instruction here, and leads to the output instruction going true”.
Do you have any favourite sloppy expressions you love to dislike?