Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

terminal configuration and channel overuse

Is it a guarantee that devices which allow differential channels always use the lower half as differential and the upper half as single ended?  For my application I am presenting a list of available AI channels to the user.  If the user selects channel 0 as differential, I need to know which other channel to disable. (on my 8 channel device, that means I cannot use channel 4 SE)

 

I know about the function DAQmxGetPhysicalChanAITermCfgs, so I can tell which ones support differential and which don't.  I'm just not sure if (for a device with N channels) differential always uses channel C and channel C + N/2.

 

Thanks,

CV 

0 Kudos
Message 1 of 7
(4,022 Views)

Hello CV,

 

Generally speaking multifunction DAQ devices will use channels X and X+8 for differential pairs.  If your device had 16 single ended channels or 8 differential pairs then channels 0 & 8 would be the first differential pair, then 1 & 9 and so on.  In general this will be specified in the analog input section of the device's user manual.  For instance, Table 4-2 on page 4-5 of the M Series User Manual details which pins make up differential pairs.

 

It isn't exactly necessary to specify this for the user because the error messages are fairly informative.  If, for instance, you have configured the analog input task for differential configuration and you choose channels Dev1/ai0, Dev1/ai8.  Error -200077 would be thrown with the message:

 

Measurements: Requested value is not a supported value for this property

 

Property: AI.TermCfg
You Have Requested: Differential
You Can Select: RSE, NRSE

Channel Name: Dev2/ai8

 

This indicated that you've tried to use both inputs of a differential pair separately.

 

I hope this helps and have a great day!

 

Cheers,

Brooks
0 Kudos
Message 2 of 7
(4,004 Views)

Thank you for your reply.  It always takes me two tries to get the question right.  I don't know what device the customer will use, so I can't go on any specific manual.

 

If necessary, I can create a trial task to see if the user has created an invalid configuration, but I was hoping to be able to do something intelligent for the user while he is making his choices. If I have to wait until the user is done before checking, there may be multiple mistakes.  Seeing channel 4 become disabled when channel 0 is set to differential is much more clear.

 

I guess I could at startup run through the different channels to determine in software which pairings are used.  I was just hoping to easily query this.

 

(a minor nitpick - the error you described is not quite what I was looking for.   The channel properties tell me that certain channels don't support diff.  It's the pairings the have me stuck.  I assume I'll get a similar error if I add a channel that already used in a diff pair)

0 Kudos
Message 3 of 7
(3,998 Views)

Hello CV,

 

For multifunction DAQ cards it is standard for the differential pairs to be AI X and AI X+8.  I've done some looking around and as far as I know there is no way to remove the channels that are unavailable when you choose a differential configuration.  One option would be to make a custom control using either a combo box or an enum to specify the available channels.  This would allow you to change the items available in the drop down menu based on the input configuration.  The difficulty is that both the physical channels and input configuration are set on the DAQmx Create Channel VI--what you're looking for is a way to filter the available channels on an input before LabVIEW knows what the configuration is.

 

On the other hand, while it is useful to to increase the level of user input protection of the VI, your user will already need to be consulting the device manual to find out which physical pins to connect to.  While they're doing this its pretty easy to browse the Analog Input section to look how differential pairs are assigned.  Another fairly easy to find this out is to configure a task on the device in MAX and then view the connection diagram tab.  This will show you where to connect your signals on the device based on the input configuration you choose.

 

While this will likely need to be solved by directing your users to the manuals since they need to connect their signals anyway, it may be reasonable to add this functionality.  If the Physical Channels input could detect the current device configuration in the pre-run-time environment it could filter the results appropriately.  I will file a product suggestion on your behalf at the Product Suggestion Center, but I also would encourage you to do the same.  R&D reads all of these requests and they often carry more weight when they come directly from customers.

 

I hope this helps, and have a great weekend!

 

Cheers,

Brooks
0 Kudos
Message 4 of 7
(3,975 Views)

Could you direct me to the function: DAQmxGetPhysicalChanAITermCfgs?

 

I have not been able to locate this function in the .net DAQmx namespace in Measurement Studio 9.1.0.204. I would like to use this to determine if AI channels are capable of differential input.

 

There is a GetTerminals in the Devices class - but this does not indicate if a channel support Differential input.

 

 

0 Kudos
Message 5 of 7
(3,465 Views)

DAQmxGetPhysicalChanAITermCfgs is a C language function. I'm not using .NET, but I suspect it will be called something different and be a member of class. The function will probably be named GetPhysicalChanAITermCfgs. The DAQmx prefix is not needed in .NET since it has classes and namespaces.

0 Kudos
Message 6 of 7
(3,454 Views)

Thanks - I looked but could find no equivalent .net method for obtaining terminal configuration for physical channels.  Right now, I think the only approach available (and I may be wrong) is to create a temporary Task object, create a single differential voltage channel for every two physical channels via Task.AI.CreateVoltageChannels().  Then call Task.Control.Verify to see if this is valid.  If so, I can present my users with their preference of differential channels; if not, present single-ended channels.

 

Once the UI is loaded, I can dispose of the temporary task object.  A set of functions that allow us to query the device capabilities would be very nice.

0 Kudos
Message 7 of 7
(3,448 Views)