02-08-2008 10:28 AM
02-11-2008 06:25 PM - edited 02-11-2008 06:27 PM
Hello Nick,
I believe that what you want to do it populate a list of available channels programmatically. I assumed that you are using Visual Studio 2005 with a NI-DAQmx device. If this is not the case then please reply with the specific programming environment and language as well as the hardware you are using.
For an example of how to populate a drop down list please look at the examples located here: C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Analog In\Measure Voltage\AcqVoltageSamples_ExtClk\cs
Any of these examples should have a Channels box that will demonstrate what you want to see.
physicalChannelComboBox.Items.AddRange(DaqSystem.Local.GetPhysicalChannels(PhysicalChannelTypes.AI, PhysicalChannelAccess.External));
This line of code basically populates this list from the Measurement and Automation Explorer so all available channels should show up. This will allow you to choose the channels you want from a list of available channels so if you remove a device those channels won’t show up.
I hope this helps get you started. If you have any further questions or if I misinterpreted your question then please respond back and clarify what it is you’d like to know.
Have a good night!
03-19-2008 11:38 AM