Setup of PLC debugging

The uncompiled version is required for debugging the TwinCAT 3 Plastic Base Application. The PLC resource can be used for this. This example shows you how to add the PLC resource to your project and then debug it.

You must have previously created a TwinCAT 3 project from a Plastic Application template or a general TwinCAT 3 project.
1. Right-click on the PLC node in your TwinCAT 3 project and then select Add New Item.
Setup of PLC debugging 1:
2. In the following dialog, select Plastic Resources from the list. Assign a suitable name for identification in your project.
Setup of PLC debugging 2:
3. Navigate to the Debugging folder in the newly added PLC project.
Setup of PLC debugging 3:
You have successfully integrated the uncompiled library of the Plastic Base Application into your project. You can now use the library for a debugging process.
4. In your PLC in which the Tc3_PlasticBaseApplication is used, expand the References node and select the Tc3_PlasticBaseApplication.
Setup of PLC debugging 4:
5. Then select an item from the library by double-clicking on it. DISCLAIMER is selected as an example in these instructions.
6. A dialog will appear asking you to select an uncompiled version of the Plastic Base Application. Confirm by pressing Yes.
Setup of PLC debugging 5:
7. Navigate to the path of the previously added PLC resource and select the Tc3_PlasticBaseApplication.library file.
If you are using the Tc3_PlasticBaseApplicationElectric, you will also find the corresponding file in this folder.
Setup of PLC debugging 6:
8. The source code of the element you selected previously will then open. You can close this again immediately.
The non-compiled library is loaded for debugging purposes. You must repeat these steps when you reopen the TwinCAT project.
9. To start a debugging process, log into your running PLC project (1) and select a code segment in which you want to start a debugging process (here FB_Machine.Cyclic() (2) as an example).
Setup of PLC debugging 7:
10. Set a breakpoint at a suitable point (e.g. for a library function from the Tc3_PlasticBaseApplication) with F9.
Setup of PLC debugging 8:
11. Then press F11 to jump to the library function.
If there are several function calls in the code line, you may have to press F11 several times to access the desired function.
Setup of PLC debugging 9:
You now have access to the called function and have successfully performed a debugging in the Tc3_PlasticBaseApplication.