Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How would I obtain a list of available channels from my DAQ card(s)?

Hello everyone,
Does anyone know how to query for DAQ hardware or for a list of AI channels on the hardware?
What I am trying to do is allow a user to specify which channels are connected to certain UUTs. Since the UUTs can be connected to anywhere between 2 to 16 channels, and I could have several UUTs connected, the user must be able to basically tell the application (for example) "I have one UUT connected to Dev0/AI0, Dev0/AI1, Dev0/AI2, and Dev0/AI3, and also a second UUT connected to Dev0/AI5, and Dev0/AI6"...via a menu or list selection before choosing to begin the test.
I need a way of finding out the number of devices (Dev0, Dev1, ..., Devn) as well as the number of channels on each (AI0, AI1, ..., AIn) PROGRAMMATICALLY. This way the test can be configured correctly and safely regardless of how may DAQ cards are in the particular machine, etc..
I am using Visual Basic .NET 2003 with measurement studio 7.1
Any help would be appreciated.
Thanks!
~ JS
CLA, CCVID, Certified Instructor
0 Kudos
Message 1 of 2
(3,104 Views)
Figured it out...guess I should've waited longer before posting : )

In case anyone else wants to know...
You can query DAQ devices with DaqSystem.Local.Devices (returns an array of strings - each string being the name of a connected device ie. "dev0")
You can query physical channels with DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.x, PhysicalChannelAccess.y) (also returns and array of strings)
where x is the type of channel and y is which access category...for example
DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.AI, PhysicalChannelAccess.All) will query all physical analog input channels.

~ JS
CLA, CCVID, Certified Instructor
0 Kudos
Message 2 of 2
(3,098 Views)