Machine Simulator Modbus Server to C-More HMI

We will now communicate from the C-more CM5 HMI to the latest Machine Simulator (EasyPLC) version, 4.1. This will be done using Ethernet on a Modbus TCP network. The machine simulator (MS) will be the server, and the C-more will be the Client. Machine simulators play a crucial role in industrial automation as they allow you to replicate real-world scenarios and test the functionality of different machines in a virtual environment. This helps identify and resolve potential issues before they occur in the production environment, saving time and resources.
Machine Simulator Modbus Server to C-More HMI
We will use the C-More CM5 HMI to connect to the newest Modbus Server driver of the Machine Simulator. We will be programming a troubleshooting screen on the HMI for the MS Easy Transfer Line. Let’s get started.

Learn PLC programming the easy way. See below for 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
Robot Packing PLC Program DevelopmentVideo
Box Dumper Easily Learn PLC ProgrammingVideo
Innovative Solution for Mixing Ink and BottlingVideo
Benchwork 1 Do-More Practice PLC ProgrammingVideo
LS Electric XGB PLC Easy Transfer ProgramVideo
Do-More PLC Automatic Robot Packing MachineVideo
Latest Machine Simulator Modbus Server DriverVideo

Machine Simulator Modbus Server

We will use a prebuilt scene in the machine simulator or MS. Start the Machine simulator and select the “Machines” icon on the top menu.
Setting Server
You can also select the “Open Machine – Start Simulation” on the main page.
Setting Server
All of the prebuilt machines will now be displayed. These have been programmed, so you can immediately start learning with this package. We will be using the “01 Easy Transfer Line”. Selections will be displayed as you move your mouse over the machine icon. Select the exclamation point in the upper right corner.
Setting Server
This will display the machine description of what you need to program. Select close. The “Demo” mode will show you the workings of the machine. It will demonstrate how the machine is to function. Select “Start”.
Setting Server
The machine simulator will now load the easy transfer line.
Setting Server
In the bottom left corner, you will see that we have “No PLC Connection”.
Select “I/O Drivers” on the top menu.
Setting Server
Under the “Driver Name,” you will see that EasyPLC is selected by default. Select “EasyPLC” to call up all of the Machine Simulator drivers. Select “ModbusServerDriver”.
The Modbus server driver uses TCP/IP protocol on Ethernet to communicate with other Modbus devices and software.

Setting Server
Select the “Configure” button.
Latest Machine Simulator Modbus Server Driver
We can now assign the machine Simulator to the four different Modbus memory areas. In our case, the PLC’s coil outputs will be MS’s digital inputs. The PLC digital inputs will be MS’s digital outputs. Although our machine does not use any analog inputs, we can still set this up. Modbus PLC holding registers will be used for the Analog inputs, and the PLC analog input registers will be MS’s analog outputs.
Analog scaling and subtraction factors are used in the machine simulator to represent negative numbers since Modbus analog is strictly a 16-bit word. Select OK.
Setting Server
Our PLC inputs and outputs are now displayed. We can now assign the inputs and outputs to our Machine Simulator I/O. This can be done by clicking and dragging the PLC input to the Machine Simulator input and the PLC output to the Machine Simulator output. However, you can select “Automatic Assignment” from the driver menu.
Setting Server
This will automatically assign the inputs and outputs in the order they appear, saving you time. Select automatic assignment.
Latest Machine Simulator Modbus Server Driver
Under the exit menu, select “Start Driver and Exit”.
Latest Machine Simulator Modbus Server Driver
Our Easy Transfer Line is now ready for communication. This is shown by the green “Driver Connected” indication on the bottom left of the screen.
Select “View IO” to show the MS’s input and output status. Since this is a Modbus server setup, we can use multiple Modbus clients to connect to our Machine Simulator.

IP Address of Machine Simulator

The IP address of our MS Easy Transfer Line will be the IP of the local computer running the software.
IP Address finding on local computer
If you are unsure, start a command prompt on your Windows computer. Type the command “ipconfig /all” and press enter.
You will now see the IP address listed. We will need to know this for the Modbus client device.

Programming the C-More CM5 HMI 

We will be programming a troubleshooting screen on our C-More CM5 HMI. Our screen will have a picture of the Easy Transfer Line on the page.
C-More CM5 Starting a New Project
Start a new project using the C-more HMI version 8.14 programming software. Select the start icon on the main menu. The “Start a Project” window will be displayed. Enter a project name, and select the panel type we are programming. In our case, this is the CM5-T7W.
C-More CM5 Starting a New Project
You will see that the screen’s resolution is 800 x 480 pixels. We will keep the orientation in landscape mode, which is the default. The PLC protocol will be set for Modicon and Modbus TCP/IP Ethernet. Select the protocol setup button.
C-More CM5 Starting a New Project
This will call up the protocol manager window for the Modicon Modbus TCP Ethernet. We will enter the Machine Simulator’s IP address and leave all other settings as their default. Select OK.

We will now create the background picture. View our machine simulator screen.
Windows snipping tool
Select WIN + Shift + S to call up the Windows snipping tool. We can now select the area we want to display on our HMI. This will automatically be placed on the Windows clipboard.
Call up windows paint. Ensure that the paint area is smaller than the snipped picture.
Bitmap for CM5
Paste the image in paint. Select the resize and skew icon on the main menu, or use Ctrl +W. In the resize and skew Window, select pixels. Enter 800 for the horizontal number. Unselect the maintained aspect ratio. Enter the value of 480 for the vertical number. Select OK. Save the picture in a bitmap (BMP) format. (main menu | File | Save As | BMP picture)

Returning to the C-More programming software, select “Static Bitmap” under bitmap in the object list.
CM5 Programming
In the static bitmap Window, select read from disk. Select the bitmap file we just saved. Select Open. The picture of the bitmap will now be returned. Leave all other selections as their default and select OK.
CM5 Programming
Use the corners of the picture to stretch the image to fill the screen. Save the program.

CM5 Programming
Select tag name database from the main menu | database. We can now add the tags for our machine simulator easy transfer line.

CM5 Programming
We can now add our switches for the outputs and indicators for the inputs on our troubleshooting screen. Additional information on how to program the C-More CM5 can be seen here

Transfer the C-More CM5 Program

Select Project Transfer (Ctrl + T) from the main menu icon.
CM5 Transfer
The project transfer window will be displayed. If the HMI unit is not shown, then select the browse button.
CM5 Transfer
This will provide you with the Ethernet Connection Setup window that will display all of the HMI units on the network. Select the connection you would like to use and select OK.
Machine Simulator Modbus Server to C-More HMI
Select the Transfer button. Our program will now be transferred to the HMI unit. An indication will be shown that the transfer was OK. Select OK.

Testing the HMI Machine Simulator Operation

We can now operate the C-More CM5 HMI and the machine simulator easy transfer line.
Machine Simulator Modbus Server to C-More HMI
Troubleshooting screens like this provide owners, maintenance, and operators with tools to ensure the equipment remains operational.

Machine Simulator Modbus Server to C-More HMI
Now that you know how to create troubleshooting screens that help narrow down issues, look at how the machine simulator can be used elsewhere. Beginners, as well as advanced programmers, can quickly learn how to use this software. Click here.

Download the C-More HMI sample program here.

Watch the video below to see the five steps of program development applied to the Automatic Packing machine. The machine simulator is one of the best applications for learning PLC programming.

When using the Machine Simulator Software Suite, debugging is quickly done without damaging equipment. You may modify your logic several times before you get everything right! This is all part of learning. To learn more about developing logic, check out our tutorials on the five steps to PLC program development.

Watch on YouTube: Machine Simulator Modbus Server to C-More HMI

Machine Simulator (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.

If you have any questions or need further information, please get in touch with 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 know 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