Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni_ReadBinaryI16 not working anymore

Solved!
Go to solution

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!

0 Kudos
Message 1 of 3
(1,549 Views)

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 ...

0 Kudos
Message 2 of 3
(1,536 Views)
Solution
Accepted by topic author mael15

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.

0 Kudos
Message 3 of 3
(1,514 Views)