12-17-2009 05:43 PM
After creating a new instance of a NI4882.Board is there anyway to "interrogate" the instance for the board index number?
Thanks for your time and help.
12-18-2009 03:47 PM
Hi AFX,
I was wondering if you could expand a little more on what you are trying to do, what type of GPIB boards are you working with (USB, PCI...), by board index do you mean the resource name that would normally appear in Measurement and Automation Explorer? If you are looking to get the boards serial number there is a KnowledgeBase article the outlines how you can do that:
How Can I Read the Serial Number of a GPIB Card Programmatically?
Let us know if that's not what you're looking for.
Thanks
Scott M.
12-18-2009 05:11 PM
Sorry I didn't provide enough background. I did a lot of Calibration Systems Automation many years ago using HPBasic. I've returned now to do that but I'm very much in the learning mode on National Instruments.
The project I'm working on is a program/code snipet to sniff out and exercise the instrument components of any random calibration system that we have.
In my system I have 2 GPIB-USB-HS units connected to the same PC.
Public Class Form2
'Dim X As NI4882.Board
Public X As NI4882.Board
In a number of SUBs I first had
X = New NI4882.Board(BoardNumber.Value) which is taken from a numericUpDown item which may or may not be correctly set. Since there are a number of paths the user can follow in using the software and X is in common to each Sub I check to see if an instance has been declared and I would like to pull the Index (in my setup either 0 or 1) from the instance rather than write code to force the user's path.
AFX