Skip to main content

Downloading the Application Code, Logging in, and Starting the PLC

In order to download the source code of your application to the PLC, you need to log in to the PLC with application. If there are several applications in the project, then you need to explicitly switch to the correct application first.

When you download an application to the controller, CODESYS performs the following checks:

The list of applications on the PLC is compared with the applications available in the project. If they do not match, then you are prompted to download the application that is not on the PLC yet or delete existing applications.

For "externally implemented" blocks in the application to be downloaded, CODESYS checks whether these are available on the PLC. If they are not available, then the message "unresolved reference(s)" is printed to a dialog prompt and to the message view. Then CODESYS compares the parameters (variables) of the blocks in the application to be downloaded and the parameters of the same-named blocks in the application that exists on the PLC (signature check). If there are any inconsistencies, then the message "invalid signature(s)" is printed to a dialog prompt and to the message view.

If the "Download application info" option is selected in the application properties, then additional information about the application contents are downloaded to the PLC.

If multiple applications exist for the same device, then notice that the I/O Mapping dialog contains the definition for which of the applications is used for the I/O mapping of the device.

Note: If a connection is established from CODESYS to a PLC and the CODESYS Automation Server is connected to the PLC via an edge gateway, then CODESYS Automation Server might overwrite local changes on the PLC. For this purpose, a message is displayed in the message view in CODESYS when the connection to the PLC is established after opening the project in CODESYS for the first time.

For more information, see: Application

Transferring an application and starting the program

Requirement: The application contains no errors and the communication settings of the PLC are correct. The application does not exist yet on the PLC. The application and the communication with the controller are not encrypted.

  1. In the device tree, select the desired application. In case you have only one application, skip to Step 3.

  2. Click Set Active Application.

    The application name appears in bold typeface.

  3. Click Online → Login.

    A dialog prompts you whether the application should be created on the PLC.

  4. Click Yes to confirm the dialog.

    The application is downloaded to the controller.

  5. Click Debug → Start or press the F5 key.

    The application is running on the controller.