Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Clean Project
    After performing necessary modifications to project in TwinCAT PLC Control click Project → Clean All. This command executes the cleanup process which deletes the compile information (compile log) that enables online change. After cleanup online change is not possible without a full rebuild and download. The command pops up a series of dialog boxes to lead through the process



    It’s always a good idea to perform a clean rebuild and download after code modification. On the second popup asking to leave Configuration unchanged only press ‘Yes’ if no variables are to be linked to hardware. Pressing ‘Yes’ breaks the hardware configuration and requires code rescan in System Manager.

  2. Compile Project
    Click Project → Rebuild All. This command compiles all the components of the project including the new changes. The results window shows the compile results (shown below for the case where we pressed ‘Yes’).


    Notice the warning indicating missing VAR_CONFIG. This indicates the need to rescan and reactivate project on the PLC using System Manager.

  3. Rescan Project
    The rescan operation happens in the System Manager. Launch System Manager and open the file currently linked to the project in question. Navigate to the project under ‘PLC - Configuration’ in the explorer window and click the ‘Rescan’ button. This operation inducts the newly added “addressed” variables into the System Manager configuration so that they could be attached to hardware I/O terminals.

    Image RemovedImage Added


    At this point it’s a good idea to confirm that the rescan didn’t disturb your existing hardware links. In the figure below the hardware links are indicated by the small arrows next to the hardware I/O terminal.

  4. Activate Configuration
    The rescanned configuration is now saved and the next step is to activate it on the PLC. Click on the ‘Activate’ button in the menu bar.

    Image Added


    Restart to ‘Run’ mode when prompted.

    Image Added


    The target PLC cycles through ‘TimeOut’ and then back to ‘Run’ mode. Check the PLC status in the status bar.