Article translated with the assistance of AI tools. Images and parts of the content will still be reviewed.
In this tutorial you will learn the guidelines and procedures to simulate a simple logic and communicate
Components
Software: MasterTool IEC XE 3.34 ; Elipse E3 Demo Version 6.1.0.90
PLC: XP340; Firmware: 1.11.10.0
Ethernet Cable
Tutorial Sections
1. ARCHITECTURE
2. DEVELOPMENT
2.1 Creating a new project in Mastertool
2.2 Add GVL
2.3 Add device
2.4 Modbus configuration
2.5 Elipse E3 configuration
2.6 Tag configuration
3. VIDEO
1. ARCHITECTURE
2. DEVELOPMENT
We will monitor the variables communicating through the Elipse E3 software
2.1. Creating a new project in Mastertool
Create a new project by clicking on "New Project," enter the name and the path of the folder where you want to save it
For this simulation with Mastertool and Elipse E3, we will use the XP 340 and the programming language in LADDER; click next making sure all languages are set to ladder until "FINISH" appears and then the program will open
2.2. Add GVL
We will start by creating a list of global variables. To do this, right-click on Application >> Add objects >> Variable list. Name the list with the desired name, without spaces or special characters, then click "Add"
When the list opens on your screen, change the declaration type to textual mode (1), then delete the parameter above VAR_GLOBAL (optional) if you want to use the global variable list throughout the project without having to declare the list name. And declare the variables as shown in the image below.
2.3. Add device
Click on the word NET1 with the right mouse button then click on Add Device. A window will appear, click on the "+" symbol to the left of the word MODBUS then do the same as shown; double-click on MODBUS symbol server
Close the device window; open the MODBUS Symbol Server tab and declare the variables that were declared in the GVL. (in the example shown, the GVL variable call parameter was not deleted, so the GVL path had to be shown) Next, the entries will be configured as per the ModBus configuration table on the next page.
2.4. Modbus configuration
Declare the same variables as in the GVL. The data type varies according to the function. We will use only the read and write types. To select the data type, click on the arrow. Variables of the same type must have different addresses, which must be identified in "Initial data address"
Finally, download the project to the PLC >> in Login click "yes" in the next conversation windows >> then set to run
2.5. Elipse E3 configuration
Open the Elipse E3 simulator as administrator; Click Start E3 studio and click "OK". Soon after, the studio screen will start >> click on the upper left corner of the screen on the toolbar on the "new" icon.
Next, the application assistant will open >> click next >> on the next window, select "Standard Application" >> name the project and select the folder path where the project will be saved. Finally, click next in all windows until the finish option appears (it is not necessary to change any settings)
If a warning window appears, click OK. In the project tree, right-click on "Drivers and OPC" >> "insert Communication Driver in" >> select the name of the project created.
Select the Modbus.dll file >> Click open. This file can be found on the same website where the simulation software is downloaded by filtering for drivers.
When selecting the modbus.dll file, a configuration window will open for the driver. In the Modbus tab >> Modbus Mode option select ModbusTCP. In the Operations tab, you can see some settings, which will be detailed on the next page.
2.6. Tag configuration
Below, the operation configuration is more detailed.
Open the Setup tab for the physical medium and select Ethernet. In the Ethernet tab, check if the protocol is set to TCP/IP and in Main IP enter your PLC's IP. Finally, click OK and close the next window that opens.
Next, at the top of the screen click on the "+" symbol >> communication tag >> and insert the number of tags that were created in Mastertool and click OK.
Click on the word tag and enter the names of the tags that were declared in MasterTool. Below, the configuration of the parameters will be explained.
Click on activate communication, the tag letters will turn blue and the communication will be finished. Finally, split the screen between the variables declared in MasterTool and the Elipse simulator so you can monitor your simulation.
To change the state of the variable through the simulator, just click once in the Value column, enter the value you want to assign to the variable, and press ENTER on the keyboard
3. VIDEO
This video shows the same procedure.
Comments
0 comments
Please sign in to leave a comment.