The Machine Simulator (MS) is part of the EasyPLC software suite. It has many built-in machines that can be programmed. The chain conveyor is one of these machines. It will transfer large and small boxes on the line to different locations. The productivity series of PLCs will be used to program this virtual machine.
Using the Productivity Suite software, we will connect the simulator to the chain conveyor transfer machine. This will be done using Modbus TCP (Ethernet) for communications. Using the five steps for program development we will show how this is programmed. Let’s get started.
The Machine Simulator (MS) is part of the EasyPLC Software Suite. This is a complete PLC, HMI, and Machine Simulator Software package. This PLC learning package includes a Machine Simulator (MS). This virtual 3D world with real-time graphics and physical properties can communicate to several different programmable logic controllers. (PLC) See below to receive a 10% discount off of this PLC learning package. Invest in yourself today.
Previously we have done the following:
Easy PLC Installing the Software – Video
Click PLC – Easy Transfer Line Programming – Video
Define the task: (Step 1 – Chain Conveyor)
The machine simulator has a demo mode for the built-in machines. This will allow you to watch the operation of the chain conveyor transfer line. This will help you see what has to be done.
There is also a written version of the sequence on the left-hand side of the machine.
Two types of goods will arrive on the cargo line, some with high boxes and others with small boxes. Goods with high boxes should be sent to the transporter on the right, small boxes to the left. Use the reading station with two photocells to make the selection, and the chain conveyor to move the pallets to the appropriate conveyor.
The green start light will be on when the system is ready to run. When the start is pressed the stoplight will be on to indicate this is how the system is stopped. Pressing the emergency stop button will turn off both lights and stop the sequence.
Watch the sequence of operation video below.
Define the Inputs and Outputs: (Step 2 – Chain Conveyor)
Start the chain conveyor in start mode.
Select the View IO to display the inputs and outputs required for this machine.
The chain conveyor transfer will require 11 digital outputs and 9 digital inputs.
Clicking on the digital outputs will activate it. Spend some time to fully understand the IO (inputs and outputs) functions.
You can move around in the 3D environment and see the IO and items at different angles.
The following table will define the inputs and outputs (IO) and Modbus addresses in the Productivity PLC (PAC) Simulator that we will use for this program.
Digital Type | Description | Productivity Modbus Address | Machine Simulator Modbus Address |
PLC Output – MS Input | Work Part Creator Pallet | 100001 | 0 |
PLC Output – MS Input | Conveyor Distribe Advance | 100002 | 1 |
PLC Output – MS Input | Conveyor Chain Advance | 100003 | 2 |
PLC Output – MS Input | Conveyor Chain Raise | 100004 | 3 |
PLC Output – MS Input | Conveyor Chain Right | 100005 | 4 |
PLC Output – MS Input | Conveyor Chain Left | 100006 | 5 |
PLC Output – MS Input | Conveyor Belt Left Reverse Exit | 100007 | 6 |
PLC Output – MS Input | Stop Stop | 100008 | 7 |
PLC Output – MS Input | PreStop Stop | 100009 | 8 |
PLC Output – MS Input | Stop Button Light | 100010 | 9 |
PLC Output – MS Input | Start Button Light | 100011 | 10 |
PLC Input – MS Output | Work Part Creator Box | 1 | 0 |
PLC Input – MS Output | Photocell Pallet Signal | 2 | 1 |
PLC Input – MS Output | Photocell Box Signal | 3 | 2 |
PLC Input – MS Output | Pallet Sensor Signal | 4 | 3 |
PLC Input – MS Output | Conveyor Chain Up | 5 | 4 |
PLC Input – MS Output | Photocell Pallet Wait Signal | 6 | 5 |
PLC Input – MS Output | Emergency Button | 7 | 6 |
PLC Input – MS Output | Start Button | 8 | 7 |
PLC Input – MS Output | Stop Button | 9 | 8 |
Note: The machine simulator will be offset by one on the Modbus Addresses.
Develop a logical sequence of operation: (Step 3 – Chain Conveyor)
A flow chart or sequence table is used to fully understand the process the 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 can save yourself a lot of work by understanding everything about the operation. It will help prevent you from continuously re-writing the PLC program logic. Knowing all of these answers upfront is vital in the development of the PLC program.
Our chain conveyor transfer can be seen as three different operations.
Conveyor distribute will create and put the skid on the belt. This skid will then be moved to the conveyor chain. Once on the conveyor chain, it will decide either the right or left direction based on the photocell detecting height.
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 PLC program: (Step 4 – Chain Conveyor)
Writing the ladder logic code for the PLC example will be the next step in our program development.
Start the productivity suite software and select start a new project.
We will be using the Productivity 2000 (P2-550) CPU with a 4 slot backplane.
Since we will be using the simulator we will not need to add any cards.
Using the Tag Database, enter the inputs and outputs as described above.
Note:
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 of the outputs are assigned in the ladder code, change the type in the tag database to Discrete Input. Then assign the Modbus address.
Starting and stopping the chain conveyor is done with a set and reset instruction.
When the emergency stop is activated, both lights are off. This is an indication to the operator that the emergency stop has to be reset.
Here is the logic for the work part creation conveyor and the PreStop stop operation.
Conveyor distribute advance and Stop Stop operation logic considers the different combinations of input signals from the sensors.
The conveyor chain advanced will bring the pallet into the chain conveyor. When the pallet sensor is on, it will reset the conveyor chain advance. It will also determine if the pallet will move to the right or left.
Once it has been determined if the pallet is moving right or left, the conveyor chain rises. When the rising input is on then the pallet will move left or right and a timer is started for 5 seconds. This timer is used to allow the pallet to move off of the conveyor chain. At the end of the 5 seconds, the pallet rise, left and right are reset.
The conveyor belt left and right will be on when the machine of running.
We are simulating the Productivity 2000 PLC. This has a four-line LED display on the CPU. We are writing some information to this display. This is the end of our program.
Select simulate to start the PLC simulation. Transfer the program to the simulator and go into run mode. Select monitor to see the active status of the inputs and outputs on the ladder logic.
Test the program: (Step 5 – Chain Conveyor)
We will be using Modbus TCP on our Productivity (PAC) PLC simulator to communicate to the machine simulator.
Call up the chain conveyor transfer 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 on the bottom middle of the screen.
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. Enter the IP address of the Productivity PLC. Since this is the simulator, it will use the IP address of the computer. To find your address, open a command prompt and enter “ipconfig /all”.
Port 502 is the default number for Modbus TCP.
The digital inputs from MS to the Productivity PLC will be Modbus 1 to Modbus 9. This will start at address 0 due to the offset of 1. Digital outputs from MS to the Productivity PLC will be Modbus 100001 to Modbus 100011. This will start at address 0 due to the offset of 1.
Here are our completed driver parameters.
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.
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 operating. Select view IO to see the input and output status of the machine simulator.
Ensure that the PLC is in run mode. We can now operate the machine simulator through the control panel.
We can operate and view the machine at different angles.
Every aspect can be viewed in this 3D environment.
Using the Data View window of the Click programming software we can also watch the inputs and output operations.
Using Machine Simulator (MS) to test the program will ensure that our program works.
Machine simulator has a time frame that you can speed up or slow down the process to help you troubleshoot. Watch the video below to see this operation.
Download the Productivity sample program for the Chain Conveyor Transfer Line.
Watch the video below to see the five steps of program development applied to the chain conveyor. 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: Productivity PLC Simulator – Chain Conveyor MS
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.
No download link to source
Hi Gregory,
Thanks for letting me know. I have corrected the link above.
Download the Productivity sample program for the Chain Conveyor Transfer Line.
Regards,
Garry
I like your website bro! It have a really cool theme!
– Raihan
– Raihan
Thanks for the comment Raihan.
Garry