2 type st_upsstatus – BECKHOFF CX210009x4 User Manual
Page 70
Commissioning
Requirements
Development environ
ment
Target system type
UPS hardware
PLC libraries to include
TwinCAT v2.8.0, Build >
745 TwinCAT v2.9.0,
Build > 945
PC (i386)
• Beckhoff P24Vxxxx
USV;
• Integrated Beckhoff
Industrial PC 24V
UPS connected to
CP903x ISA or PCI
card;
• With Beckhoff
Industrial PC's
delivered APC UPS
models supporting
smart protocol and
configured with
Windows UPS
Service;
TcIoFunctions.Lib
( Standard.Lib;
TcBase.Lib;
TcSystem.Lib;
TcUtilities.Lib are included
automatically )
5.3.2
TYPE 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 utilitysupplied power into the
UPS. *)
nPowerFailCnt : DWORD; (* Power fail counter. Increments every time the UPS ser
vice 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
Not all UPS devices are able to deliver status infomation.
X : The status info is present.
CX210009x4
70
Version 1.1