01-21-2021 06:39 AM
hi everyone,
i read from an USB-6210 and have not touched my c++ code in years. it suddenly does not work properly anymore, x values appear to be dampened, variing less than they should.
what could have changed in recent months?
DAQmxErrChk (Ni_ReadBinaryI16(taskHandle, numSamples, 10.0, DAQmx_Val_GroupByScanNumber, data, numSamples*numChannels, &read, nullptr));
thank you!
Solved! Go to Solution.
01-21-2021 07:59 AM - edited 01-21-2021 08:00 AM
additional info:
- the problem is the same when I use DAQmxReadBinaryI16
- I use DAQmx 20.1.0
is the data structure still this with 4 channels?
s = sample index
c = channel
s0c0x s0c0y s0c1x s0c1y .... s0c3y
s1c0x s1c0y s1c1x ...
01-22-2021 09:25 AM
I figured it out: for some reason, one has to omit the first int16. sampling for the first channel starts at data array index 1. in my case channel 1 x|y is array[1] and array[2].
I would still be interested in why this is the case and if one can change it.