07-10-2009 08:58 PM
07-14-2009 03:42 PM
Hi Jfisher,
Have you considered imaging a computer without a GPIB card installed on it? This way when you first start up a re-imaged machine the "found new hardware wizard" should take care of the serial number and .INI file for you.
Post back if that's no an option for you.
Thanks
Scott M.
07-14-2009 07:42 PM
Running the "add new hardware" wizard on 40+ computers after the hard drives are re-imaged is not a viable solution.
All I need is a reliable, programmatic means for reading the GPIB card's serial number with C++ program (I'll even settle for C or Visual Basic). The means of reading the GPIB card's serial number must not depend on the (possibly incorrect) information stored in the file GPIB.INI -- i.e., the program should not crash or throw an exception if the GPIB card's serial number is different from the serial number that's stored in the file GPIB.INI, which is what happens now with the code sample I provided (see my original post). Once I have the GPIB card's actual serial number I can easily write a program -- or even a script -- that places the correct serial number into the file GPIB.INI.
Jim
07-15-2009 02:29 PM
Hi Jim,
All our drivers, including the NI-488.2 driver, work through MAX, so if your GPIB card cannot be seen in MAX you wont be able to query your card, even just for the serial number. You could create a table in your program that relates the GPIB serial number to the computer name for all your computers, then query the computer name and assign the serial number accordingly.
It seems to me that this situation is a lot like turning off a computer, swapping GPIB cards, and then switching it back on. I've tried this with my computer, and the found new hardware wizard runs automatically (no user needed) when xp boots up, the new GPIB card is then ready for use in MAX. Do you not see this behavior?