Board index » cppbuilder » Help In UPS!

Help In UPS!


2003-11-19 09:13:12 AM
cppbuilder38
Hi!
I have Builder 6! Currently I'm doing my final year project on a UPS. I
wanted to create a power management software. I need to interface the UPS to
the CPU using a serial port, and I've a code to interface it. However, the
code do read the port but I can't find any information coming from the UPS.
I need information on the voltage level so that I can do shutdown if power
failure occurs. Can anyone help me with serial interfacing of UPS to CPU?
How do I do the shutdown? I'm using a PowerKinetics Blackout Buster and
running on Windows XP. Thanks
Wilson
 
 

Re:Help In UPS!

"Wilson Entalai" < XXXX@XXXXX.COM >wrote in message
Quote
I need to interface the UPS to the CPU using a serial port, and
I've a code to interface it. However, the code do read the port
but I can't find any information coming from the UPS.
UPSs don't usually send information until something actually happens.
Quote
I need information on the voltage level so that I can do shutdown
if power failure occurs.
That's not how UPSs generally work. If the power goes out, the UPS switches
over to its internal battery and then sends a notification to the serial
port, if connected. It does not send anything beforehand. You can't
monitor the voltage in your software, because that information is not made
available to you. The USP tracks that internally and only tells the
computer things like when the power has gone out or has been restored, or if
the battery is running low.
With that said, there are some UPS models that provides enhanced tracking
and status info. But I do not how to work with those.
Quote
How do I do the shutdown?
Look at ExitWindowsEx().
Quote
I'm using a PowerKinetics Blackout Buster and running on Windows XP.
XP has built-in support for UPSs, so why do you need to make your own? Or
why not use the softwre that comes with the UPS?
Gambit
 

Re:Help In UPS!

Hi Remy,
It's his class final project... :-)
Hi Wilson,
First thing you need to do is ensure that your comm is
actually working. When I developed Serial COM I
connected two computers via a NULL modem,
wrote a test program that transmitted a character, then
used Hyperterminal on the "remote" computer to monitor
the COM line. Once I was seeing that I was successfully
sending data on the COM line, I modified the test program
so it would continuously transmit the last character it received
over the serial port
For instance, when I ran the program it would continuosly
transmit 'A', but if I typed 'B' on the remote computer, it
would transmit 'B'
Once you know your program can and does interface with the
serial port properly, you need to do two things:
1) make sure you are using the exact same communication
parameters that the UPS uses (baud/stop/polarity)
2) determine the "command sequence" to send to the UPS to
elicite a responce... can't help you there, try a google search.
Good luck,
Have FUN
Stephan
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
XP has built-in support for UPSs, so why do you need to make your own?
Or why not use the softwre that comes with the UPS?
Gambit
"Wilson Entalai" < XXXX@XXXXX.COM >wrote in message
I'm doing my final year project on a UPS
 

{smallsort}

Re:Help In UPS!

Thanks guys! I'll try out your suggestions. By the way, Is there a possible
way to access the memory location directly? Since the serial port has it's
own memory allocation, how can I see the data in the memory allocated.
Serial port memory location is 03F8 and 03FF. I think, if we can see the
data in that memory location, it may gives on information on the UPS
condition. By that, data can be manipulated to do the shutdown. How do I
know which pin of the serial goes to which memory location?
Thanks a lot!
Wilson