Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How would I enumerate the differential analog input channels?

The DaqSystem.GetPhysicalChannels method can be used to enumerate the analog input channels that are available on a board.  Is there an equivalent method that allows you to enumerate the differential channels?

 

Or is there a programmatic way to find the individual channels that form a single differential channel?

0 Kudos
Message 1 of 3
(4,502 Views)

From what I have looked at thus far, there are no methods in Measurement Studio that return a list of terminals or single-ended channels used for differential channels. Up to a certain point, logic can be used to select the physical channels that are appropriate for use in the CreateVoltageChannel method.  That is each differential channel is made up of two physical channels:

 

For a USB-6008

Differential Channel      Physical AI +   Physical AI -

AI0                                  AI 0                AI 4

AI1                                  AI 1                AI 5

AI2                                  AI 2                AI 6

AI3                                  AI 3                AI 7

 

This information is crucial when calling the CreateVoltageChannel method, so that you don't erroneously use a channel twice. When you call CreateVoltageChannel with AI 0 and Differential Input, it book-keeps AI 4 as also being in use.

 

For a USB-6363

Differential Channel      Physical AI +   Physical AI -

AI0                                  AI 0                AI 8

AI1                                  AI 1                AI 9

AI2                                  AI 2                AI 10

AI3                                  AI 3                AI 11

AI4                                  AI 4                AI 12

AI5                                  AI 5                AI 13

AI6                                  AI 6                AI 14

AI7                                  AI 7                AI 15

AI16                                AI 16               AI 24

AI17                                AI 17               AI 25

AI18                                AI 18               AI 26

AI19                                AI 19               AI 27

AI20                                AI 20               AI 28

AI21                                AI 21               AI 29

AI22                                AI 22               AI 30

AI23                                AI 23               AI 31

 

Note the jump from AI7 to AI16.

 

 

If you are developing an application that can be used with multiple Multi-Function DAQs, it is probably safest to add a set of supporting data tables to store the terminal assignments for differential channels.  Populate these tables from the manual and lookup the board type when calling CreateVoltageChannel to create differential channels.

 

 

 

 

 

0 Kudos
Message 2 of 3
(4,496 Views)

Hi DKIMZEY,

 

I think you are correct in what you have found regarding the existence of such a function, and you have a good workaround solution.

 

You may have already looked here, but you can view the NI-DAQmx library for NI-DAQmx .NET functions in:


Start>>Programs>>National Instruments>>NI-DAQ>>Text Based Code Support>>NI-DAQmx .NET Framework x.x Help

Peter E
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(4,489 Views)