Creating a PLC project

The next steps describe how to create a PLC project in TwinCAT and add it in the tree view.

Requirements for this step:

Create a PLC project as follows:

1. Right-click on PLC in the tree view.
2. In the context menu click on Add New Item and select the Standard PLC Project.
Creating a PLC project 1:
3. In the tree view click on the newly created PLC project, then double-click on MAIN (PRG) under POUs.
Creating a PLC project 2:
4. Write a small program, as shown in the diagram below.
Creating a PLC project 3:
5. In the tree view right-click on the PLC project, then click on Build in the context menu.
Creating a PLC project 4:
You have successfully created a PLC project and added the project in TwinCAT. A PLC instance is created with the variables for the inputs and outputs from the PLC project.
Creating a PLC project 5:

In the next step you can link the variables with the hardware.