Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-GPIB does not like returning from computer power-save mode. I need to restart the application. Uggh! Customer not happy.

It seems volatile memory is lost on the PCI GPIB Card. When the system returns from power-save, I cannot get to my GPIB instruments. I have to close the application and restart it. I've tried unregistering and reregistering the gpib globals and resetting the device interfaces (reissuing the ibdev command) without luck. I am using Visual Basic 6, but I also get the Measurement and Automation Explorer to fail in the same way, so I don't think it is my development environment.
0 Kudos
Message 1 of 5
(3,510 Views)
On Sat, 15 May 2004 20:23:58 -0500 (CDT), SQP Products wrote:

>PCI-GPIB does not like returning from computer power-save mode. I
>need to restart the application. Uggh! Customer not happy.
>
>It seems volatile memory is lost on the PCI GPIB Card. When the
>system returns from power-save, I cannot get to my GPIB instruments.
>I have to close the application and restart it. I've tried
>unregistering and reregistering the gpib globals and resetting the
>device interfaces (reissuing the ibdev command) without luck. I am
>using Visual Basic 6, but I also get the Measurement and Automation
>Explorer to fail in the same way, so I don't think it is my
>development environment.

Can you change your power save settings? What operating system
are you running?


Also, some BIOS's have options for power save. For example, recent
IBM's can be set to maintain power to all peripherals, or only to main
memory. Of course, you would want it to maintain power.

I suspect the GPIB board and its driver are completely unable to
handle power save operation. It probably was never considered while
it was being designed.

Aidan Grey
0 Kudos
Message 2 of 5
(3,510 Views)
The 2.1 driver improved it's behavior from the 2.0 driver for power management. When coming out of standby, if you take all handles offline using ibonl(ud,0) you should have better luck restoring your application. When the system goes to standby, the board must be powered down and loses its context. In order to restore the context, you must first uninitialize, using the ibonl call. Then you must re-initialize using ibdev or ibfind.

The next version of the driver will improve on this slightly. If you have an application open that is using a GPIB handle, the driver will request that the system not go to standby.

I would try to avoid using the GPIB-ENET/100 in situations where your system will lose power. In this situation the network card may l
ose power and the connection to the GPIB-ENET/100 will be lost.

Craig A.
National Instruments Engineer
0 Kudos
Message 3 of 5
(3,510 Views)
Thanks. I was trying to avoid the having the lock out the suspend.
0 Kudos
Message 4 of 5
(3,510 Views)
Thanks for the suggestions. I am already at version 2.2 of the driver. After a bit of searching through MSDN help, I found the SetThreadExecutionState command in the kernel32.lib. If you invoke SetThreadExecutionState(&H80000001) on entry to your application, you will prevent the OS from entering standby autonomously from an idle state. A user initiated standby, though, will override this. The application should issue a SetThreadExecutionState(&H80000000) on close to ensure for good housekeeping.

If you want the system to query the user before entering a user-initiated standby, then your application needs to intercept and respond to the WM_PowerBroadcst message fired by the PBT_APMQuerySuspend event.

Larry E.
0 Kudos
Message 5 of 5
(3,510 Views)