02-13-2009 02:52 PM
gpibtester,
Attached is the NI Spy file you requested.
Let me know what you would like me to do next.
Thanks,
Erich
02-13-2009 03:22 PM
Erich,
Thank you for the Spy capture! I see that it is opening a handle to the Device:
ibdev(0, 1, 0, 13, 1, 0)
Then with the handle that was returned by the ibdev( ) call, it was able to do a write using ibwrt( ) with the "*IDN?" command to the Instrument. With the ibrd( ) it was able to get the identification information from the Instrument.
So, now I must ask you, how are you opening a handle to the Device in your code? It would be helpful if I could see a snippet of your code that showed the calls that you use when opening a handle.
Thanks again for the Spy capture! Now we need to look at your code.
gpibtester
02-13-2009 04:17 PM
gpibtester,
Sorry, I forgot that you had asked to see the code snippet. I have attached all of the file in which calls to the GPIB board. The call where the failure happens is in the FindDevice function and the gpib call is ibfind. The device name is read from a .ini file and is curently set to "DEV1" but I have also tried "GPIB0" without success. Ihave tried using the ibfind("DEV1") call using the Ineractive Control app and it seems to work fine.
Thanks,
Erich
02-13-2009 04:32 PM
Erich,
Thank you for sending the code! Taking a quick look at it, nothing obvious jumps out. I am not able to look at it until Monday when I might have some more questions for you.
Thanks again for the code!
Have a good weekend!
gpibtester
02-13-2009 04:38 PM
Thanks! I have Monday off (Presidents day) but I'll be back on Tuesday to address any questions or suggestions you might have. Hope you enjoy your weekend.
Erich
02-16-2009 01:59 PM
Erich,
In looking at the code some more, I am wondering about the contents of the .INI file that TPOWER.CPP is using. From the settings in the GetProfileString( ), it looks like it is a customized .INI file. Could you please include the .INI file that you are using?
If you are not able to send the .INI file, can you tell what the string is that gets returned in ElgarName by the call to GetProfileString( )?
TIA,
gpibtester
02-17-2009 12:52 PM
gpibtester,
Thanks for your patience. I'm finally back at work and ready to tackle this problem again. The value returned in ElgarName is "DEV1" but I have also changed the value in the .INI file to return "GPIB0" and this did not work either. I have attached the .INI file as requested in case you see something I did not. Just so you know I have also tried hard coding the values "DEV1" and "GPIB0" into ElgarName without success.
I look forward to what you find.
Erich
02-17-2009 02:43 PM
Erich,
Thank you for the .INI file!
I have good news and bad news. The good news is I know what the problem is, but it is also bad news because support for GPIB Win16 apps in 98 was dropped starting with the 2.0 release. That means that with 2.2, you cannot do GPIB Win16 apps on Windows 98. I apologize that I did not find out about that limitation sooner!
There are 2 options.
1. Downgrade the GPIB Win98 driver to 1.7.
A. Uninstall 2.2.
B. Reboot.
C. Install 1.7.
D. Reboot.
2. Switch to either Windows 2000 or XP for the operating system and install the GPIB software. Win16 is still supported on those operating systems. I realize this is probably not an option.
Thank you again for your patience and for sending all the Spy capture and code files! I apologize again for not figuring out what the real problem was earlier! I hope that downgrading to 1.7 is a viable workaround that will work for you, if you continue to work on WIndows 98.
gpibtester
02-17-2009 02:48 PM
Erich,
Almost forgot, the 1.70 driver cannot be downloaded from the web site. You must request the driver using the Legacy NI-488.2 Driver Request form. While it is a bit of an inconvenience to get the 1.70 driver, it still might be worth it if you want to do GPIB Win16 applications on Windows 98.
gpibtester
02-18-2009 03:23 PM
gpibtest,
I finally got the 1.70 driver and it works perfectly. Thanks for all your help this is great!
Erich