Skip to main content

Command: Login

Symbol: _cds_icon_login.png

Keyboard shortcut: Alt+F8

Function: The command connects the application to the target system (controller or simulated device) and starts the online mode.

Call: Online menu; context menu of an Application object

Requirement: The application does not contain any errors and the communication settings are configured.

A dialog prompt opens if the communication settings are incorrect. You can then switch directly to the Communication Settings of the controller.

If you click Login from the online menu, then the active application is connected to the target system. If you select the command from the context menu while an application is selected in the device tree, then that application is logged in, even if it is not set as the "active application".

If an online user management is configured on the target device, then you are prompted for user credentials when you log in. The Device User Login dialog opens for this.

Checking the options for accessing the controller

Controllers must never under any circumstances be accessible from the Internet or from untrusted networks. In particular, the programming ports of the controller must never be accessible from the Internet without security protection (mostly UDP ports 1740..1743 and TCP ports 1217 + 11740 or the controller-specific ports). If access from the Internet still has to be granted, then it is imperative that a secure method be selected to connect to the controller (example: VPN).

For more information, see: Handling of Device User Management

Important

If a safety controller is inserted below a controller, then this command can temporarily interrupt the communication connections.

Connections of the safety controller to other safety controllers (via safety network variables), to field devices, and to the development system are affected. The safe field devices or other safety controllers can enter the safe state as a reaction. The connection to the development system is affected only when a safety controller that is connected to the main controller via a fieldbus.

For more information, see the "Subordinate Safety Controllers" chapter.

. Possible situations at login
  • A later version of the device description (than in the project) is on the controller. A warning prompt opens with the option to cancel the process.

  • The application does not exist on the controller, and you are prompted to confirm the download.

  • The application already exists on the controller and has not been changed since the last download. The login continues without any more prompts.

  • The application exists on the controller, but it has been changed since the last download.

    You are prompted to select one of the following options:

    • Login with online change. (Note the information about online changes in the "Command: Online Change" help page.)

    • Login with download

    • Login without any change

    At this point, you also have the option to update the boot application on the controller.

  • An unknown version of the application exists on the controller. CODESYS prompts you whether or not to replace it.

  • A version of the application exists on the controller and is running. CODESYS prompts you whether or not to log in anyway and overwrite the currently running application.

  • The application on the controller is currently halted at a breakpoint. You are logged out and the program has been changed: CODESYS prompts you with a warning that the controller will be stopped completely if an online change or download is performed. This happens also if multiple tasks exist and the breakpoint affects only one of them.

Click Details in the dialogs above to open the Application Information dialog.

Tip

In CODESYS V3.5 SP17 and higher, only exactly one CODESYS instance can ever be logged in to an application of a controller. If a second CODESYS instance wants to log in to the same application of the same controller, then an error message is displayed.

For more information, see: Online Change and Subordinate Safety Controller

Dialog: Application Information (Details)

The dialog provides two tabs with comparative information about the application changed in the development system and its previous version which currently exists on the controller. There are two tabs:

  • Application information: The application properties of the Application in the IDE (Integrated Development Environment) are compared with those of the Application in the PLC: Project name, Last modification, IDE version, Author, Description. In addition, CODESYS shows the objects which have changed since the last download.

  • Application contents: When the Download application info is selected, the contents of the applications on both the (1) development system and (2) controller can be compared. The Download application info option is located on the Application Build Options tab of the application properties.

    If the code in the development system is not up to date, then (3) Application not up to date. Generate code now? is displayed at the bottom left of the dialog. Execute this command to update the application source code.

    This detailed information can help you to better assess the impact of login in the current situation and to make a decision about downloading the new application.

_cds_dlg_application_content_comparison.png

Tip

The comparison can also be displayed in the device editor on the Applications tab by clicking the Content button.

Unknown applications on the controller

If one or more applications already exist on the controller, but do not exist in the project, then CODESYS opens a dialog with a list of these applications. You can then define whether or not an application should be deleted before loading the current application from the controller. This also applies to child applications which exist on the controller, but have been deleted from the project in the meantime.

Compiling the project before login

If an application program has not been compiled since the last change, then CODESYS compiles the project before login. This operation is the same as the Generate Code command when logged out.

If errors occur during the compile operation, then a dialog prompt opens. The errors are displayed in the message view in the Build category. You can then decide whether or not you log in without downloading the program to the controller.

Error at login

If an error occurs when logging in to the controller, then CODESYS cancels the load operation with an error message. The error dialog gives you the option of showing the error details. If an exception was thrown and the text *SOURCEPOSITION* is included in the log, then you can display the relevant function in the editor by clicking Show in Editor. The cursor jumps to the line containing the error.

Messages during the download operation

. When CODESYS downloads the project to the controller at login, the following information is output to the message view:
  • Generated code size

  • Size of the global data

  • Resulting memory requirement on the controller

  • List of the affected POUs (for online change)

Tip

In online mode, you cannot change the settings of the devices or modules. You have to log out of the application in order to change device parameters. Depending on the bus system, there may be some specific parameters which you can also change in online mode.

Tip

CODESYS saves the configuration of the view separately in online and offline mode. Moreover, views are closed which cannot be used in any operating mode. For this reason, the view can change automatically at login.