03-23-2011 04:34 AM
I have a measurement application written in VB6 that communicates with instruments via the GPIB-USB-HS.
It works fine in Windows XP but fails in Windows 7. Is there any information on this problem?
03-24-2011 12:01 PM - edited 03-24-2011 12:06 PM
Could you please clarify what you mean by not working? Do you have NI's Measurement and Automation Explorer (MAX) installed? If you do can you verify you can communicate with the device through MAX. When your VB6 program fails does it throw any error messages or codes at you?
It is possible you might just need to update your NI-488.2 driver for windows 7. You can find the newest driver here.
03-24-2011 03:56 PM
Yes, I have MAX installed using your CD labeled NI488.2 ver 2.7.3 (newly purchased). MAX shows my GPIB-USB-HS and locates all the instruments that I need to communicate with. So really this is not your problem but I was hoping you might have some advice. My application has code that searches for the GPIB controller and gives the error message "GPIB not working". This code was created from your examples by another programmer about 8 years ago. It is a bit opaque to me. I have the source code. I believe that the problem occurs in modIO.bas (I think this is NI code) but for some reason I cannot view this code and I can't single step through it. I think it sets a variable OK488 = False which leads to my error message.
03-25-2011 11:03 AM - edited 03-25-2011 11:05 AM
Have you tried any of the 488.2 examples? They should be located in C:\Documents and Settings\All Users\Documents\National Instruments\NI-488.2\Examples\Visual Basic (if you are using XP). Or Start>All Programs>National Instruments>NI 488.2>Examples.
Also, are you communicating with a 3rd party instrument? Is it possible they may have some VB examples for their device?
03-25-2011 11:53 AM
My application incorporates your modules NIGlobal.bas and VBIB-32.bas dated ~2004. These modules call functions in GIPB-32.dll. These calls generate file not found errors.
On my XP machine, GPIB-32.dll is in c:\WINNT\System32
On the Windows 7 machine it is in c:\Windows\System32
It is unclear to me how VB knows where to look for this file.
03-25-2011 12:21 PM
I replaced the VBIB-32.bas and NIGlobal.bas with the newer files in the NI Examples. I still get the same error:
"File not Found: GPIB-32.dll" coming from this call "RegisterGPIBGlobalsforThread(....."
Thanks for your help
03-25-2011 04:52 PM - edited 03-25-2011 04:58 PM
Hmm this is strange, I'm going to pull some resources to hopefully come up with a solution.
I also found a similar DF: http://forums.ni.com/t5/Instrument-Control-GPIB-Se
03-27-2011 08:27 PM
I have found that Gpib-32.dll is not registered. I tried the command to register it: Start > Run > regsvr32 c:\windows\System32\Gpib-32.dll. This produces the message "The module c:\Windows\System32\gpib-32.dll failed to load. The specified procedure could not be found." In explorer I can clearly see that the file is there.
I believe this is the root of the problem but why isn't gpib-32.dll registered and how do I fix it?
03-28-2011 11:29 AM
Did you try the solution from the link to the other discussion forum in the previous post? It has a link to the NI-488.2 2.8 driver that is compatible for Windows 7 and it apparently solved the other poster's problem. Let me know if that works!
03-28-2011 01:05 PM
At first I didn't understand the link. So now I have downloaded and installed NI488.2 2.8. I assume that it overwrites the previous installation from the CD rom included with my GPIB-USB-HS. The original gpib-32.dll was dated May 22, 2003. After the reinstall it is July 27,2010. Measurement and Automation works as before showing my device in the tree.
When I run my application, the first GPIB command crashes the computer and forces a restart. It seems we are going backwards on this problem.