Automatic PLC code generation

Create a new PLC project that serves as a basic framework for programming by selecting Generate PLC Template in the project context menu. Declare, instantiate and initialize all DataObjects, Services, ProcessValues and TextLists.

Automatic PLC code generation 1:

The automatically generated program code is located in folders with the name MTP. The folder structure under TwinCAT PLC is as follows:

Automatic PLC code generation 2:

Structure:

The automatically generated code contains comments with notes and warnings that describe which areas will be overwritten during the next code generation and where changes can/should be made:

Automatic PLC code generation 3:
Automatic PLC code generation 4: