06-02-2021 07:26 AM
Hi
In the device specifications for the NI 6251 the number of analog input channels is 8 differential or 16 single ended. I would like to know how to connect when 16 single ended channels are the preferred solutions. From the M series user manual in the table 4-3 about the Analog Input Configurations only three different modes are presented that is : Differential (DIFF), Non_Referenced Single-Ended (NRSE) and Referenced Single-Ended (RSE). For the NI 6251 card running MATLAB the ai (0-7) analog inputs are always identified as DIFF mode channels which from what I can see is referenced to ai (8-15) single ended (SE) mode channels. Have I understood it correctly that channel ai(8-15) are the first 8th SE channels while ai8 + ai0 is the 9th SE channel and so on all the way to ai15+ai7 as the last channel.
The only solution I have found is therefore to calculate the SE channels based on DIFF mode measurements. Is this the way it is supposed to be done, or have I misunderstood?
Karsten
06-02-2021 12:30 PM - edited 06-02-2021 12:30 PM
No, for 16 single-ended measurements the (+) side of your sensors would be wired to the terminals labeled ai0-ai15. The (-) side would be wired to either AI Sense or AI Ground. Don't forget the bias resistor if your configuration calls for it (as seen in table 4-3).
-Kevin P
06-03-2021 06:15 AM
Thank you Kevin.
I must admit, I still do not get it. From what I can see the ain ports where n=(0,1,2,3,4,5,6,7) are called DIFF ports when operated from MATLAB and they are referred to the ai(n+8) ports. Therefore in order to generate 16 single ended measurements I have to measure 8 single ended ports directly from ai(8,9,10,11,12,13,14,15) and then use the differential measurements and calculate the next 8 single ended ports by ai(8+n) + ai(n) for n=0 to 7.
From what I can see, table 4.3 describe only how to do 8 single ended measurements and not how to do 16 single ended measurements.
My next concern is then how to make sure that all those 16 measurements become equally accurate beeing measured from ports that do have some capacitive cross coupling, but thats another question.
Karsten
06-03-2021 11:01 AM
I have no experience at all with the MATLAB toolbox or documentation. For certain I can do 16 single-channel measurements from LabVIEW the way I described.
My guess is that it's just the MATLAB docs / labels that are incomplete or misleading. What have you tried? You'll get errors if you try to specify AI8 - AI15 as differential channels. You can only specify channels AI0-AI7 as differential because those are the (+) connection for differential measurements. AI8-AI15 are the (-) connection. See Table 4-2.
-Kevin P
06-05-2021 09:56 PM
@KarstenHusby wrote:
Thank you Kevin.
I must admit, I still do not get it. From what I can see the ain ports where n=(0,1,2,3,4,5,6,7) are called DIFF ports when operated from MATLAB and they are referred to the ai(n+8) ports. Therefore in order to generate 16 single ended measurements I have to measure 8 single ended ports directly from ai(8,9,10,11,12,13,14,15) and then use the differential measurements and calculate the next 8 single ended ports by ai(8+n) + ai(n) for n=0 to 7.
From what I can see, table 4.3 describe only how to do 8 single ended measurements and not how to do 16 single ended measurements.
My next concern is then how to make sure that all those 16 measurements become equally accurate beeing measured from ports that do have some capacitive cross coupling, but thats another question.
Karsten
Just guessing here, I don't use Matlab for DAQ.
I loaded up a simulated PCI-6251 in to my general DAQ program. For the 6251 the default configuration is to set the channels to differential mode, see screenshot below. I assume in Matlab it is the doing the same thing. If you want to change the terminal configuration in the "DAQ create channel" function there should be an argument to change the terminal configuration. Note the values of this argument may seem weird, it is an I32 integer. -1 is Default, RSE is 10083, NRSE is 10078, Differential is 10106, Pseudodifferential is 12529. Note that not all devices support all configurations. When you create the channels, you need to set the terminal configuration argument. LabVIEW function shown below, should be a similar name in Matlab.
mcduff
06-06-2021 07:41 AM
I think mcduff got to the crux of what's been confusing for you. The docs seem to be emphasizing default values and behavior without bringing up the valid alternatives.
Here, channels 8-15 have single-ended as a default because there are no alternatives. You cannot configure them for differential. The convention is that only the (+) terminal of a differential pair is specified in the task config. When doing differential, channels 0-7 are the (+) terminals while channels 8-15 are the (-) terminals.
However, channels 0-7 may be configured for single-ended along with channels 8-15. It just isn't made obvious in this particular part of the docs.
-Kevin P