Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Everytime my computer comes out of standby it no longer recognizes the GPIB-USB.

When the computer comes out of standby or hibernation I get a message saying that there is an unknown device on the USB port. Then I have to unplug the GPIB and plug it back in. Then the New Hardware Found Wizard starts up and I have to install the software again. Can this problem be fixed?
0 Kudos
Message 1 of 4
(3,898 Views)
Hello,
Thanks for contacting National Instruments.

You have a couple options to consider. First off, what version of the driver are you using? The latest version of the driver is 2.2 and there were some efforts made to improve this functionality with the latest version of the driver. This driver version can be downloaded here:

http://digital.ni.com/softlib.nsf/websearch/E269BD7F280E068986256E9700660397?opendocument&node=132060_US

Another option you have is to disable your computer from going into standby or hibernate mode. This KB describes how to do it depending on the OS you are using.

http://digital.ni.com/public.nsf/websearch/2BE8832279E4FDA486256CE9000031C6?OpenDocument

Hope this helps!

Regards,
Steven B.
Applications Engineering

National Instruments
0 Kudos
Message 2 of 4
(3,898 Views)
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. You will need to subclass your main application and respond to the event by returning a BROADCAST_QUERY_DENY from the wind
ow message loop. Go to this URL for the relevant code fragment in VB: http://www.freevbcode.com/ShowCode.asp?ID=2596


Larry E."
0 Kudos
Message 3 of 4
(3,898 Views)
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. You will need to subclass your main application and respond to the event by returning a BROADCAST_QUERY_DENY from the wind
ow message loop. Go to this URL for the relevant code fragment in VB: http://www.freevbcode.com/ShowCode.asp?ID=2596


Larry E."
0 Kudos
Message 4 of 4
(3,898 Views)