In this tutorial you will learn the guidelines and procedures to simulate a simple logic and communicate
Components
Software: MasterTool IEC XE 3.40; IxDeveloper Version 2.47.473
PLC: For this simulation, it is not necessary to have a physical PLC
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 Configuration
2.5. iX Developer Configuration
2.6. Tag Configuration
3. VIDEO
1. ARCHITECTURE
Only the computer and the software
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 in LADDER; click Next ensuring that 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. Declare the variables as shown in the image beside.
With the variables declared, add the Symbol Configuration object in the project tree. To do this, right-click on Application >> add object >> Symbol Configuration, a window will appear, click add. Then click compile to show the GVL we added, select it and click compile again.
In communication, put MasterTool in simulation mode.
Then download the project to the PC >> in Login click "yes" in the next dialog windows >> then set to run
Click again on Communication >> OPC Configuration. Make sure the active IP is your localhost IP 127.0.0.1 and change the device port to 11739
Open the iX Developer software as administrator; On the screen that opens click Create >> New Project >> select an HMI screen >> click Next
In the next window select OPC Classic Server under OPC Server, click the arrow on the side to open the drop-down list and select the option CoDeSys.OPC.DA. Click Next, in the next screen name the project and choose where you want to save it, then click Finish.
When the project opens, click on Tags in the lower left corner of the screen, in the Tags tab click the Add arrow to open the drop-down list, select the option Add Tags from OPC Server (Controller1)
Click the arrows next to the words until our GVL that was added in MasterTool and selected in symbolConfiguration appears. Finally, click OK
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 state change, we will also add an ON/OFF switch. Go back to Home in the taskbar at the top left. 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 write the name of the variable or click the arrow next to it 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.
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 beside shows where you can change the font and font size that will appear on the display.
Click Run (green arrow in the upper left corner of the screen) or press F5 to start the simulation of the HMI screen. Split the simulation screen with the MasterTool screen so you can monitor the variables.
Arrange the windows and simulate.
3. VIDEO
This video shows the same procedure.
Comments
0 comments
Please sign in to leave a comment.