LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting physical channel from list with DAQmx

I'm trying to write a simple VI for reading and writing digital data. However, when I have a DAQmx physical channel control, the only options it presents to me are the various analog inputs (and doesn't allow me to type in the port I actually want to use). In other examples, e.g., "Write Dig Port.vi", the apparently identical control instead shows me digital port options rather than the analog in channels. As far as I can tell, there is no real difference between the controls as there is nothing in properties that I can really modify.

How can I get this control to let me choose the channels I want? Or is there some difference in these controls that I am not aware of?
0 Kudos
Message 1 of 5
(4,234 Views)
Right click on the Physical Channel control and select "I/O Name Filtering".  You probably want it set to Digital Input/Output and possibly Allow Undefined names.


Message Edited by MarkGrot on 03-11-2008 01:05 PM
Message 2 of 5
(4,231 Views)

The channel lists adapts to the type of DAQmx Create Channel that you use. Do you see the text below the DAQmx Create Channel? If your channel is displaying only analog input channels, then the DAQmx Create Channel type is AI Voltage. If you want to use digital input channels, change the type to Digital Input. Click on the little arrow on the right side. This is called a polymorphic VI selector. You can do the same thing by right clicking on the VI and do a Select Type.

Mark has a good point. If you change the type of DAQmx Create Channel and you already have a physical channel wired, you will have to go to I/O Name Filtering to change the channel types displayed. If you change the DAQmx Create Channel and then create a channel control by selecting Create Control, you'll get the correct type automatically.



Message Edited by Dennis Knutson on 03-11-2008 12:12 PM
0 Kudos
Message 3 of 5
(4,228 Views)
Thanks a lot!
0 Kudos
Message 4 of 5
(4,227 Views)
Dennis is correct.  If you generate the control from the desired create channel, it will filter the proper channels.

If you place the Physical Channel constant (and possibly make it an control) directly, its filtering by default will be Analog Input/don't allow undefined names.
0 Kudos
Message 5 of 5
(4,218 Views)