Robot Packing PLC Program Development

The Machine Simulator (MS) is a valuable component of the EasyPLC software suite. It offers a range of built-in machines, including the robot packing machine, which effectively demonstrates various programming techniques. We will use the Click PLC programming software to showcase a sequencer application for this example.
In this scenario, the robot is tasked with collecting five bags and loading them into a cardboard box. A logical sequence of steps will be implemented to accomplish this, with a counter controlling the progression. This fundamental approach to programming sequences applies to all PLCs.
Robot Packing PLC Program Development
To program the EasyPLC robot packing machine simulator, we will use the free Click programming software and a Click PLUS PLC. Communication between the software and the PLC will be established using Modbus TCP (Ethernet). The program sequencer offers a convenient and efficient means of controlling the automation system.
We will follow the five program development steps to guide you through the process. These steps will provide a clear and structured approach to programming the sequencer. With that said, let’s dive right in and begin our journey into the world of robot-packing PLC program development.

Learn PLC programming the easy way. See below how to receive a 10% discount on this cost-effective learning tool. Invest in yourself today.
Previously, we have done the following:
Easy PLC Installing the SoftwareVideo
EasyPLC Software Suite – Quick StartVideo
Click PLC – Easy Transfer Line ProgrammingVideo
Productivity PLC Simulator – Chain Conveyor MSVideo
Do-More PLC – EasyPLC Box Selection ProgramVideo
Click PLC EasyPLC Gantry SimulatorVideo
Click PLC Simple Conveyor EasyPLCVideo
EasyPLC Paint Line Bit Shift – BRX Do-More PLCVideo
Click PLC – EasyPLC PLC Mixer ProgrammingVideo
Click PLC EasyPLC Warehouse Stacker ExampleVideo
–  Operation Video
EasyPLC Machine Simulator Productivity PLC Robotic CellVideo
EasyPLC Simulator Robotic Cell Click PLCVideo
Palletizing Conveyor Programming Do-More PLCVideo
Palletizing Conveyor Programming – Click PLCVideo
Product Quality Verification! Do-More PLC SequencerVideo
Revolutionize Learning PLCs with Pallet 3D Sim!Video

Define the task: (Step 1 – Click Easyplc Robot Packing)

The first step of a Click or any PLC program development is determining what must be done. Start the EasyPLC Machine Simulator (MS). Select the start button on the main page or select machines from the main menu at the machines simulator window. All the available machines will now be displayed. Click on the “30 Packing Auto”.
Robot Packing PLC Program Development
This is the example we will be programming. To the left of the screen, information will be displayed on how the robot packing machine needs to function. A conveyor belt supplies bags containing food that must be packaged in cardboard boxes. Another belt supplies the cardboard boxes to fill with the food bags. The objective is to manipulate the automatic packaging system to fill each cardboard box with five food bags. The packaging robot has two working modes: continuous loading or loading in different positions. In the continuous work mode, the PLC must indicate a lowering speed to match the rate of supply of food bags. In the position work mode, once each bag has been loaded, the PLC must indicate a new loading position to the robot so that it lowers and a new bag can be loaded. Use the two photocells installed on the bag conveyor to give the appropriate instructions to the packaging robot. Once the five bags have been loaded, the bag conveyor must be stopped, and the robot’s clamping system must be closed so that the bags do not fall when they are inserted into the cardboard box. At the same time, the PLC must manage the cardboard box conveyor to position it correctly in the loading position, stopping the advance with the stop cylinder rod and using the pneumatic blockers so that the box does not move during the loading operation. Once loaded, release the box to load a new, empty one.
Robot Packing PLC Program Development
The robot packing machine simulator has a demo mode for this built-in machine. This will allow you to watch the operation of the robot packer. Select the demo mode for the packing auto machine. The demo mode will show you the basics of the robot packing operation. Move around the 3D virtual environment.
Robot Packing PLC Program Development
The icons on the top of the window allow you to move around this 3D environment. The first icon is the default selection. This will enable you to move around without bumping into the components. The last icon will automatically show you around this virtual environment. The first-person mode will mimic a person in your 3D learning world. The third person will show you an operator and their relationship to the auto-packing machine. Once we understand what must be done, we can move on to the next step in developing the Click PLC program.

Define the Inputs and Outputs: (Step 2 – Click Easyplc Robot Packing)

At the bottom of the robot packing machine simulator window, the View IO will display the inputs and outputs required for this robot packaging example.
Robot Packing PLC Program Development
While still in demo mode, you can see the operation of the inputs and outputs.
The EasyPLC 30 Packing Auto will require 12 digital outputs and 13 digital inputs. If you are unsure what output or input is doing, start the robot packer machine in Start mode.
Robot Packing PLC Program Development
Select the View IO on the bottom middle of the auto packer machine simulator window. You can manually run the robot packer without any control or Click PLC connection.
Robot Packing PLC Program Development
Clicking on the outputs will allow you to turn them on manually. You can then monitor the inputs to see their operation. The restart button on the bottom of the robot packing machine simulator window will reset the scene back to the start. The following table will define the inputs and outputs (IO) and Modbus addresses in the Click PLC we will use for this program.

Digital Type Description Do-More PLC Modbus Address Machine Simulator Modbus Address
PLC Output – MS Input Work Part Creator (Bags) 16485 – C101 16484
PLC Output – MS Input Cylinder Stop Pneumatic Rod Boxes 16486 – C102 16485
PLC Output – MS Input Robot Load 16487 – C103 16486
PLC Output – MS Input Robot Unload 16488 – C104 16487
PLC Output – MS Input Robot Home 16489 – C105 16488
PLC Output – MS Input Close Grip (Robot) 16490 – C106 16489
PLC Output – MS Input Thin conveyor reverse (Boxes) Work Part Creator 16491 – C107 16490
PLC Output – MS Input Pneumatic Push Advance (Secure Box) 16492 – C108 16491
PLC Output – MS Input Robot Load_1 16493 – C109 16492
PLC Output – MS Input Robot Load_2 16494 – C110 16493
PLC Output – MS Input Robot Load_3 16495 – C111 16494
PLC Output – MS Input Robot Load_4 16496 – C112 16495
PLC Input – MS Output Photocell 1 Signal 16585 – C201 16584
PLC Input – MS Output Empty6 Animation Manager 1 16586 – C202 16585
PLC Input – MS Output Empty6 Animation Manager 2 16587 – C203  16586
PLC Input – MS Output Photocell 2 Signal 16588 – C204  16587
PLC Input – MS Output Grip closed (Robot) 16589 – C205  16588
PLC Input – MS Output Photocell 3 Signal (Boxes) 16590 – C206  16589
PLC Input – MS Output Cylinder Stop Advanced 16591 – C207  16590
PLC Input – MS Output Cylinder Stop Back 16592 – C208  16591
PLC Input – MS Output Button Start ON 16593 – C209  16592
PLC Input – MS Output Button Stop ON 16594 – C210  16593
PLC Input – MS Output Button Emergency Stop ON 16595 – C211  16594
PLC Input – MS Output Selector Switch 1 16596 – C212  16595
PLC Input – MS Output Selector Switch 2 16597 – C213  16596

Note: The machine simulator will be offset by one on the Modbus Addresses.
See the video below for the demo mode and determining inputs and outputs.

Develop a logical sequence of operation: (Step 3 – Click Easyplc Robot Packing)

A flow chart or sequence table is used to understand the process that must be controlled thoroughly. It must also answer questions like this:

What happens when electrical power and/or pneumatic air is lost? What happens when the input/output devices fail? Do we need redundancy?

This step is where you will spend most of your time. Understanding everything about the operation will save you time. It will help prevent you from continuously re-writing the PLC program logic. Knowing all these answers upfront is vital in developing the PLC program.

Our Click PLC robot packing example will break down into two basic parts: the conveyor controlling the empty box and the robot collecting the bags.
Robot Packing PLC Program Development
When the start button is selected, the box conveyor will make a box and position it for the robot to fill with bags. When the box is filled with the bags, it is sent down the conveyor belt, and another box is positioned for the robot.
Our sequence table for the robot will show the input signals on the left side and the output signals on the right.
Robot Packing PLC Program Development
The value of the counter is shown with each step. Each step will show the conditions that need to occur for the next step to operate.

A PLC programmer must know everything about the sequence and operation of the machine before programming.
Ask questions or view existing documentation to ensure you know the logical steps to the machine’s operation.

Develop the Click PLC program: (Step 4 – Click Easyplc Robot Packing)

The next step in our program development will be writing the ladder logic code for the Click PLC example. We will use the free Click programming software with the Click PLUS PLC. The Click Series will install the program, communicate the controller instructions, and address the controller.
Click PLC Ladder Logic Programming Example
Using the Address Picker, enter as many address names as you can think you will use in the program. As we write the program, we can always go back and document the additional addresses. To access the Address Picker, select it from the main menu | Program | Address Picker…
This can also be accessed in the navigation window in the program tab under the Ladder Program heading.
Click PLC Ladder Logic Programming Example
The first rung will start and stop the robot packing machine by turning on an internal bit C1. This bit will then be used as a condition in the entire program.
Click PLC Ladder Logic Programming Example
The next two rungs are part of the control for the boxes on the conveyor. If the robot packing machine bit is on and we do not have a photocell three signal, activate the cylinder stop. This resets when the box is full.
Click PLC Ladder Logic Programming Example
A timer ensures that the box is stopped by the cylinder rod. This creates a half-second delay after the photocell three signal is seen. The box conveyor will stop after this. The conveyor will start again when the box is full, and the cylinder stop has returned.
Click PLC Ladder Logic Programming Example
The pneumatic push ensures the empty box remains still when the robot fills it. This is engaged after the timer expires to ensure the box is positioned correctly. Timer 2 is activated when the box is full, and the cylinder stop is back. It is a half-second timer.
Click PLC Ladder Logic Programming Example
The box full bit is set from the counter sequencer. Timer 16 will activate the box once it is complete. Timer 3 is used to reset the full box bit. This happens 1.5 seconds after photocell three no longer sees a signal.
Click PLC Ladder Logic Programming Example
A counter is used to control the sequencing of the robot. The previous step and table give us the conditions for each counter increment.
Click PLC Ladder Logic Programming Example
We compare the counter accumulator to set the outputs. In the case of the robot home output signal, the counter will be greater than or equal to 0 and less than or equal to 9. It will also be on when greater than or equal to 11. We can see this by looking at the sequence table.
Click PLC Ladder Logic Programming Example
The work part creator will create the bags along the conveyor belt. This will occur when the counter equals 0, 2,4,6, or 8.
Click PLC Ladder Logic Programming Example
Robot 1 load position will activate when the counter is 1. A timer ensures that the position is reached before the next step.

Click PLC Ladder Logic Programming Example
Click PLC Ladder Logic Programming Example
Robot 2, 3, and 4 load positions will activate at the appropriate counter value. Individual timers ensure that the position is reached before the next step.
Click PLC Ladder Logic Programming Example
The close grip on the robot activates when the counter is equal to 9 and 10. This holds the bags so they do not fall when moving to the box.
Click PLC Ladder Logic Programming Example
When the counter equals 10, the robot is sent to the unload position. A timer ensures that the position is reached before the next step.
Click PLC Ladder Logic Programming Example
The robot home reset timer ensures that the home position is reached before starting the robot sequence over again.
This is the end of the ladder logic for our packing robot program. Watch the video below to see how this is created with the Click PLC Programming software.

Select the “Com Port…” under the Setup selection on the main menu.

The available ports on the Click PLC are displayed. Using Modbus TCP (Ethernet), we can set up either the WLAN (wireless local-area network) or the Port 1 (Ethernet). Select setup for port 1.
Palletizing Conveyor Programming - Click PLC
Note: If you want to go directly to the Com Port Setup details window, select Com Port 3 Setup under the CPU Configuration on the Function Tab of the navigation window.
A static IP address will be used for our Click PLC. This ensures that the IP address on the network can always be found. Note the IP address we are using. This will later be used for the EasyPLC robot packing Machine Simulator connection.
Palletizing Conveyor Programming - Click PLC
Under the Setup menu on the main screen, you will also see Modbus TCP… This will show us the default parameters for our Ethernet port and allow us to enable the Modbus TCP Server. This is enabled by default on the controller. We will leave everything as their default values.
Our Click PLUS PLC is now set to communicate to the EasyPLC Machine Simulator Modbus TCP Client.

Download the Click ladder logic program to the Click PLUS PLC. Ensure that the PLC is in run mode. Watch the video below to see this Click PLC program in action.

Test the program: (Step 5 – Click Easyplc Robot Packing)

We will use Modbus TCP on our Click PLUS PLC to communicate with the EasyPLC Machine Simulator. Call up the robot packing machine simulator in start mode.
Robot Packing PLC Program Development
The status of the machine simulator will be at the bottom of the screen. Currently, we have no PLC connected. Select IO Drivers on the bottom middle of the screen.
Palletizing Conveyor Programming - Do-More PLC
The machine simulator IO number will be displayed. Ensure we select more IO than the number required for our robot packing machine. The EasyPLC driver is selected by default.
Palletizing Conveyor Programming - Do-More PLC
Under the driver pull-down menu, select “ModBusDriver.” This driver will communicate Modbus TCP (Ethernet) and Modbus RTU (Serial). Select the down arrow on the driver’s name.
Palletizing Conveyor Programming - Do-More PLC
Select the configure button.
Palletizing Conveyor Programming - Click PLC
We can now enter the information for our Modbus driver. Select TCP/IP. This means the Ethernet port on the computer will communicate with the Click PLC. The digital inputs from MS to the Click PLC will be C101 to C112. This will start at address 16484 due to the offset of 1. Digital outputs from MS to the Click PLC will be C201 to C213. This will begin at address 16584 due to the offset of 1. Select the OK button.
Palletizing Conveyor Programming - Do-More PLC
You will now see the inputs and outputs specified for the Modbus driver. We can now manually assign the driver outputs to the PLC inputs and driver inputs to the PLC outputs. However, the automatic assignment works well and will save you time.
Palletizing Conveyor Programming - Do-More PLC
Select Automatic Assignment from the driver option in the main menu.
Palletizing Conveyor Programming - Do-More PLC
This will automatically assign the PLC IO to the Machine Simulator IO. Select Start Driver and exit from the main menu.
Robot Packing PLC Program Development
On the bottom left side of the window, the driver communicates to the Click PLUS PLC with the green light. Select view IO to know the input and output status of the machine simulator.
Robot Packing PLC Program Development
Ensure that the Click PLC is in run mode. We can see the operation of our robot packing machine. Select the start button on the control panel and ensure the emergency stop is not on. The digital inputs and outputs of the MS will correspond to the PLC controller.
Robot Packing PLC Program Development
Using the Data View window of the Click programming software, we can also watch the inputs and output operations.
Robot Packing PLC Program Development
Using Machine Simulator (MS) to test the program will ensure that our program works. Troubleshooting is quickly done without damage to any physical hardware.

You can practice your modification and debug by modifying the robot packing operation in the following way:
– Add a stack light to indicate the operation of the robot packing machine.
– Add a jog button to the control panel to sequence through the steps.
– Calculate the rate of full boxes coming out of the robot packing machine in boxes per hour.
Let me know how you make out in the comments below.

Download the Click PLC sample program and sequence table here.

Watch the video below to see the five steps of program development applied to the robot packing machine. The machine simulator is one of the best applications to help you learn PLC programming.

EasyPLC Software Suite is a complete PLC, HMI, and Machine Simulator Software package. This PLC learning package includes the following:
Easy PLC – PLC Simulation allows programming in Ladder, Grafcet, Logic Blocks, or Script.
HMI System – Easily create a visual human-machine interface (HMI)
Machine Simulator – A virtual 3D world with real-time graphics and physical properties. PLC programs can be tested using EasyPLC or through other interfaces. (Modbus RTU, TCP, etc.)
Machine Simulator Lite – Designed to run on Android Devices.
Machine Simulator VR – Virtual Reality comes to life so you can test, train, or practice your PLC programming.

Purchase your copy of this learning package for less than USD 95 for a single computer install or less than USD 110 to allow different computers.
Receive 10% off the price by typing in ACC in the comment section when you order. http://www.nirtec.com/index.php/purchase-price/
Learn PLC programming the easy way. Invest in yourself today.

Watch on YouTube: Robot Packing PLC Program Development

If you have any questions or need further information, don’t hesitate to contact me.
Thank you,
Garry


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

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 for free download. The link is included when you subscribe to ACC Automation.

Leave a Comment