LabJack on linux to read in inputs/triggers for screen flips in matlab

  1. Using a classic arduino and MATLAB’s current Arduino toolbox: T4 is much much better. this is mostly due to MATLAB’s terribly bloated arduino toolbox. I got variable delays > 30ms.
  2. Using the older MATLAB arduino toolbox (legacy version): T4 is faster than a classic arduino and not clearly slower than a more powerful USB3 Seeduino Xiao.

In general command-response (as you use with a TTL or strobed word) times are sub-millisecond on U and T series Labjacks. USB is a tiny bit slower than ethernet when I tested on a T4.

At least for digitial output, there isn’t a strong advantage of a LabJack over an arduino other than the hardware itself makes it a bit easier with the DB15 and screw terminals etc.

I haven’t test the latest Arduino Uno R4, but the previous generation were clearly slower than alternative arduino boards like the Xiao I mentioned above. Some performance code for different arduino’s and serial libraries can be found here: https://psychtoolbox.discourse.group/t/serial-port-interface-code-a-performance-comparison – I imagine the new R4 would remove this gap…