10-02-2011 04:37 PM
Does anyone know how to select from a NIDAQmx physical channel control programmatically. Specifically if the user has filled out an array table column with 1,3,4 for example, I want to select WLS-9163/ai0, WLS-9163/ai2, and WLS-9163/ai3 from the physical channel control, place these choices into an array and start my acquisition task with said array.
Thanks much.
Solved! Go to Solution.
10-02-2011 07:11 PM
You can put the desired channels in an array and use a For Loop around the Create Channels function.
10-03-2011 12:09 AM
Thanks Steve,
This looks close to a solution! I can hard code the list of "Actual Device Channels", but it would be nice to programmatically acquire this list. Maybe I don't need to use a physical channel control... but this control is finding out which device(s) and which channels are available, so I had hoped I could access it programatically. Any further ideas?
I am modifying what used to be an acquisition system based on an ASIO sound driver and sound recording equipment. The system will now be based on the WLS-9163. The users are used to thinking of things in terms of channel 1,2,3 etc. While I could modify their interface, I would rather it stayed identical for them, hence my need to map "1" to WLS-9163/ai0.
Thanks much
Terry
10-03-2011 02:39 AM
Terry,
This will give you an array of the Analog Input channels (AI.PhysicalChans):
And the product name (Type).
Is this what you were looking for?
steve
10-03-2011 12:32 PM
Yes that would be exactly what I was looking for. Thanks Steve.
07-27-2017 05:26 AM
With Terry's example, is it possible to use a function that will pass different configurations with the User's selections rather than typing them manually.
What I really mean is:
1: ON
3: OFF
0: OFF
1: OFF
3: ON
0: OFF
1: OFF
3: OFF
0: ON
etc etc...
Many Thanks