UPS information in the Windows Registry

The UPS service communicates with the Beckhoff UPS driver via the Windows Registry. You can access this information in read mode. In order to configure the UPS (write), please use the "Beckhoff UPS Configuration dialog". Caution is required if you wish to directly change the UPS configuration in the Windows Registry (write).

Status information

 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UPS\Status

The keys under here are continuously updated by the UPS driver whenever the status of the UPS changes.

Notice:

Not every UPS device can supply all the status information. Overview of the status information supported.

Name

Type

Description

Default value

BatteryCapacity

REG_DWORD

Remaining UPS battery capacity in percent. This element can adopt a value between 0 and 100 (the value displayed is rounded up).

0

BatteryStatus

REG_DWORD

Current status of the UPS battery. This element can adopt the following values:

  • 0 := the battery status is unknown;
  • 1 := the battery status is OK;
  • 2 := the battery must be exchanged;

0

CommStatus

REG_DWORD

Status of communication with the UPS. This element can adopt the following values:

  • 0 := the communication with the UPS has an unknown status;
  • 1 := the communication with the UPS is OK;
  • 2 := the communication with the UPS has been interrupted.

0

FirmwareRev

REG_SZ

Returns the UPS firmware version number as a string.

""

SerialNumber

REG_SZ

Returns the UPS serial number as a string.

""

TotalUPSRuntime

REG_DWORD

The remaining UPS battery time in minutes.

0

UtilityPowerStatus

REG_DWORD

Returns the status of the power supply. This element can adopt the following values:

  • 0 := the status of the power supply is unknown;
  • 1 := the power supply is OK;
  • 2 := a power failure has been detected;

0

TcPowerFailCnt

REG_DWORD

Power failure counter. The counter increments every time a power failure is detected.

0

BatteryReplaceDate

REG_SZ

Date of the last battery change. The date can be set with a command in the Beckhoff UPS Configuration dialog -> Device Configuration…. Implemented in the UPS software v3.0.0.8 and higher.

""

TcChargeFlags

REG_DWORD

Battery charge and status flags. This element can adopt one or more values (bits) combined:

  • 0 := unknown status (all bits are zero)
  • 1 := charge status "High" (bit 0 is set);
  • 2 := charge status "Low" (bit 1 is set);
  • 4 := charge status "Critical" (bit 2 is set);
  • 8 := charge status "Charging" (bit 3 is set);
  • Bit 4 - 6 reserved;
  • 128 := No battery connected/found (bit 7 is set);
  • 256 := UPS fan error (bit 8 is set);
  • Bit 9 is reserved;
  • 1024 := Battery change interval service has expired (bit 10 is set). Implemented in the UPS software v3.0.0.8 and higher.
  • Bit 11 - 31 reserved;

0

Configuration settings

 
KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UPS\Config

The keys below it are used by the UPS service for the configuration of the UPS:

Name

Type

Description

Default value

Vendor

REG_SZ

Name of UPS manufacturer

"(none)"

Model

REG_SZ

UPS model designation

""

RunTaskEnable

REG_DWORD

Activates/deactivates the configuration of the Task Scheduler shutdown task:

  • 0 := deactivated;
  • 1 := activated;
  • other values are not permissible;

0

TaskName

REG_SZ

Name of the Task Scheduler shutdown task. The Beckhoff UPS Configuration dialog generates a shutdown task with the name: "UPS System Shutdown Program".

""

TaskFolder

REG_SZ

Path to the folder containing the Task Scheduler shutdown task. Implemented in the UPS software v3.0.0.10 and higher. An empty string represents the root folder.

""

TaskCompatibility

REG_DWORD

Task Scheduler v1.0 compatibility settings. Implemented in the UPS software v3.0.0.10 and higher:

  • 0 := automatic, uses the latest Task Scheduler interface version
    (at present v2.0);
  • 1 := explicitly the Task Scheduler v1.0 is to be used;
  • 2 := explicitly the Task Scheduler v2.0 is to be used;
  • other values are not permissible;

0

RunTaskWait

REG_DWORD

Maximum running time (execution time) of the shutdown task in seconds. Following the expiry of this time the shutdown task is stopped and the shutdown is continued. Implemented in the UPS software v3.0.0.8 and higher and only under Windows Vista, W7, WES 7 (32 and 64-bit). With older operating systems this time cannot be changed and is fixed at 30 seconds.

30

ShutdownOnBatteryEnable

REG_DWORD

Activates/deactivates the shutdown of the operating system on a critical alarm:

  • 0 := deactivated;
  • 1 := activated;
  • other values are not permissible;

1

ShutdownOnBatteryWait

REG_DWORD

Maximum running time on battery voltage before the critical alarm in minutes. This element can adopt a value of between 0 and 720. Other values are not permissible.

2

NotifyEnable

REG_DWORD

Activates/deactivates the power-fail messages to the logged-in user:

  • 0 := deactivated;
  • 1 := activated;
  • other values are not permissible;

0

TurnUPSOffEnable

REG_DWORD

Activates/deactivates the switching-off of the UPS output voltage after the shutdown:

  • 0 := deactivated;
  • 1 := activated (switches off);
  • other values are not permissible;

1

TurnUPSOffWait

REG_DWORD

Maximum delay time in seconds for switching off the UPS output voltage after initiating the Windows shutdown. The permissible values can differ from model to model (depending on hardware).

180

BatteryReplaceNotifyEnable

REG_DWORD

Activates/deactivates the logging of the battery change service interval warnings in the Windows event log: UPS software v3.0.0.8 and higher.

0

BatteryReplaceNotifyWait

REG_DWORD

Delay time in months for the first battery change warning. This element can adopt a value of between 0 and 480 months. Other values are not permissible. Implemented in the UPS software v3.0.0.8 and higher.

60

Advanced Settings

 
KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UPS

Name

Type

Description

Default value

FirstMessageDelay

REG_DWORD

Delay time in seconds for the first power-fail message to the user

5

MessageInterval

REG_DWORD

Delay time in seconds for further power-fail messages to the user.

20