Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get properties of global virtual channels using DAQmx?

I'm using DAQmx with VB6. In my app, I would like to be able to present the user with a list of available predefined channels to select from. I can use DAQmxGetSysGlobalChans to get a list of the channels, but I need a way to sort out which of these channels are defined as inputs, and which are outputs. It would also be nice to be able to query other properties of the virtual channel (for example, the device and physical channel being used). These all seem very simple things, but I haven't found anything like this in the documentation so far.
Thanks.
 
0 Kudos
Message 1 of 3
(6,571 Views)

Try using  DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data)DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data).  This will return one of the following types:

DAQmx_Val_AI 10100 Analog input channel.
DAQmx_Val_AO 10102 Analog output channel.
DAQmx_Val_DI 10151 Digital input channel.
DAQmx_Val_DO 10153 Digital output channel.
DAQmx_Val_CI 10131 Counter input channel.
DAQmx_Val_CO 10132 Counter output channel.

Let me know if this works. 

Regards,

L. Allen

0 Kudos
Message 2 of 3
(6,559 Views)

Thanks L. Allen.

That was exactly what I was looking for. In my searches of the DAQmx help file I completely missed that one.

I appreciate your help.

MFrazer

0 Kudos
Message 3 of 3
(6,547 Views)