Writing a PLC program anytime soon?
Are you new to programming PLC’s? Well don’t worry, after today you’re going to have a template you can use to build a program for any project on any platform.
This article can serve as a template for beginners, this article/ template will outline almost every common device and or occurrence you should account for when building your program.
While every machine and situation is different and every project requires a different perspective, keep in mind that every one of these algorithms are used in most programs. So rather you need to write code for these conditions or you need to understand the code for troubleshooting purposes, knowing them makes this article essential knowledge for beginners.
Let’s get started;
- Soft Start – these rungs are used to slowly start an air system or even as a low torque motor start for example; conveyors with heavy loads.
- Enable Start – this can also serve as the soft start ready, set of instructions. This set of instructions are latched to indicate that the machine controls, machines controls are energized.
- Nests – if you are building a program with multiple parts nests you are going to have to add code that identifies each part nest. And then write in code that controls the use of each of them.
- Modes – this is the manual and auto selection code. Here you want to ensure the machine defaults to a manually controlled condition when started and that you have the ability to put the machine in an auto cycle.
- Light Curtain – most machines these days use light curtains as their first electrical option for machine guarding.
- Auto/Manual Mode – these rungs give you the ability to choose between an auto and manual control mode.
- Auto Sequence – this routine is where you layout your entire cycle in automatic. You need to be able to walk your entire process through this cycle one step at a time, which then loops back to the start of the auto cycle.
- Machine Faults – this code is where you program for the entire machines faults. Here you need to program for faults that happen at any time during the automation cycle.
- Sensors – this code is for programming all your inputs.
- Outputs – this where you program for any and all of your machines outputs, to include any indicator lights, motors, and solenoids as well.
- Back-check Monitoring – this section of your code is meant to monitor your sensors, at any time, during your auto cycle.
- Bypass – this algorithm is meant to give the machine operator the option to bypass any all inputs.
- Never Cleared – this part of your code is meant to notify the machine operator when any parts put into the machine to be processed didn’t clear from any part of the process. You cannot run new parts if the old parts haven’t cleared.
- Reset – operators need to have the ability to clear any faults after they have cleared the condition causing a fault.
- Home – on many machines there is a home positon for cylinders, dies, and other hardware. This can be both a control algorithm as well as an indicator once all components are in a home position.
- Cycle Start – you will need to accommodate for all the conditions your machine needs to be in before starting an auto cycle.
- HMI Input-Output Status – this is code to use to communicate to the HMI from the entire machine and indicate the IO status on the HMI.
- HMI Manual Control – this code is used as a remote control giving the operator the ability to manually control the machine from the HMI.
- HMI Messaging – this is where you accommodate for any and all conditions you want to communicate. You will write code that posts messages on the HMI to notify the operator of faults, conditions etc.
- Password – many times you will be asked to create a password limiting the control of operator to make changes to the parameters of the process form the HMI.
- Cycle Count – this is pretty clear, right. You need to be able to track the machines cycles. Some managers want you to track productivity per person, per shift per hour, etc.
- Andon Lights – this is code to communicate a machines status, visually. Usually there are at least 3 lights; red means the machine is stopped because of a fault, yellow may mean the machine is stopped but ready to run with no faults and green usually indicates the machine is running.
- Parts Missing – here is where you track a machines readiness for an auto cycle. You may have several people placing parts in a machine or on a progressive production line and this helps you know if all the parts were loaded before pushing your cycle start button.
The Take Away
While these 23 algorithms are considered must know pieces of code that you can use to build a very strong program. They are not a comprehensive list of code you need to know.
Our suggestion would be to consider the most common conditions you can think of to run a machine or sequenced machine and break those conditions down into bite sized pieces of code and then start practicing how to generate that code.
Then save that code by printing a .PDF file of it, save it as rungs and even routines to add to your personal code library. That way when you need to create a program, you can quickly compile a comprehensive program covering the most common conditions needed in no time.
This is how you start programming a PLC like a pro.
With this article we’re hoping we’ve answered some questions, sparked your curiosity and shared some useful information. But, we know you may need more, so we invite you to contact us for some follow up questions or to discuss your unique needs.
Just go to our contact page and reach out to us and we’ll get back to you asap!