Execution time of low-level functions (specifically rawDIO) of U12? | LabJack
 

Execution time of low-level functions (specifically rawDIO) of U12?

3 posts / 0 new
Last post
AL
AlexeiLin's picture
Execution time of low-level functions (specifically rawDIO) of U12?

Hi there,

 

I'm currently conducting an electroencephalography (EEG) study, in which I'm using python-based software PsychoPy to communicate with an old labjack U12 to send event markers. A series of pictures are presented on a screen, and each picture is accompanied by a U12 digitalout signal sent to EEG data acquisition system to "mark" the timestamp when this picture was presented. 

For the study purpose, I would like U12 to send digitalout signals with <1 millisecond consistency. That is, the latency between picture and U12 digitalout signal should not vary more than ±1 ms.  Currently I use EDigitalOut function, but the datasheet says this function takes 16~20ms to execute, that is up to 4ms inconsistency. So I'm wondering whether low-level functions like DIO are more preciese in time?

 

All best,

A. L.

 

Edit:

 

After reading the datasheet more carefully, I found that low-level functions only work in macOS or linux but not in windows? Is there any way to make U12 send signals with the time precision I need or should I just get newer product (say U3)?

LabJack Support
labjack support's picture
The problem is the USB system

The problem is the USB system, and is mostly related to O/S, and is pretty much the same on Linux, Mac or Windows.  High-level or low-level calls will not make any difference.  The low-speed USB communication used by the U12 takes about 20 ms per packet.

You would see improvement if you move to any of our newer devices.  They all use full-speed USB where the round-trip time is about 1 ms, and in fact on newer Windows 10 computers we are seeing more like 0.3 ms.

https://labjack.com/products/comparison

We have test programs you can run (for T-series on Windows for sure) to see what is happening on your computer:

Note that this is round-trip, so the time from when your software calls a DO function to when the DO changes will be about half of these.

 

AL
AlexeiLin's picture
Thank you very much for the

Thank you very much for the reply. I guess I should just buy a new product.