Simultaneous stream and command/response speeds | LabJack
 

Simultaneous stream and command/response speeds

3 posts / 0 new
Last post
Oli
Haemaflow's picture
Simultaneous stream and command/response speeds

I think the datasheets say one can still use command/response mode on DIOs while streaming. If so does the speed of one affect that of the other? 

Many thanks,

Oli

LabJack Support
labjack support's picture
I  see that the text of your

I  see that the text of your post is different than the text in the email notification we received.  Maybe you edited your post after initially posting?

In theory they do affect each other, as these are serial digital buses.  Most of the time you notice no affect, but occasionally you can get where your command-response is trying to happen at the exact same time a stream packet is being transferred and then c-r might have to wait.  I did a quick test where I looped a digital I/O command-response call while a stream was running at different rates:

Sample Rate        Avg ms Per Iteration      Max ms (resolution of this is only 1 ms)
0                          0.29                                1-2
4000                    0.33                                50-100 (1 or 2 of these per second)
20000                  0.36                                50-100 (1 or 2 of these per second)
100000                0.47                                50-100 (1 or 2 of these per second)

For all of these, every iteration was under 2 milliseconds except that while a stream was running I would see 1-2 iterations per second that took 70 milliseconds or so.  I'm can't say for sure if these extra long iterations are because of USB traffic, or more likely a threading issue in my LabVIEW testing as the c-r test VI might have to wait if the stream test VI is updating the screen.

Another possibility is to use low-latency stream mentioned here:

https://labjack.com/support/software/api/ljm/function-reference/ljmestre...

 

Oli
Haemaflow's picture
OK great, many thanks for the

OK great, many thanks for the help!