In this tutorial you will learn the guidelines and procedures to simulate a simple logic and communicate
Components
Software: MasterTool IEC XE 3.34 ;Kepware Version 6.10
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 Configuration
2.5 Kepware Configuration
3. VIDEO
1. ARCHITECTURE
2. DEVELOPMENT
We will monitor the variables communicating through the Kepware 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 Kepware, we will use the XP 340 and the programming language will be 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, 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.
Right-click on the word NET1, then click Add Device. A window will appear, click the "+" symbol to the left of IEC60870-5-104, then do the same as shown beside; double-click IEC60870-5-104 Server and close the window.
Right-click on the word IEC60870-5-104 Server, then click Add Device. A window will appear, click the "+" symbol to the left of IEC60870-5-104, then do the same as shown beside; double-click 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 beside, the parameter for calling the GVL variables was not deleted, so it was necessary to show the GVL path) Next, 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 different for each one
Below is the configuration table for the IEC 104 protocol:
Finally, download the project to the PLC >> in Login click "yes" in the next dialog windows >> then set to run
2.5. Kepware Configuration
Open the Kepware simulator as administrator; then, in the project tree of the simulator, right-click on Connectivity and add a new channel in "New Channel"
In the window that opens you will select the protocol. We will use 0 IEC 60870-5-104 Master, then click next; in the next window, name the channel if necessary and click next.
In the next window, click "..." and select Realtek. And click OK to select the adapter used. Finally, click Next twice until the IP window appears, enter your PLC's IP and make sure the selected port is port 2404. Finally, click next until finish appears and return to the main screen
Click on "Click to add device" to add a device within the created channel, if necessary you can name the device (in the example it was named as XP340). Then click Next 4 times until the field to enter the station address appears and click next until finish and return to the main screen
Next, we will add the tags by selecting the device >> Click to add a static tag >> enter the tag name (consult the driver manual or the table on page 13 to select the variable type), enter the same address that was used in MasterTool, click OK to add the tag and repeat this for the other tags.
The address must be entered in place of the numbers that will appear when selecting the variable type. Remember to delete the parameters following the variable type name. To add new tags, just right-click below the last inserted tag and then select New Tag
After all tags have been inserted, click the Quick Client icon and the tag control window will open.
In the Quick Client window, select the option IEC104.device_name; in this option, the tags that were added will appear.
Select the Tag with the right mouse button, then click Synchronous Write. Enter the value you want to send to the tag and click OK. This process is the same for all tags.
This method is only for command variables; measurement variables are read-only, meaning they receive values from MasterTool but do not send values
Split the screen between Quick Client and MasterTool to be able to view the change of state of the variables. On the second page of this document, you can access the link to the simulation video.
3. VIDEO
Comments
0 comments
Please sign in to leave a comment.