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. We will apply them to a die stamping application.
1 – Define the task:
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.
2 – Define the Inputs and Outputs:
Master Switch – On/Off
Upper Limit Switch – On/Off
Lower Limit Switch – On/Off
Down Solenoid – On/Off
Up Solenoid – On/Off
3 – Develop a logical sequence of operation:
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.
How to read the Sequence Table: Follow the steps from left to right, top to bottom. Inputs and outputs are labelled 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 development of our logical sequence.
4 – Develop the PLC program:
Look at the sequence table in 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.
5 – Test the program:
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 something 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 programming.
- Define the task
- Define the inputs and outputs
- Develop a logical sequence of operation
- Develop the PLC program
- 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.
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.