The Machine Simulator (MS) is part of the EasyPLC software suite. It has many built-in machines that are used to show different programming techniques. The robotic cell example is one of these machines. This will demonstrate a sequencer example. The logic will step through different steps in order to perform the task. In this case, an engine is lifted and placed onto a rack.
We will be using a Productivity Suite Programming Simulator to program this engine loader of the robotic cell. This will be done using Modbus TCP (Ethernet) for communications. Using the five steps for program development we will show how this sequencer is programmed. Let’s get started.
Learn PLC programming the easy way. Invest in yourself today. See below on how to receive a 10% discount on this already cost-effective learning tool.
Previously we have done the following:
Easy PLC Installing the Software – Video
EasyPLC Software Suite – Quick Start – Video
Click PLC – Easy Transfer Line Programming – Video
Productivity PLC Simulator – Chain Conveyor MS – Video
Do-More PLC – EasyPLC Box Selection Program – Video
Click PLC EasyPLC Gantry Simulator – Video
Click PLC Simple Conveyor EasyPLC – Video
EasyPLC Paint Line Bit Shift – BRX Do-More PLC – Video
Click PLC – EasyPLC PLC Mixer Programming – Video
Click PLC EasyPLC Warehouse Stacker Example – Video
– Operation Video
Define the task: (Step 1 – Easyplc Robotic Cell)
The first step of PLC program development is to determine 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 on the top of the machines simulator window.
All the available machines will now be displayed. Click on the “13 Engine Loading”. This is the example that we will be programming. To the left of the screen, information will be displayed on what the machine needs to do as well as the inputs and outputs required for the program.
This system uses:
1 Robot
2 Conveyor Lines
2 Conveyor Stops
2 Inductive Switches
1 Beacon Light
Use the industrial robot to load the engine blocks in the pallets. Manage the conveyors and stops to place the parts in their positions. The robot loads the engine block in the pallet. Once loaded, release the pallet. The robot moves with PLC digital IO signals.
The machine simulator has a demo mode for the built-in machines. This will allow you to watch the operation of the robotic cell. Select the demo mode for the engine loading.
The load robot process demo mode will operate showing you the basics of operation.
Move around the 3D virtual environment. There are three icons on the top of the window that will allow you to move around this 3D environment. The first icon is the default selection. This will allow you to move around without bumping into the components. The first-person mode will mimic a person in your 3D learning world. The last icon will automatically show you around this virtual environment. Once we have a good understanding of what must be done, we can now move on to the next step in the PLC program development.
Define the Inputs and Outputs: (Step 2 – Easyplc Robotic Cell)
The View IO at the bottom of the machine simulator window will display the inputs and outputs required for this robotic cell example. While still in demo mode you can see the operation of the inputs and outputs.
Use the following PLC signals to move the robot:
PLC Digital Outputs:
2 – Activate the robot fix system (to take the engine block)
4 – Moves robot to the home position
5 – Moves robot to the take engine position
6 – Moves robot to the lift engine position
7 – Moves robot to the load engine position (in pallet)
8 – Moves robot to the lift position (once the engine is loaded in pallet)
PLC Digital Inputs:
0 – Active when the robot detects an engine in the gripping device
1 – Active when robot finishes the movement
Use the following PLC signals to manage the machine:
PLC Digital Outputs:
0 – Start conveyor system
1 – Activate conveyor stop 1 (engine part)
3 – Activate conveyor stop 2 (pallet part)
9 – Request a new engine part
10 – Request a new pallet part
11 – Beacon Red Light
12 – Beacon Yellow Light
13 – Beacon Green Light
PLC Digital Inputs:
2 – Inductive SW1 signal for engine part
3 – Inductive SW2 signal for pallet part
The EasyPLC robotic cell engine loader example will require 14 digital outputs and 4 digital inputs.
If you are unsure as to what output or input is doing, start the engine loading machine in Start mode.
Select the View IO on the bottom middle of the machine simulator window. You can manually run the robotic cell without any control or PLC connected.
Clicking on the outputs will allow you to manually turn them on. You can then monitor the inputs to see their operation. The restart button on the bottom of the 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 Productivity PLC that we will use for this robotic cell program.
Digital Type | Description | Productivity PLC Modbus Address | Machine Simulator Modbus Address |
PLC Output – MS Input | Conveyor 1 2 Advance | 100001 | 0 |
PLC Output – MS Input | Stop 1 Stop | 100002 | 1 |
PLC Output – MS Input | Robot Fix Part | 100003 | 2 |
PLC Output – MS Input | Stop 2 Stop | 100004 | 3 |
PLC Output – MS Input | Robot Home | 100005 | 4 |
PLC Output – MS Input | Robot Take Part | 100006 | 5 |
PLC Output – MS Input | Robot Lift Part | 100007 | 6 |
PLC Output – MS Input | Robot Load Part | 100008 | 7 |
PLC Output – MS Input | Robot Elevate Robot | 100009 | 8 |
PLC Output – MS Input | Work Part Create Engine | 100010 | 9 |
PLC Output – MS Input | Light Machine Create Pallet | 100011 | 10 |
PLC Output – MS Input | Beacon Light Red | 100012 | 11 |
PLC Output – MS Input | Beacon Light Yellow | 100013 | 12 |
PLC Output – MS Input | Beacon Light Green | 100014 | 13 |
PLC Input – MS Output | Robot Detect | 1 | 0 |
PLC Input – MS Output | Robot Stopped Movement | 2 | 1 |
PLC Input – MS Output | Inductive Switch 1 | 3 | 2 |
PLC Input – MS Output | Inductive Switch 2 | 4 | 3 |
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.
The productivity will be a Modbus server to the Machine Simulator client. Modbus input addresses must be set as outputs in the logic. To accomplish this using version 3.10.2 you must do the following:
1 – Assign the output tags as Boolean. (Do not assign Modbus addresses.)
2 – Create your ladder logic.
3 – Once all the outputs are assigned in the ladder code, change the type in the tag database to Discrete Input. Then assign the Modbus address.
Develop a logical sequence of operation: (Step 3 – Easyplc Robotic Cell)
A flow chart or sequence table is used to fully understand the process that needs to be controlled. It must also answer questions like the following:
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 the development of the PLC program.
The sequence of operation comes down to using indirect addressing (Pointers) in the PLC.
Here is the sequence table for the robotic cell. If the input conditions are met, then the outputs are set. The next input conditions are looked at. If they are equal, then the next outputs are set. This will continually cycle through the table.
A PLC programmer must know how everything about the sequence and operation of the machine before programming.
Ask questions or view existing documentation to ensure that you know the logical steps to the machine operation.
Develop the Productivity PLC robotic cell program: (Step 4 – Easyplc Robotic Cell)
Writing the ladder logic code for the PLC example will be the next step in our program development. We will be using the Productivity Suite programming software with the Productivity PLC Simulator.
The Productivity Series will take you through installing the program, communicating to the controller, instructions, and addressing the controller.
Start a new project. We will select the P2-550 CPU with a 4-slot backplane. Select go to hardware configuration.
We will add a 16-point input and output card for our program. Using the simulator, we can program any of the Productivity family PLC units. (P1000, P2000, P3000)
Using the Tag Database, enter the inputs and outputs as described above.
Here are the discrete outputs.
The inputs are here. These must be entered in the tag database as Boolean variables first. When the program is complete, then switch them to inputs and assign the Modbus address. See the note below.
The sequence input array table will have all the input variables as per the sequence chart above.
The sequence output array table will have all the output variables as per the sequence chart above.
Note:
The productivity will be a Modbus server to the Machine Simulator robotic cell client. Modbus input addresses must be set as outputs in the logic. To accomplish this using version 3.10.2 you must do the following:
1 – Assign the output tags as Boolean. (Do not assign Modbus addresses.)
2 – Create your ladder logic.
3 – Once all the outputs are assigned in the ladder code, change the type in the tag database to Discrete Input. Then assign the Modbus address.
The first rung of logic will start the robotic cell running. This will use the first two inputs on the PLC that we selected above as the start and stop. The first output will be used to determine if the robotic cell is running.
The time delay output of the sequencer is used to separate items in the list that do not have changes in the inputs from step to step. This 0.5-second timer is used to ensure that the sequence runs smoothly.
When the robotic cell is running, the sequence output indicated by the pointer will set the output bits. This is done using the unpack bits instruction. The pointer (1 to 6) will select the sequence output to use.
If the robotic cell is not running, then the value of 0 (off) is copied to the output bits.
Using the pack bits instruction, the inputs are copied to the sequence input word. The order of the bits in the pack instruction is the same as the sequence table above.
When the robotic cell is running the sequence input word is compared to the sequence table with the pointer. If the two are the same then the pointer is incremented by 1, so the next output sequence is set. When the pointer is greater than 6 the pointer is reset back to 1. This will also reset with the first scan bit in the PLC.
Save and transfer the PLC program to the simulator. Ensure that the PLC is in Run mode.
Watch the video below to see this PLC program in action
Test the program: (Step 5 – Easyplc Robotic Cell)
We will be using Modbus TCP on our Productivity PLC simulator to communicate to the EasyPLC Robotic Cell Machine Simulator.
Call up the engine loading machine simulator in start mode.
The status of the machine simulator will be along the bottom of the screen. Currently, we have no PLC connected. Select IO Drivers on the bottom middle of the screen.
The EasyPLC driver is selected by default. Select the down arrow on the driver’s name. Under the driver pull-down menu, select “ModBusDriver”. This driver will communicate Modbus TCP (Ethernet) and Modbus RTU (Serial).
Select the configure button.
We can now enter the information for our Modbus driver. Select TCP/IP. This really means the Ethernet port on the computer will communicate to the PLC.
The digital inputs from MS to the Productivity PLC will be 100001 to 100015. This will start at address 0 due to the offset of 1. Digital outputs from MS to the Productivity PLC will be 1 to 5. This will start at address0 due to the offset of 1. Select the OK button.
You will now see the inputs and outputs that we have specified for the Modbus driver. We can now manually assign the driver outputs to the PLC inputs and the driver inputs to the PLC outputs. However, the automatic assignment works well and will save you time.
Select Automatic Assignment from the driver option in the main menu.
This will automatically assign the PLC IO to the Machine Simulator IO. Select start driver and exit from the main menu.
You will see on the bottom left side of the window that the driver is communicating to the PLC by the green light. Select view IO to see the input and output status of the machine simulator.
Ensure that the PLC is in run mode. We can see the operation of our industrial process mixer. Select the start from the PLC simulator input card.
The digital inputs and outputs of the MS will correspond to the PLC controller.
Using Machine Simulator (MS) to test the program will ensure that our program works.
Using the Data View window of the Productivity Suite programming software we can also watch the inputs and output operations of the robotic cell program.
Watch the video below to see this on the operation.
Download the Productivity PLC sample program, and sequence table here.
Watch the video below to see the five steps of program development applied to the engine loading robotic cell. 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 that will allow 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 the 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 $75 USD for a single computer install, or less than $100 USD 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: EasyPLC Machine Simulator Productivity PLC Robotic Cell
If you have any questions or need further information please 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 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.