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. IEC 104 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 "New Project", enter the name and the folder path where you want to save it.
For this simulation with Mastertool and Elipse E3 we will use 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 global variable list. To do this, right-click on Application >> Add Objects >> Variable List. Name the list as you wish, 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. Declare the variables as shown in the image below.
2.3. Add device
With the variables declared, add the Symbol Configuration object to the project tree. To do this, right-click on Application >> add object >> Symbol Configuration, a window will appear, click add. Then click compile so the GVL we added appears, select it and click compile again.
2.4. IEC 104 Configuration
Click on the word NET1 with the right mouse button, then click Add Device. A window will appear, click on the "+" symbol to the left of IEC60870-5-104, then do the same as shown; double-click on IEC60870-5-104 Server and close the window.
Right-click on IEC60870-5-104 Server, then click Add Device. A window will appear, click on the "+" symbol to the left of IEC60870-5-104, then do the same as shown; double-click on Client and close the window.
Close the device window; open the Client 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) Then it will be configured according to the IEC104 protocol
After declaring the variables, declare the variable type according to the IEC104 protocol. The address must be unique for each one.
VARIABLE TYPES IN THE IEC 104 PROTOCOL
The variables highlighted in gray will be the variables used in the project
Finally, download the project to the PLC >> at Login click "yes" in the next dialog 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 open >> click in the upper left corner of the screen on the taskbar on the "new" icon.
Next, the application wizard will open >> click next >> in the next window select "Default 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 (no need to change any configuration)
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 created project.
Select the IEC870-101-104.dll file >> Click open. (This file can be found on the same site where the simulation software is downloaded by filtering for drivers).
When selecting the IEC870-101-104.dll file, a configuration window will open for the driver. In the IEC870 tab >> select the IEC870-5-104 MASTER driver >> change the addresses to the default values indicated by the driver manual as shown in the image below.
Open the Setup tab for physical media 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 and port 2404 of the IEC protocol. Finally, click OK.
The PLC IP address can be found using MasterTool, in Easy Connection.
In the next window, open the tag options by clicking the "+" to the left of each word and select and drag to the left the option IO.PhysicalLayerStatus. With this variable, it is already possible to identify if there is communication with the PLC; to do this, just right-click on the driver and Activate communication.
Next, at the top of the screen, click on the "+" symbol >> and insert a new folder and name it as you wish (in the following example we made one folder for read variables and another for write) >> then select the folder and repeat the same step now by clicking on communication tag >> and insert the number of tags created in Mastertool and click OK.
Click on the word tag and enter the names of the tags that were declared in MasterTool. The configuration of the parameters will be explained next.
2.6. Tag Configuration
N2 PARAMETER CONFIGURATION
Click to activate communication, the tag letters will turn blue and communication will be started. In the Values column, select Empty for all variables and it will turn blue. To change the state of the variable via the simulator, just click once in the Value column, enter the value you want to set the variable to, and press ENTER on the keyboard.
Finally, split the screen between the variables declared in MasterTool and the Elipse simulator so you can monitor your simulation.
3. VIDEO
The video shows the same process in a more optimized way.
Comments
0 comments
Please sign in to leave a comment.