I'm using a T7 pro via Matlab LJM and running into a few issues.
To explain the setup I have multiple (5) Analog inputs that I am reading using the streamburst() function in a loop. At the same time, a PWM signal is being ouput to some motors also on the test setup using the DIO. At present 1000 Hz sampling rate leads to 1.5s sampling runs for reading 3 of the analog ports and 10kHz sampling rate leads to ~ 70s runtime....
I've tried to read through some of the forum here and as best as I can tell I should be able to get ~ 100,000/#AIN sample rates (so about 20k in my case).
The max. sample rate for stream mode is 100ksamples/second (SampleRate = ScanRate * NumAddresses). For 5 analog inputs, that is a max. scan rate of 20kHz, as you pointed out. The stream analog input resolution index needs to be 0 or 1, and the range +/-10V for the max sample rate.
For documentation on StreamBurst, look here:
https://labjack.com/support/software/api/ljm/function-reference/ljmstreamburst
In particular to timing, look at the Remarks section.
If that doesn't help with answering the timing, in your StreamBurst runs with 1kHz and 10kHz scan rates, what are the configured NumScans? Are you timing one StreamBurst call or multiple (you mention reading in a loop)? Also, make sure you are only timing your StreamBurst calls, and not other code overhead.
here's the current setup
3 AIN channels all set to +/-10v
1PWM out using Dout on clock0
tsample = 1 sec
scanRate = 1500 scans/sec
scanNum = tsample*scanRate
now assuming setup is done correctly then I loop through
for i = 1:n:
tic
[~,scanrate] = LabJack.LJM.StreamBurst(handle,AINnum, aScanList,scanRate,aData);
toc
After talking with you on chat, you were running into a bug with LJM. I made an installer for you which seems to have fixed the problem:
https://labjack.com/sites/default/files/LabJackMUpdate-1.2001-develop-bu...
A public release will be made in March here:
https://labjack.com/support/software/installers/ljm