In this tutorial, you will learn the guidelines and procedures to simulate a simple logic and communicate
Components
Software: MasterTool IEC XE version 3.40; IxDeveloper version 2.47.473
PLC: XP340 firmware: 1.11.10.0
Download IxDeveloper: https://www.altus.com.br/suporte/download/baixararquivo/AwMLWg==/6
Tutorial Sections
1. ARCHITECTURE
2. DEVELOPMENT
2.1. Creating a new project in Mastertool
2.2. Add GVL
2.3. Add device
2.4. OPC UA Configuration
2.5. iX Developer Configuration
2.6. Tag Configuration
3. VIDEO
1. ARCHITECTURE
2. DEVELOPMENT
A lamp, two buttons, and a display will help monitor the variables communicating between the 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 iX Developer, 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 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. Then declare the variables as shown in the image on the side.
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 OPC UA Configuration
After adding the Symbol Configuration >> in settings next to compile, check the option Support for OPC UA features.
Click on Communication >> OPC Configuration. Make sure the active IP is your PLC's IP and change the device port to 11740. In Gateway address, enter your PLC's address as well and the Gateway port should be 4840. Select the option to use gateway on the CP. After making these changes, click OK. Finally, in communication, log in to your PLC.
2.5. iX Developer Configuration
Open the iX Developer software as administrator; On the screen that opens click Create New Project; select an HMI screen and click Next
In the next window, select in Controllers the option OPC UA Server then enter the
IP of your controller in the URL option and at the end of the IP add the OPC port :4840 Click Next, in the next screen name the project and choose where you want to save it, after that click Finish
2.6. Tag Configuration
Next, in Tags, at the bottom left corner of the screen, click on the tags tab and add the variables that were used in the MasterTool project by clicking add tags from OPC Server.
Open the option Objects >> Device Set>> XP 340>> Resources >> Application >> Global Vars and select the desired GVL. Finally, click OK
To edit the variable names, just click on them and type the desired name.
To create the simulation screen, double-click on Screen to open the HMI screen, then click on Button (the symbol with "OK" inside) and click on the HMI screen (the button size can be changed as desired)
To link the tag to the button, select the button, click on the Action tab at the top of the taskbar, in "Click" click on Select Action >> Tag >> Toggle Tag.
A new field will appear to fill in, click the arrow to open a drop-down window that will bring up the tags added to the project, just double-click on the desired tag.
To better visualize the button's state change, we will also add an ON/OFF switch. Go back to Home in the taskbar in the upper left corner tab. Open the component library and click on one of the ON/OFF switches and drag it to the screen.
Select the switch, click on General >> Configure Pictures. The image configuration tab will appear, in select tag type the variable name or click the arrow next to see the tags present in the project and select. To finish, click OK.
Open the component library again and now add the lamp by clicking once on it and dragging it to the HMI screen. This Lamp will be configured exactly as the ON/OFF switch was, only changing the selected tag to the LAMPADA tag.
In Home, click on the analog display represented by a box with "123" and click on the HMI screen. The blue rectangle in the image on the side shows where you can change the font and font size that will appear on the display.
To link the tag to the display, select it, in the General tab >> select tag (you can type the tag name or click to open the drop-down window with the project's tags and select the analog tag). The blue rectangles show where you can add suffix and prefix as well as define the type of number that will appear on the display
Click Run (green arrow in the upper left corner of the screen) or press F5 to start the HMI screen simulation. Split the simulation screen with the MasterTool screen so you can monitor the variables.
Rearrange the screens and run the simulation.
3. VIDEO
The videos show the same process in a more optimized and detailed way.
Part 1
Part 2
Comments
0 comments
Please sign in to leave a comment.