I need to use the T7 in streaming mode to capture a high frequency input (an emitter-detector scenario using lock-in amplifcation), but am cycling through signals that are expected to have very different signal ranges, so I'd to switch the adc range to match the expected signal range. I don't think it's possible to change the adc range once a stream has started, so presumably I'll have to stop the stream, reconfigure it for the next signal's expected range, and re-start it (possibly using burst stream to avoid having to manually stop?). Any idea what I might expect in terms of time it'll take to configure and start the stream each time? I need to be switching between signals at a minimum rate and if it's going to take seconds to configure and start the stream each time, I won't even bother with this avenue.
Summary: a quick test via a USB connection suggests that the time from stop to start is less than ~15 milliseconds.
More details: I modified stream_basic.c to have the following code replace the original stream stop code:
printf("Stopping stream\n");
unsigned int t0 = GetCurrentTimeMS();
err = LJM_eStreamStop(handle);
ErrorCheck(err, "Stopping stream");
HardcodedConfigureStream(handle);
err = LJM_eStreamStart(handle, scansPerRead, numChannels, aScanList,
&scanRate);
unsigned int t1 = GetCurrentTimeMS();
printf("from before LJM_eStreamStop to after LJM_eStreamStart: %ld milliseconds\n", t1 - t0);
ErrorCheck(err, "LJM_eStreamStart");
This gave results of ~15 milliseconds. Notes:
Perfect. I coded up my own test using a burst stream and I'm able to set up a new burst every 8ms or so.