Friday, November 28, 2014

A Different PLC !!!

I'm taking a break from the historical narrative. One reason is that I am still working for the company I moved to as mentioned at the end of the previous post (over 30 years now) and feel that I would unfairly edit my posts. But I'm near retirement, so the updates won't be long in coming And I will try to update more often.

Over my career using PLCs (and I must say, I didn't PLAN it, it just kind of fell in to place) I have dealt with many different manufacturer's PLCs. The first major shock to any PLC programmer is not the learning of the first PLC but, when confronted with the next PLC realizing that they are DIFFERENT!

So let's discuss items which appear common to PLCs:

They accept 'Inputs', which is data from an outside source. This may be 'discrete' (On/Off) or 'analog' (a value within a range of numbers which reflects the level of a continuous measurement). The 'analog' or numeric information may also represent 'text' or other information. 'Analog' will be used to refer to any information represented by more than one 'bit'. The information may come from local hardware or from remote hardware via some sort of communication.

The 'Inputs' are referred to by a variety of names and stored in various formats. The important thing is, while you must understand how the current PLC references or stores this information, you must not get obsessed that this must be the ONLY way that this information can be referenced or stored.

In like manner 'Outputs' is data sent to an outside location. Again this can be discrete or analog information. It may be sent to local or remote locations. Remember the same warning about being obsessed over the naming or storage.

Next there is information stored 'Locally'. This, again, may be discrete or analog. This is information stored from current or previous states in the PLC. It is useful, when combined with future 'inputs' to generate useful 'outputs'. As in the case of the other two categories, do not develop an extreme affection for one particular nomenclature or method of storage.

Next there is the programming 'language'. In general the programming language provides a structure for transforming current 'Inputs' and 'Local' information into new 'Local' information and/or 'Outputs'. Prepare to be open to different languages.

In conjunction with the 'language' are the available 'instructions'. These are the individual operations which may be performed to implement the 'transformation' I mentioned in the previous paragraph.

You may wonder why I didn't include 'Timers' and 'Counters' in the 'Local' information. In the PLCs I've used most of the 'Counters' and 'Timers' are instructions which interact with stored data to provide their function.

In a very few instances there are separate hardware timing or counting functions which operate external to the particular language or instructions. These are typically more accurate and provide a more precise function than the 'instruction type' timers and counters. These must be dealt with on a PLC-by-PLC basis. Learn how to read manuals.

Why am I being so general in my descriptions? As a programmer you MUST remain flexible. When confronted with a new PLC you need to identify the various areas I have outlined. You must review the language and the instructions. Read about EVERY instruction, even if you don't think it will be needed for the current project. Review any 'help' information including that provided by the PLC manufacturer's web site.

Please, don't be one of those who can ONLY learn with videos (I see more of them claiming to have this limitation all the time.) You must be open to all forms of information about a new PLC. You must use your imagination and THINK !!

In the meantime look for "BeBop To The Boolean Boogie". I kid you not. This is an excellent reference (both in hardware and in general computer thought processes for the PLC programmer.

More on adapting to new PLCs in the next post. (Thanksgiving weekend - 2014)