-

Connecting vs. Monitoring Mode vs. Debug Mode

Between PLCnext Engineer and the Safety PLC, three (hierarchical) connection levels are distinguished.

You can manually detach and disconnect at any level.

Level 1: connected to the Safety PLC

To establish a communication connection...

  • Right-click the Safety PLC in the PLANT and select 'Connect/Disconnect' from the context menu.

    Or

  • Select 'Connect/Disconnect' from the context menu of the Safety PLC in the ONLINE STATE window.

    Or

  • Click the 'Connect to Safety PLC' button on the Safety Cockpit toolbar.

Not yet logged on to the standard controller? If the controller involved (which contains the Safety PLC) implements a secure device concept, and if you are not yet logged on to the controller (black shield symbol beside the controller icon in the PLANT), the logon dialog appears when connecting. Enter a user name of the desired and suitable role as well as the relating password and press <Enter> to log on. (Make sure that the user role you are entering allows writing and starting the safety-related project.)
If an authentication error occurs during connection establishment (due to a rejected or unknown controller certificate), a dialog appears where you can instruct PLCnext Engineer to establish the ("unsecured") connection nevertheless.

While you are logged on to the controller, this is indicated by a green shield symbol beside the controller icon in the PLANT. When hovering the mouse on the controller icon, a tooltip appears showing logon information. If you have accepted an "unsecured" connection, the following shield symbol is displayed:

Note
No Safety PLC password is required to establish the communication connection.

Note
When connecting to the Safety PLC while no project is yet stored on it (e.g., first time connection), the debug mode is active by default and the 'Debug Mode' icon appears pressed in the Safety Cockpit. The reason is that the Safety PLC expects to receive a project in this mode.

While connected, the Safety Cockpit displays the Safety PLC state (section 'Health') and some more controller information. The Safety PLC icon in the PLANT also reflects the current Safety PLC state:

Examples:
= state On, no project loaded
= state Safe Run or Debug Run
= state Safe Stop or Debug Stop
= state Debug Halt

Also refer to the topic "Safety PLC States".

Being connected to the Safety PLC, the following operations are possible:

Level 2: monitoring mode activated (attached in read-only mode to the safety-related application process)

Activating the monitoring mode of the Safety PLC means attaching PLCnext Engineer to the running safety-related application and establishing an online connection with read-only access. This is only possible if the Safety PLC is already connected (level 1).

Note
Monitoring mode allows read-only access to the Safety PLC. Therefore, monitoring mode is considered as safety-related mode as the execution of the application cannot be influenced by debug commands.

Activate the monitoring mode as follows:

While the communication connection (level 1) is established:

  • Right-click the Safety PLC node in the PLANT and select 'Monitor Mode' from the context menu.

    Or

  • Select 'Monitor Mode' from the context menu of the Safety PLC in the ONLINE STATE window.

    Or

  • Click the 'Monitoring Mode' button on the Safety Cockpit toolbar.

    Note
    No Safety PLC password is required to activate the monitoring mode.

In monitoring mode...

Level 3: debug mode activated (attached with write access to the safety-related application process)

Activating the debug mode of the Safety PLC means attaching PLCnext Engineer to the running safety-related application and establishing an online connection with write access. This is only possible if the Safety PLC is already connected (level 1).

Note
Debug mode allows write access to the Safety PLC (in contrast to monitoring mode). Therefore, debug mode is considered as non-safety-related mode as the execution of the application can be influenced by debug commands.
The Safety PLC password is required to activate the debug mode.

Note
The Safety PLC will not stop the operation automatically when switching to debug mode.

Activate the debug mode as follows:

While the communication connection (level 1) is established or while monitoring mode is already active (level 2):
  1. Right-click the Safety PLC node in the PLANT and select 'Debug Mode' from the context menu.

    Or

    Select 'Debug Mode' from the context menu of the Safety PLC in the ONLINE STATE window.

    Or

    Click the 'Debug Mode' button on the Safety Cockpit toolbar.

  2. Not yet logged on to the Safety PLC?

    When initially switching to debug mode: the 'Safety PLC Password Definition' dialog appears where you have to define and confirm a password.

    If a password is already defined but you are not yet logged on to the Safety PLC, the 'Safety PLC Authentication' dialog appears. Enter the Safety PLC password and click 'OK'. Refer to the topic "Safety PLC Password protection" for further information.

    If you cancel the authorization, no write access to the Safety PLC is possible and debug mode is not activated. Online values, however, can be read from the Safety PLC. This means monitoring mode (level 2) can be accessed without being logged on to the Safety PLC.

  3. A dialog appears where you have to confirm the mode activation by clicking 'Yes'.

While the debug mode is active, the status bar shows a red dot next to the entry 'Safety PLC: Debug Mode Active'.

In debug mode, you can

Further Info
See topic "Debug Mode" for details.

Detaching and Disconnecting


or
The monitoring mode and the debug mode can be terminated by detaching from the running safety-related application process. Terminating the monitoring mode or the debug mode means switching back to programming mode.
Select 'Monitoring Mode' or 'Debug Mode' from the context menu of the Safety PLC node (PLANT), or from the context menu of the Safety PLC in the ONLINE STATE window, or click the appropriate button on the Safety Cockpit toolbar (see icon left).

Note
When terminating the debug mode, a dialog appears where you have to confirm the switching of the mode by clicking 'Yes'.

After terminating the debug mode, monitoring mode remains active. After terminating monitoring mode, PLCnext Engineer is still connected to the Safety PLC but no online values are transmitted any longer.

Also refer to the next section "Debug Watchdog".

When selecting the 'Connect/Disconnect' command from the Safety PLC context menu in the PLANT or on the Safety Cockpit toolbar (see icon left) while monitoring mode or debug mode is active, PLCnext Engineer detaches from the application process (programming mode becomes active) and then disconnects from the Safety PLC.

Debug watchdog

If the Safety PLC runs in debug mode and the communication connection between PLCnext Engineer and Safety PLC is interrupted (physically) or disconnected (by command), a debug watchdog timer starts. If the connection to the Safety PLC can be reestablished and you continue debugging or switch the target back to programming mode within 10 minutes, the debug watchdog is reset. If the debug watchdog timer exceeds 10 minutes, the Safety PLC stops and writes an error to the error stack. The machine is signaled to assume the defined safe state. In this case, you have to reset the Safety PLC.

The purpose of this watchdog is to ensure that no variables remain forced or overwritten in case that the communication between Safety PLC and PLCnext Engineer is interrupted.