Command ‘Login’

Symbol: ; keyboard shortcut: Alt+F8.

Function: This command connects the application to the target system (PLC to simulated device) and starts the online mode.

Call: Menu bar: Online ; context menu of object: Application

Requirement: The application contains no 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 PLC.

If you click Login from the online menu, then the currently active application is connected to the target system. If you choose this command from the shortcut menu (right-click) 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 data when you log in. The Device User Login dialog opens.

Caution

Check controller accessibility For security reasons, controllers should not be accessible from the Internet or untrusted Networks under any circumstances! In particular, the TCP/IP programming ports (usually UDP-Ports 1740..1743 and TCP-Ports 1217 + 11740 or the controller specific ports) should not be accessible from the internet without protection. In case Internet access to the controller is needed, using a a safe mechanism is absolutely mandatory, such as VPN and password protection of the controller.

see also: Handling User Management on the PLC

Hint

If a safety controller is inserted below a PLC, then this command can temporarily interrupt the communication links of the safety controller to other safety controllers (via safety network variables), to field devices, and to the development system. The safe field devices and the other safety controller can enter the safe state as a reaction. The connection to the development system is affected only in the case of a safety controller that is connected to the main controller via a fieldbus. For more information, refer to the section “Subordinate Safety Controllers”.

Possible situations when logging in:

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

See also

Dialog ‘Application Information’ (Details)

This dialog provides two tabs with comparative information about the application changed in the development system and its previous version currently located on the PLC. 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 that have changed since the last download.

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

    If the code in the development system is not current, then (3) Application not up to date. Generate code now? appears 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 effects of login in the current situation and to make a decision about downloading the new application.

Note

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

See also

Unknown applications in the PLC

If one or more applications are already on the PLC, but are not in the project, then CODESYS opens a dialog with a list of these applications. You can then define whether an application should be deleted before loading the current application from the PLC. This also applies to child applications that are on the PLC, 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 Build command when logged out.

If compile errors occur, then a dialog prompt opens. The errors are printed to the message view (Build category). You can then decide whether or not you log in without downloading the program to the PLC.

See also

Error at login

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

Messages during the download process

If CODESYS downloads the project to the PLC at login, then the following information is printed to the message view:

  • Generated code size
  • Size of the global data
  • Resulting memory requirement on the PLC
  • List of the affected blocks (for online change)

Note

In online mode, you cannot change the settings of the devices or modules. You must log out of the application for changing device parameters. Depending on the bus system, there may be some special parameters that you can also change in online mode.

Note

CODESYS saves the view configuration separately in online and offline mode. In addition, views are closed that cannot be used in any operating mode. Due to this, the view can change automatically at login.