Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

With DAQPad-6020E can I scan a single channel at multiple gains?

I am using a DAQPad-6020E to acquire data at a relatively slow rate (pseudosimultaneous 100Hz) from a relatively small number of channels (6). Two of the channels are actually the same source with one being set to sample at a higher gain.

The question I've been posed is...

"Instead of physically sampling the channel twice (by splitting the signal) can't you sample the same channel twice with different gains."


I'm configuring DAQ as follows...

SCAN_Sequence_Setup (1, 6,
    "0,1,2,3,4,5",
    "-1,-1,-1,-1,5,-1",
    "1,1,1,1,1,1",
    &cfg->daqSetup.ScansPerSequence,
    &cfg->daqSetup
.SamplesPerSequence)


where I get back


    &cfg->daqSetup.ScansPerSequence = 1,
    &cfg->daqSetup.SamplesPerSequence = 6

I tried the following...

SCAN_Sequence_Setup (1, 6,
    "0,1,2,3,3,5",
    "-1,-1,-1,-1,5,-1",
    "1,1,1,1,1,1",
    &cfg->daqSetup.ScansPerSequence,
    &cfg->daqSetup.SamplesPerSequence)

but I get a Non-Fatal Runtime NIDAQ error stating that the value of a numeric parameter is invalid (-10003).

Is it not possible to scan the same channel multiple times with different gains?
0 Kudos
Message 1 of 3
(2,624 Views)
Hello Trevor,

Yes, you can scan the same channel multiple times and with different gains. You just cannot use the SCAN_Sequence_Setup() function.

As a starting point, work off either the "SCANsingleBufAsync" or "SCANsingleBufSync" CVI shipping examples. I did not get an error when using the SCAN_Op() or SCAN_Setup()/SCAN_Start() functions instead of SCAN_Sequence_Setup().

You're right that this doesn't make sense. However, SCAN_Sequence_Setup() is used to cheat the DAQ board into scanning multiple channels at different rates. I'm not sure what is going on behind the scenes which causes this to be a problem. However, if you can use the other functions I mentioned, everything should be just fine.

I hope this helps!

Russell
Applications Enginee
r
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 3
(2,624 Views)
OK. I like it when it seems like I'm not crazy...

For now I'll continue to use SCAN_Sequence_Setup() with the channel split as I'm under a crunch for a particular implementation and it seems to be doing what I need. If I find there is a problem with splitting the signal then I'll look further at your suggestion.

What I'm more interested in now, after reading your comments, is what "cheating the DAQ board" actually entails. Me feeling was always that multirate scanning was a documented feature of the board. In my particular case I'm not even scanning at multiple rates. I am using SCAN_Sequence_Setup() to provide a generic/configurable DAQ setup interface. Is there an overwhelming reason why I should NOT use SCAN_Sequence_Setup() if
I'm not doing multirate scanning? Does it do something in the background that could affect our results?

The first version of my generic DAQ setup toolkit requires the user to supply the scan sequence anyway so I guess if the scan rate divisors are all unity I could skip SCAN_Sequence_Setup() altogether. Hmmm...

Thanks for the reply...

Trevor
0 Kudos
Message 3 of 3
(2,624 Views)