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..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;(* Battery charge status flags. This member can be one or more of the following values.
Bits0..7 := General battery status flags (if all bits are set to 0 => unknown status)
Bit0 := High (bit set => high battery charge)
Bit1 := Low (bit set => low battery charge)
Bit2 := Critical (bit set => battery is near empty)
Bit3 := Charging (bit set => battery is charging)
Bits4..6 := reserved (all bits are 0)
Bit7 := No Battery (bit set => battery not found or not connected, bit not set => battery is existing or unknown state)
Bits8..15 := Special status information (if all bits are set to 0 => state ok or uknown state)
Bit8 := UPS Fan Error (bit set => fan hardware is reporting an error, bit not set => fan is ok)
Bit9 := Overt Temperature (bit set => over temperature detected, bit not set => temperature is ok)
Bit10 := Service Interval Notify (bit set => service interval time expired, bit not set => service interval time not expired)
Bit11 := Under Temperature (bit set => under temperature detected, bit not set => temperature is ok)
Bit12 := Fuse Not Ok (bit set => fuse broken or missed, bit not set => fuse ok)
Bit13 := Alarm1 (reserved for later use, bit is 0)
Bit14 := Alarm2 (reserved for later use, bit is 0)
Bit15 := Alarm3 (reserved for later use, bit is 0)
Bits16..31 := reserved for later use, all bits are 0)
*)
END_STRUCT
END_TYPE
Not all UPS devices are able to deliver status infomation.
X : The status info is present.
*) Only available if model "Smart Signaling to any APC UPS & TwinCAT" configured!
Status info | Beckhoff | Beckhoff | Beckhoff | Beckhoff | APC | Description |
---|---|---|---|---|---|---|
Vendor | X | X | X | X | X | Reports the UPS vendor name as displayable string. |
Model | X | X | X | X | X | Reports the UPS model name as displayable string. |
FirmwareRev | X | X | X | X | X | Reports the UPS firmware revision as a displayable string. Empty string if not available. |
SerialNumber | X | X | None | X | X | Reports the UPS serial number as a displayable string. Empty string if not available. |
BatteryLifePercent | X | 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 | X | None | X | X | The amount of remaining UPS run time, in minutes. Zero if not available. |
eBatteryStatus |
|
|
|
| X | The current status of the UPS batteries. |
eCommStatus | X | X | X | X | X | The status of the communication path to the UPS. |
ePowerStatus | X | X | X | X | X | Reports the status of utility-supplied power into the UPS. |
nPowerFailCnt | X | X | X | X | *X | Power fail counter. Increments every time the UPS service detects power fail. |
dwChargeFlags |
|
|
|
| None | Battery charge status flags and special status information. |
UPS hardware | Target system type | Development environment | PLC libraries to include |
---|---|---|---|
| PC or CX | TwinCAT v2.8.0, Build > 745 TwinCAT v2.9.0, Build > 945 | TcIoFunctions.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib are included automatically ) |
TwinCAT v3.0 and above | Tc2_IoFunctions |