steps plc program development

Five Steps to PLC Program Development

Programming a PLC can sometimes be a daunting task. The best method is to break the task into some smaller steps. These are the steps that I have used for years to develop PLC programs. We will apply them to a die stamping application.

Step 1 – Define the task:

What has to happen? This is written down and summarized. You may have to ask several different people how the machine is to operate. Going back to individuals when there is a conflict on specific aspects of the operation. This step is number one for a reason with PLC program development.
steps plc program development

A master switch is used to start the process and to shut it down. Two sensors: an upper limit switch that indicates when the piston is fully retracted and a lower limit switch that indicates when the piston is fully extended. When the master switch is turned on the piston reciprocates between the extended and retracted positions. This is achieved with an up and down solenoid. When the master switch is turned off, the piston returns to the retracted position, and all solenoids are off.

Step 2 – Define the Inputs and Outputs:

Based on the information in step 1, you determine the inputs and outputs to the PLC required to develop what has to happen.

Master Switch – On/Off
Upper Limit Switch – On/Off
Lower Limit Switch – On/Off

Down Solenoid – On/Off
Up Solenoid – On/Off

Step 3 – Develop a logical sequence of operation:

This is where the majority of time is spent in PLC program development. Steps 1 and 2 allow you to systematically express what has to happen in the PLC program. Based on the logic, you may have to modify the inputs/outputs or sequence of the program. This is the easiest place to make changes.

This can be done with the use of a flow chart or sequence table. You can use anything to fully understand the logic of the operation before programming. Many people do not use this step and jump straight to programming.

Fully understanding the logic before starting to program can save you time and frustration.

Sequence Table: The following is a sequence table for our die stamping application. I usually review this sequence with the person with the most knowledge of the machine. This can be the designer and/or the machine operator.
steps plc program development

How to read the Sequence Table: Follow the steps from left to right, top to bottom. Inputs and outputs are labeled as 1 (ON), 0 (OFF) or X (Does not Matter). Step 1 indicates that it does not matter the upper and lower limit switch positions. The master switch is off, so the up and down solenoids are off. Steps 3 and 4 repeat themselves as long as the master switch is on.

Note: You will notice that at step 2 after the master switch turns on the up solenoid will be activated. So the piston always retracts when the master switch is first turned on.  This operation was picked up in the development of our logical sequence.

Step 4 – Develop the PLC program:

Utilizing the above steps, we will now actually write the plc program. This can be in several different languages. In our case, ladder logic will be used.

Look at the sequence table with respect to the following logic. I have used Set and Reset conditions so it is easily followed by the sequence table. When the master switch turns on the up solenoid is activated. Notice the first rung is a direct correlation. Follow the rest of the sequence table with this ladder logic.

steps plc program development
Document, Document, Document This is a vital part of every program, which will save you time and money when you have to return to the program years later.

Step 5 – Test the program:

Test the logic that you have developed. Once again the previous steps are helpful in this process. PLC program development testing is an important step to test for all conditions of the logic. (Power Cycle, Sensors Fail, Safety, etc.)

steps plc program development
Test the program with a simulator or actual machine. Make modifications as necessary. Check with the people most knowledgeable on the machine, to see if it is doing what they expect. Do they need anything else? Follow up after a time frame to see if any problems arise that need to be addressed.

These five steps will help you in your PLC program development.

  1. Define the task
  2. Define the inputs and outputs
  3. Develop a logical sequence of operation
  4. Develop the PLC program
  5. Test the program

The five steps form the basis of all PLC development. You will notice that the actual programming does not occur until the second last step. Usually, more time is spent on understanding the task and sequence of operation.

Watch on YouTube: Five Steps to PLC Program Development
If you have any questions or need further information please contact me.
Thank you,

If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII, and Floating Point.

To get this free article, subscribe to my free email newsletter.

Use the information to inform other people how numbering systems work. Sign up now.

The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.

6 thoughts on “Five Steps to PLC Program Development”

  1. This is some really good information about plc programs. It is good to know that you need to know that you need to use ladder programming. This seems really difficult and it does seem like a good idea to have a professional handle any programing.

  2. Hello Garry,
    Thanks for all of the very useful information you provide on your website. I was wondering if you have any examples of a sequence table that would have process information as an input and pwm as an output. ie PID control. Lets say I am trying to control water temperature as an output and I have a heater that is pwm controlled and I can also control the pump flow with a flow meter as an input. Would you set your inputs up as Temperature < some setpoint, temperature ≥ setpoint and then have an 0, 1, X in the table? Flow < & Flow ≥ setpoint. For the output (pump or heater) would you have a 1 in the cell even though the PWM output can vary %? It would be great if you could provide a sequence table for your PID example (heating the water in the cup). Thanks again for all of the work you have put into your website. The effort really shows! -Barry

    1. Hi Barry,
      Thank you for the comments. I appreciate it. You are correct in your sequence. You would compare your process values for the range and that would indicate if the condition is true.
      I do not have a process sequence, mainly because it would take too long to show in a video. However, the concepts would be the same as you indicated above.
      At the above link, you will see a series that will go over sequencers.
      This series takes you through using discrete inputs and outputs to control traffic lights and cylinders. As we progress we introduce additional methods to solve logic. We look at sequencers in a new way and learn how to write programs to allow users to teach the new sequence.

      Thanks again, Barry.

Leave a Reply

Your email address will not be published. Required fields are marked *