System variables

The following system variables are only available if the corresponding internal process variables are defined in the project file:

System variable identifier

Function

__CURRENT_USER.FULLNAME

Returns the full name of the user currently logged in.

__CURRENT_USER.GROUPNAME

Returns the user group name of the user currently logged in.

__CURRENT_USER.GROUPTEXT

Returns the language-switchable user group name of the user currently logged in.

__CURRENT_USER.LEVEL

Indicates the authorisation level of the user currently logged in.

__CURRENT_USER.NAME

Returns the login name of the user currently logged in.

__CURRENT_USER.SECONDS_TO_AUTOLOGOFF

Indicates the number of seconds until automatic logout.

These variables must be defined in order to fulfil their function. However, they are also included in the variable count for licensing. The developer can delete the variables if they are not required.

In addition, there are the following system variables that are created without the corresponding definitions in the variable server.

System variable identifier

Function

__ACKNOWLEDGE_RESET

Sets the acknowledgement status of all currently pending alarms to "not acknowledged".

__ACTIVE_ALARMS

Returns the number of pending alarms.

__ACTIVE_ITEMS

Returns the number of all active variables.

__CHANNEL_STATE_<x>

<x>: Channel name. Specifies bit-encoded information on the communication status.

The bits have the following meanings:

  • No bit set

    No error in communication

  • 0 - START_ERROR

    Error when starting the channel

  • 1 - STATE_ERROR

    Channel in incorrect run status (OPC server only)

  • 2 - ITEM_ERROR

    Variable error during communication

  • 3 - CREATE_ERROR

    Error when creating at least one variable

  • 4 - ADD_ERROR

    Error when adding at least one variable to a group

  • 5 - VALIDATE_ERROR

    Error when validating variables

  • 6 - RECONNECT_ERROR

    Channel is currently trying to reconnect an OPC server.

  • 7 - SUSPENDED

    Communication via the communication channel is in a stopped state, i.e. it is not taking place. The channel can be reactivated by resetting the bit (value = 0).

  • 8 - CHECK_DISCONNECT

    The channel is currently being checked for functionality and may then be deactivated.

__CYCLE_MAX

Specifies the maximum cycle time of the variable server since the start.

__CYCLE_TIME

Indicates the current cycle time of the variable server.

__MASTER_SERVER

Currently not implemented.

__SYSTEM_STATE

Returns the system status.

These variables are not included in the variable count for licensing. However, it should be noted that variables with the same name should be avoided.