Creating a PLC project and integrating PLC libraries
- Start TwinCAT XAE.
- 1. A wizard opens with File > New > Project. In this window you select TwinCAT Project and the TwinCAT XAE Project template.
- 2. Go to the PLC node in the Solution Explorer and select Add New Item from the context menu. Select a Standard PLC Project in the wizard.
- 3. In addition to the automatically created MAIN, add another programming block. Go to the POU folder and from there via the context menu to Add POU. Select the type Program and call it P_MAIN_LowSpeed.
- 4. Add another program block and name it P_SerialComm_HighSpeed.
- 5. Configure 2 tasks in the task configuration under System: a fast one (T#1ms) and a slow one (T#10ms). Assign the program block P_MAIN_HighSpeed to the fast task and the P_MAIN_LowSpeed to the slow task (see figure).
![Creating a PLC project and integrating PLC libraries 1:](Images/png/6899934091__Web.png)
- 6. In the PLC Project node the library management can be found in the sub-node References. There you select the library Tc2_IEC60870_5_10x.compiled-library in the context menu via Add Library and confirm this.
- Now all requirements are fulfilled to work through the tutorial step by step in configuration and programming.