ST_UPSStatus
TYPE ST_UPSStatus
STRUCT
Vendor : STRING; (* Reports the UPS vendor name as displayable string. *)
Model : STRING; (* Reports the UPS model name as displayable string. *)
FirmwareRev : STRING; (* Reports the UPS firmware revision as a displayable string. *)
SerialNumber : STRING; (* Reports the UPS serial number as a displayable string. *)
BatteryLifePercent : DWORD; (* The percent of battery capacity remaining in the UPS, represented as a value in the range of 0 through 100. *)
BatteryLifeTime : DWORD; (* The amount of remaining UPS run time, in minutes. *)
eBatteryStatus : E_BatteryStatus; (* The current status of the UPS batteries. *)
eCommStatus : E_UpsCommStatus; (* The status of the communication path to the UPS. *)
ePowerStatus : E_UpsPowerStatus; (* Reports the status of utility-supplied power into the UPS. *)
nPowerFailCnt : DWORD; (* Power fail counter. Increments every time the UPS service detects power fail. *)
dwChargeFlags : DWORD; (* Most reserved for future use.
Battery charge status flags. This member can be one or more of the following values.
0: Unknown status (all bits set to 0)
1: High (bit 0 is set)
2: Low (bit 1 is set)
4: Critical (bit 2 is set)
8: Charging (bit 3 is set)
- - (bits 4 - 6 reserved)
128: No battery (bit 7 is set)
256: UPS fan error (bit 8 is set)
- - (bits 9 reserved)
1024: Service interval message (bit 10 is set)
- - (bits 11 - 31 reserved)
*)
END_STRUCT
END_TYPE
E_UpsPowerStatus E_UpsCommStatus E_BatteryStatus
Not all UPS devices are able to deliver status infomation.
X : The status info is present.
Status info |
Beckhoff P24Vxxxx UPS |
Beckhoff 24V UPS connected to CP903x ISA or PCI card |
APC Back-UPS Pro 280 |
APC Smart-UPS 420 |
Description |
---|---|---|---|---|---|
Vendor |
X |
X |
X |
X |
Reports the UPS vendor name as displayable string. |
Model |
X |
X |
X |
X |
Reports the UPS model name as displayable string. |
FirmwareRev |
X |
X |
X |
X |
Reports the UPS firmware revision as a displayable string. Empty string if not available. |
SerialNumber |
X |
None |
X |
X |
Reports the UPS serial number as a displayable string. Empty string if not available. |
BatteryLifePercent |
X |
None |
X |
X |
The percent of battery capacity remaining in the UPS, represented as a value in the range of 0 through 100. Zero if not available. |
BatteryLifeTime |
X |
None |
X |
X |
The amount of remaining UPS run time, in minutes. Zero if not available. |
eBatteryStatus |
|
|
X |
X |
The current status of the UPS batteries. |
eCommStatus |
X |
X |
X |
X |
The status of the communication path to the UPS. |
ePowerStatus |
X |
X |
X |
X |
Reports the status of utility-supplied power into the UPS. |
nPowerFailCnt |
X |
X |
*X |
*X |
Power fail counter. Increments every time the UPS service detects power fail. |
dwChargeFlags |
|
|
None |
None |
Battery charge status flags. |
*) Only available if model "Smart Signaling to any APC UPS & TwinCAT" configured!
Requirements
Development environment |
Target system type |
UPS hardware |
PLC libraries to include |
---|---|---|---|
TwinCAT v2.8.0, Build > 745 TwinCAT v2.9.0, Build > 945 |
PC (i386) |
|
TcIoFunctions.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib are included automatically ) |