So now I decided to update VBIB32 and NIGlobal (dated 7/26/2010 from my CD) in my application to the examples in the new installation dated 7/26/2010. It still crashes Windows 7. The crash occurs at the execution of this line:
VBIB (7/26/2010) line 929 ilfind = ConvertLongtoInt(ibfind32 (byVal udname))
Still needing help
Yes, that is the wrong direction indeed. Could you be more specific about the crash? I found a KB that isn't exactly the same situation as what is going on here (different OS, possibly different crash), but it's a start.
I will keep looking, let me know how this goes!
Let's try a few things.
1) What version of LabVIEW are you using? Is your system 32 or 64 bit?
2) Because of this crashing problem, repair LabVIEW and the drivers in Add/Remove Programs.
3) I don't have GPIB on my system, so these steps might be off... but open MAX. Find the GPIB card under devices and interfaces, and right click it to scan for instruments. You should then see the instrument. Use the “Communicate with Instrument” option to write the identify command, and read back the response. Write to the instrument using “*IDN?\r\n” command to the instrument, and then read back the response in the read tab. If the read works, then something is up with your code. This step is mostly from memory since I don't have GPIB on my system, so let me know if it doesn't make any sense. I could be confusing GPIB with Serial.
Let us know what you find.
When the crash occurs, the screen goes completely black for 3 secs, then a blue screen appears for 0.5 sec. It starts "A problem has been detected and windows has been shut down to prevent damage to your computer. If this is the first time you have seen this error screen, restart your computer. If this screen appears again follow these steps. Check to be sure you have adequate disk space. If a driver is identified in the stop message disable the driver........" ( I had to photograph the screen to read this). Then three more seconds of black. Then on a black screen "Windows failed to close successfully......recover from unexpected shutdown."
The link you mention refers to a crash in 2000 or XP. I have been running my application in 2000 and XP for 8 years and have never had a system crash.
I tried to make an executable but it won't compile.
So the issue here could be occurring at several different points. It could be the driver, the compiler, the code or even the device itself. What we can do is to narrow down exactly where the issue is.
First, you have said that the device you want to communicate with shows up in Measurement & Automation Explorer. Have you tried communicating with the device in a test panel or using a LabView example program to make sure that the drivers are working and the device will communicate? Take a capture with NI Spy to verify that the communication is going as expected. More details can be found at this KB: http://digital.ni.com/public.nsf/allkb/282C5D41E2B
Second, you said your application worked fine in Windows XP but not in Windows 7. Is your testing all occurring on the same computer, as in, did you originally have Windows XP and then upgrade to Windows 7? The file structure of Windows 7 is very different from that of Windows XP and could cause some issues.
Is the change in operating systems the only difference between when the program worked fine on Windows XP and did not work on Windows 7? Are other programs in VB6 working fine on your computer? Let me know.
I have the 32 bit version of Windows 7
My application is written in VB6 not lab view. It is an application that is working on dozens of XP computers in labs around the World. I have to get it working on Windows 7.
The example software that NI supplies in NI488.2 for VB6 programs includes VBIB32.bas, NIGlobals.bas, and gpib-32.dll. VBIB32 and NIGlobals are incorporated in my program. NI488.2 install puts gpib-32.dll into the System32 directory of .dll files. These files that do work in XP do not work in Windows 7.
My GPIB and MAX all work exactly as they should in Windows 7- finding and communicationg with my instruments. It is the NI software for interfacing with VB6 that fails in Windows 7.
I don't think that we are going to make any progress on this until someone at NI actually tries a VB6 program with a GPIB interface on a Windows 7 computer. I will be happy to send you my source code if you will try it.
Reply to Joe S
Running MAX from downloaded Install of IEEE488.2 2.8
I had previously only looked for the GPIB-USB in the tree. This time I connected an Agilent 34420 DVM and
pushed the "Scan for Instruments" button. This resulted in the same crash as my VB6 program.
I repeated this with only the GPIB-USB, No instruments. "Scan for instruments" caused the same crash.
At this point it appears that IEEE488.2 2.8 has more serious problems than the earlier 488.2 2.7.3 that
came on my CD. So I tried to reload 2.7.3 but this fails because the install program refuses to install
an earlier version. I cannot find an uninstall.
Now it seems that this problem is not related to VB6 but to NI software.
I have an XP computer that is running my application and your software in XP with no problems.
I bought a new Windows 7 computer and tried to install your software and my application just as I have many
times previously with new XP computers. That is when the trouble began.
The only change is the switch from an XP computer to a new Windows 7 computer.
Other VB6 programs not involving gpib communication run fine on both computers.
Perhaps the issue is with the new driver. The method for uninstalling the driver is to go into the Control Panel to the Programs and Features link. In there, find "National Instruments Software" and click Uninstall/Change. That will open a dialog box that contains all of the NI software you have on your computer. Scroll through the list until you find "NI-488.2 2.8" and click "Remove".
Then, go to our driver site at www.ni.com/drivers . From there, click on NI-488.2 and download the 2.8.1 driver, see if that will fix the issue. Let me know how it works!
It appears that all is OK.
Let me review this long painful process:
The basic problem is that the CD (NI-488.2 2.7.3) that came with the GPIB-USB-HS is an old version and did not work with Windows 7 even though the label states "for Windows 7". Early in the discussion with NI I was pointed to version NI-488.2 2.8 via link joule.ni.com/nidu/cds/view/p/id/2129/lang/en. This version was even worse causing Windows 7 to crash. After much discussion of the symptoms I was finally pointed to NI-488.2 2.8.1. at joule.ni.com/nidu/cds/view/p/id/2315/lang/en. After uninstalling all NI software, downloading, and reinstalling 2.8.1 everything seems to work.
Including an up-to-date CD with the GPIB-USB or at least advising to download it would have saved a lot of my time and yours.
Thanks for the help.
Very happy to see there is someone use GPIB-USB-HS with VB6.0. Actually, I never use NI instrument and I am also new to VB6.0. Could you please tell me how to collect data from the interface in VB6.0. Could you give me a simple code, or tell me which dll I should use?
With so many thanks