Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPS uninterruptible power supply

Status
Not open for further replies.

MickTheBelgian

Programmer
Jan 11, 2001
160
DK
I program for a standalone Dell with UPS. The UPS software can shut down the PC but then it will not come up again by itself after the current comes back on. It is one of these "soft-power" things, I can set it to start after a power loss, but if it shuts down properly before the UPS is dead it will never feel the outage! So I need to detect when the UPS kicks in, shut down all strategic processes, and then allow the PC to crash when the UPS dies.
Any good suggestions for detecting when the UPS goes on batteries?
 
Who makes the UPS? APC has software that will do an unattended shutdown for most of their UPSes. However, only their higher-end models will power up again once power is restored.

Chip H.
 
It is a small APC. I haven't received it yet so I don't know all details. You mean that after software shutdown, it will physically cut power to the PC and after power returns I will have to go and push a button on the APC? Hmm, that doesn't sound very good. Defeats a little the purpose of a UPS if you ask me. Well, I guess I'm up for some experimenting. Does anybody know if the comunication protocol beetween PC and UPS is an open protocol? Can you write your own driver?
 
There is a standard protocol that Microsoft defined way back in NT4.0, but AFAIK, none of the UPS manufacturers use it.

If there's a momentary loss of power (within the ability of the battery in the UPS to handle) your PC will only receive the "on battery" notification. Once the battery gets low, the UPS will send a power-fail notification to the PC and it will begin shutting down. After the utility power comes back on, the low-end UPSes will require you to restart them. The "smart" UPSes will wait until their batteries have recharged to a certain point before turning themselves on.

Your PC's BIOS may have a setting on whether to stay off when power is applied -- most desktop PCs don't have it, but the workstation and server-class PCs might have it.

If you want to write an application around a UPS, take a look at the Win32 WM_POWERBROADCAST message (you'll need to hook the windows messages to see it).

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top