Updating the PLC project on the PLC
Situation: You are loading a PLC project onto the controller that differs from the project already located there. In this case, a message window appears in which you can select how you want to transfer the modified PLC project to the controller: download or online change.
- A download leads to a new compilation of the PLC program. In addition to a syntax check, program code is generated and loaded onto the controller. This will stop the running program. A download is the recommended type of data transfer, since it always leads to a defined output state as a result of the program stop and the reinitialization.
- During an online change, only the modified parts are reloaded into the controller. A running program is not stopped. The online change option should only be used after minor modifications of the PLC project. After more extensive modifications, the program behavior cannot be predicted reliably.
Revision overview
Possibility 1:
The message window described above also contains a Details button. Use this button to open the Application information window, which allows you to check the differences between the current PLC project and the PLC project on the controller. This involves comparing the number of function blocks, the data and the storage locations.
The Application information window contains a brief description of the differences, for example:
- Declaration of MAIN changed
- Variable fbMyNewInstance inserted in MAIN
- Number of methods/actions of FB_Sample changed
If the setting Download application info (PLC project properties, category Compile) is enabled, an option for an extended check of the differences between the current PLC project and the PLC project on the controller is available. The difference in the extended check option is that the Application information window contains an additional Online comparison tab, which shows a tree comparison view. This will tell you which POUs have been changed, deleted or added. The additional tab appears when you execute the blue underlined command in the lower area of the application information window ("Application not current. Generate code now to display the online comparison?“).
This tree comparison view provides only a rudimentary overview. For a detailed comparison of the current PLC project and the PLC project on the controller, please see option 2.
Possibility 2:
Requirement: The source code files of the PLC project were also transferred to the target system (can be configured via the Settings tab in the PLC project settings).
The TwinCAT Project Compare Tool enables a detailed comparison of the current TC3 project and the TC3 project on the controller (Command Compare <TwinCAT project name> with the target system...). This opens a comparison tree view, which allows the desired PLC editors to be opened in a comparison window. Differences are highlighted in color. It is also possible to merge the source code of the target system project (or parts of the source code).
See also:
- Reference user interface documentation: Command Download
- Reference user interface documentation: Command Login
- Reference user interface documentation: Command Online Change