LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power management

I'm considering adding a UPS to my system to prevent from power down. I
don't know whether LabVIEW has some way to manage the power, such as
knowing that it's running on battery power so we can let the program
shut down itself if the power down lasts for too long.

Thank you in advance,

Guangde Wang
0 Kudos
Message 1 of 10
(4,457 Views)
Guangde Wang wrote:

> I'm considering adding a UPS to my system to prevent from power down. I
> don't know whether LabVIEW has some way to manage the power, such as
> knowing that it's running on battery power so we can let the program
> shut down itself if the power down lasts for too long.
>
> Thank you in advance,
>
> Guangde Wang

What you really need is to look for UPS that have some
sort of monitoring port (serial , USB, whatever). Most of the better
models have this. Then you can program in LabVIEW to check
if the power is out, set a wait time, check again and power down if
necessary.

Kevin Kent
0 Kudos
Message 2 of 10
(4,456 Views)
Thank you both for help. I'm using a desk top and it needs to work over night
without any one to attend it, that's why I want to add this safety procedure.
I think the key is whether LabView can tell whether the coputer is on battery
power. I suppose that the UPS will send some signal to the corresponding port
then use LabVIEW to check this port. Is this the way?

Thank you again for help,

Guangde Wang


"Kevin B. Kent" wrote:

> Guangde Wang wrote:
>
> > I'm considering adding a UPS to my system to prevent from power down. I
> > don't know whether LabVIEW has some way to manage the power, such as
> > knowing that it's running on battery power so we can let the program
> > shut down itself if the power down lasts for too long.
> >
> > Thank you in advance,

> >
> > Guangde Wang
>
> What you really need is to look for UPS that have some
> sort of monitoring port (serial , USB, whatever). Most of the better
> models have this. Then you can program in LabVIEW to check
> if the power is out, set a wait time, check again and power down if
> necessary.
>
> Kevin Kent
0 Kudos
Message 4 of 10
(4,456 Views)
Yes I beleive this is the solution you are looking for.
Get a UPS that has a serial port and hook it to the serial
port of the PC. You should be able to check it from there.
Kevin
Guangde Wang wrote:

> Thank you both for help. I'm using a desk top and it needs to work over night
> without any one to attend it, that's why I want to add this safety procedure.
> I think the key is whether LabView can tell whether the coputer is on battery
> power. I suppose that the UPS will send some signal to the corresponding port
> then use LabVIEW to check this port. Is this the way?
>
> Thank you again for help,
>
> Guangde Wang
>
> "Kevin B. Kent" wrote:
>
> > Guangde Wang wrote:
> >
> > > I'm considering adding a UPS to my system to prevent from power d
own. I
> > > don't know whether LabVIEW has some way to manage the power, such as
> > > knowing that it's running on battery power so we can let the program
> > > shut down itself if the power down lasts for too long.
> > >
> > > Thank you in advance,
> > >
> > > Guangde Wang
> >
> > What you really need is to look for UPS that have some
> > sort of monitoring port (serial , USB, whatever). Most of the better
> > models have this. Then you can program in LabVIEW to check
> > if the power is out, set a wait time, check again and power down if
> > necessary.
> >
> > Kevin Kent
0 Kudos
Message 5 of 10
(4,456 Views)
It's not a complete solution though- most serial UPSs come with drivers that
hook into Windows so the OS knows what state the power supply is, and can
shut down gracefully when the UPS battery expires.

To be able to access the serial port via Labview and poll the UPS directly,
you have to disable this driver, I think- otherwise you can't get at the
serial port that's in use by the UPS driver. This means the Labview software
will be aware of the problem, but the rest of the system no longer will be.

I guess as a bodge you can exec the "shutdown" command shipped with the NT
reskit while the Labview stuff is exiting- this can at least force all other
applications to close and then shut down the system, but there should be a
more elegant way
of hooking into the OS for this!

I've just had a look at my UPS software- an APC SmartUPS1000, and discovered
that in the configuration are all the actions to take place on certain
events, like loss of mains power and the low battery warning. As well as the
standard loggings and notification options you can also specify an
executable to run. Looks like for this brand of UPS at least it would be
simplest to have a set of Labview VIs that, when loaded, automatically run,
send a message to the main application informing it of the event and then
quit, and have the UPS software call these.

Kevin B. Kent wrote in message
news:3A562527.55A90BEC@usa.alcatel.com...
> Yes I beleive this is the solution you are looking for.
> Get a UPS that has a serial port and hook it to the serial
> port of the PC. You should be able to check it from there.
> Kevin
> Guangde Wang wrote:
0 Kudos
Message 6 of 10
(4,456 Views)
You are absolutely correct. I made some assumptions based on seeing
this thread before. Also based on a later posting in another thread from the

same person I think we may be putting the horse before the cart.

Craig Graham wrote:

> It's not a complete solution though- most serial UPSs come with drivers
> that
> hook into Windows so the OS knows what state the power supply is, and can
> shut down gracefully when the UPS battery expires.
>
> To be able to access the serial port via Labview and poll the UPS
> directly,
> you have to disable this driver, I think- otherwise you can't get at the
> serial port that's in use by the UPS driver. This means the Labview
> software
> will be aware of the problem, but the rest of the syste
m no longer will
> be.
>
> I guess as a bodge you can exec the "shutdown" command shipped with the NT
>
> reskit while the Labview stuff is exiting- this can at least force all
> other
> applications to close and then shut down the system, but there should be a
>
> more elegant way of hooking into the OS for this!
>
> I've just had a look at my UPS software- an APC SmartUPS1000, and
> discovered
> that in the configuration are all the actions to take place on certain
> events, like loss of mains power and the low battery warning. As well as
> the
> standard loggings and notification options you can also specify an
> executable to run. Looks like for this brand of UPS at least it would be
> simplest to have a set of Labview VIs that, when loaded, automatically
> run,
> send a message to the main application informing it of the event and then
> quit, and have the UPS software call these.
> > Guangde Wang wrote:

Kevin Kent
0 Kudos
Message 7 of 10
(4,456 Views)
I have solved similar problem in my application with APC SmartUPS.
The communication between LabVIEW and UPS was done with simple "semaphore"
files
(I have configured UPS software to run batch files on certain actions).

Bojan

"Craig Graham" wrote in message
news:3a562ad5@newsgroups.ni.com...
> It's not a complete solution though- most serial UPSs come with drivers
that
> hook into Windows so the OS knows what state the power supply is, and can
> shut down gracefully when the UPS battery expires.
>
> To be able to access the serial port via Labview and poll the UPS
directly,
> you have to disable this driver, I think- otherwise you can't get at the
> serial port that's in use by the UPS driver. This means the Labview
software
> will be aware of the problem, but the rest of the system no longer will
be.
>
> I guess as a bodge you can exec the "shutdown" command shipped with the NT
> reskit while the Labview stuff is exiting- this can at least force all
other
> applications to close and then shut down the system, but there should be a
> more elegant way of hooking into the OS for this!
>
> I've just had a look at my UPS software- an APC SmartUPS1000, and
discovered
> that in the configuration are all the actions to take place on certain
> events, like loss of mains power and the low battery warning. As well as
the
> standard loggings and notification options you can also specify an
> executable to run. Looks like for this brand of UPS at least it would be
> simplest to have a set of Labview VIs that, when loaded, automatically
run,
> send a message to the main application informing it of the event and then
> quit, and have the UPS software call these.
>
> Kevin B. Kent wrote in message
> news:3A562527.55A90BEC@usa.alcatel.com...
> > Yes I beleive this is the solution you are looking for.
> > Get a UPS that has a serial port and hook it to the serial
> > port of the PC. You should be able to check it from there.
> > Kevin
> > Guangde Wang wrote:
>
>
>
0 Kudos
Message 8 of 10
(4,457 Views)
Guangde Wang wrote:
>I'm considering adding a UPS to my system to
>prevent from power down. I don't know
>whether LabVIEW has some way to manage the
>power, such as knowing that it's running on
>battery power so we can let the program shut
>down itself if the power down lasts for too
>long.
>
>Thank you in advance,
>
>Guangde Wang


If you use a laptop computer, when AC down,
it'll switch to battery automatically. And
it's easy to find out if it's on battery,
and how much power left.

George
0 Kudos
Message 3 of 10
(4,456 Views)
Has anyone been able to come up with some code to interface between the APC products and Labview? I have not been able to get this to work. Here are the guidelines that APC sent me. Thanks Chris


http://eu1.networkupstools.org/protocols/apcsmart.html
0 Kudos
Message 9 of 10
(4,433 Views)

Hi, Bullet. Have you succeeded in communicating with the APC UPS?

I got an APC Back-Ups 500 and I need to communicate with it through serial (LabVIEW realtime). The UPS comes with an USB cable, but there is an alternative serial cable. I've been looking for information from APC, but have found nothing.

Thank you,

 

Daniel

0 Kudos
Message 10 of 10
(4,304 Views)