Creating a standard project

1. Select the command New > Project in the menu File.
The dialog New Project opens.
2. Select the template TwinCAT Projects > TwinCAT XAE Project and enter a name, for example here "Sample Project" and a storage location in the file system.
3. Quit the dialog with OK.
A new solution opens in the Solution Explorer. The project name "TwinCAT Sample Project" appears in the title bar of the main window.
4. Mark the PLC object in the project tree and select the command Add New Item... in the menu Project or in the context menu.
The dialog Add New Item <TwinCAT project name> opens.
5. Select the Standard PLC Project in the category Plc Templates and enter a name (here once again "Sample Project").
6. Quit the dialog with Add.
The following structure is created in the view Solution Explorer.
Creating a standard project 1:
With the selected template the following basic objects appear automatically under the PLC project object (PlcSampleProject): a PLC project (PlcSampleProject project) and a project instance (PlcSampleProject instance). The PLC project contains a library manager (References), the standard program block MAIN and a task reference (PlcTask). The tasks referenced there (PlcTask) defines the execution of the program block MAIN. In addition, the structure folders External Types, DUTS, GVLs, POUS and VISUs appear automatically.
The library manager already contains the standard libraries with basic blocks such as counters, timers and string functions that can be used subsequently for programming.
If you now fill MAIN with error-free code, you can load it to the controller and run it without the need for further programming objects.

See also: