LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV PDA: Detecting Power button press

Hi,
I am developing an application that i want to run on a PDA fulltime, so it'll be started and the power button will perodically be used to stand-by the ipaq. I need to perform an operation when the PDA is powered on in order to reinitialise my DAQ card in the CF slot.

I've found the "First call" VI, but this doesnt give a signal if the ipaq is power cycled. So my question is, how do i detect from LV PDA when either: the pda is powered on, or when the power button is pressed?

Thanks
Matt
0 Kudos
Message 1 of 4
(3,148 Views)
I'm having a simmilar problem with my bluetooth application. If I power down the pda, I need to re-establish my communications link. The refnum used for i/o is closed automatically, similar to when a vi ends. I'm still looking for something maybe a program you run in the background that you share a global status variable with.
Good luck!
0 Kudos
Message 2 of 4
(3,103 Views)
I've found a solution that doesnt require checking for power on now. Not sure if this will help you or not..
Basically when the program first runs, i do the init. code. Then each time the program loops i check for an error from the dac card. If there is no error- run the acquisition code. However if there is an error (The pda has been power cycled and the program is trying to reference a card that isnt there) run the init code again and use a shift register to pass the new refnum onwards.

Matt
0 Kudos
Message 3 of 4
(3,098 Views)
I did something similar. My only problem now is getting the server and the client to sync. Bluetooth syncing is tricky since the server needs to open a channel first before the client or pda can "listen". The Server doesn't always open the same channel every time. (1-4channels).
I'm going to try the discovery method next.
0 Kudos
Message 4 of 4
(3,090 Views)