In this article PLCGurus.NET member and contributor, Tony LeRoy, is back! Get ready as Tony shares what he believes are the Keys to Good Programming. It will be interesting to see if you agree with Tony, or have anything to add. If so, be sure to leave Tony a comment at the end of the article…enjoy!
Most of the time a PLC programmer is part of a team that builds a system whether it be pump stations, palletizing cells, assembly stations, or even data collection systems. One key skill that will set apart a programmer from his counterparts, is understanding the equipment that you are programming for.
It is one skill that is taken for granted, and sometimes even surpassed. With good enough project planning, detailed descriptions of the process, and a detailed I/O list, a very skilled programmer can design a program, test on a simulator, send it, and not even see the other parts of the system other than the PLC. That said, I highly advise against this.
In this article, I will be explaining just a few control schemes for different types of equipment and why you should be aware of their operation.
Knowing Your Hydraulic/Pneumatic Symbols
The first example I have is valves. Knowing a bit of hydraulics and pneumatics is a skill that a PLC programmer should at least be familiar with. Hydraulics and pneumatics are used in a wide variety of applications. The main control component that a programmer will be acting with in a hydraulic or pneumatic system will be the valves.
Below is a picture of some schematic symbols for hydraulics and pneumatics that you should be able to identify:
When considering valves, think about the type of valve it is. If your valve is a three-position valve with spring returns, think about the operation of the valve. Two outputs will be needed for this respective valve previously mentioned, with one controlling flow for one direction, and the other controlling flow for the opposite direction. In the initial state, where is the flow going? Or is it a closed center?
All of these factors come into play when programming. If a coil is energized and activates the flow in one direction, we don’t want the other coil on the opposite side of the valve to actuate and possibly cause damage. Therefore it’s good practice to incorporate an interlock in your logic for this situation. If you trigger the output, the output must stay on to hold this position or the spring return will counteract and return the valve to the normalized state.
If using a two-position valve without spring returns, the logic changes in a sense that if the output is de-energized, the valve will keep it’s physical position until the second solenoid is activated and returns the valve to its normalized state.
The Power of AOIs and UDTs
While AOIs (Add-On Instructions) and UDTs (User Defined Types) might be a slightly more advanced concept and topic my personal recommendation is use them when possible.
Personal recommendation: Try and use an AOI or UDT to group the details to a component in a system like in this example.
PLCGurus.NET has published two great videos on YouTube that explain the use of both AOIs (Add-On Instructions) and UDTs (User Defined Types). Instead of me trying to explain them to you in words here, check out the videos below that do an excellent job.
In this video Fred explains how to build and create an AOI for a 2-position cylinder that is pneumatically or hydraulically controlled:
In this video Fred does a great job explaining the power and use of UDTs:
This leads me to the next reason that the system and equipment need to be understood by the programmer…Alarms!
Knowing the Equipment: Alarming
One of the most important parts of a control system is alarms. Alarms can suspend a machine’s operation and save lives, and also save product and equipment. Also, alarms and alerts can be huge for someone trying to troubleshoot a system. When dealing with an alarm, its good to understand what we are alarming for.
One example of this is the water level in a tank. The level is indicated by a float switch, and when it gets to a certain level, the float falls and sends a digital signal back to the PLC. Easy, right? Well, what happens when the water is down, but still in a safe range, and there is turbulence in the water? The float switch can send a false positive. Therefore a timer needs to be put in, just to be sure that the signal is true. If a more accurate method of measuring the tank level was incorporated such as a pressure sensor at the bottom of the tank, then the timer becomes less important (but is still advised).
Understanding the equipment becomes more crucial when you have multiple programmable devices out in the field such as VFDs. Not all VFDs are networked and run off of PLC commands, especially in older systems. If a VFD is running off of digital inputs for start commands and an analog input for a speed reference, it is crucial to understand how that drive has been programmed and how it interacts with a PLC. The VFD could have relay outputs indicating faults or have multiple digital inputs for preset speeds. Without the information of how the drive is programmed, then the connections will mean nothing if you cannot interface with it.
One major part of the controls industry is learning how to control new equipment. Always look at the documentation, technical manuals, and if you can’t find the answer, the forums can help you out!