TwinCAT HMI project quickstart
Zahteve zaključka
-
Create a New HMI Project:
- In Visual Studio, right-click on your solution in the Solution Explorer and select Add > New Project.
- Choose TwinCAT HMI Project from the templates and name it appropriately.
-
Add the Runtime to the PLC:
- By default, the HMI project contains only the local runtime. To add the runtime to the PLC:
- In the Solution Explorer, navigate to HMI Project > Server.
- Double-click on ADS.
- Expand the Runtimes section and click + Add runtime.
- Name the runtime (any name is fine), but ensure that the AmsNetId points to the ADS route previously defined to connect to the PLC.
- By default, the HMI project contains only the local runtime. To add the runtime to the PLC:
-
Design the Layout:
- Open Desktop.view in the HMI project to start designing the interface.
- Use the Toolbox on the right to add UI elements (e.g., buttons, sliders, indicators).
- For each element, use the Data Binding option to link it to PLC variables.
- Ensure the PLC runtime is activated beforehand to enable variable selection during binding.
-
Visualize Using Live Mode:
- Open Live Mode by navigating to the menu Extensions > TwinCAT HMI > Windows > TwinCAT HMI Live-View.
- In Live Mode, interact with the interface in real time and verify that the elements correctly reflect and manipulate the PLC variables.
Zadnja sprememba: petek, 13. december 2024, 14.31