I am new to the forum, so greetings to all of you out here. :)
I received my Labjack U3 (v1.30 / newest exodriver) a few weeks ago and I am very happy with it. Being not an engineer or physicist I expected it to be much harder to convince it to work but in fact with the help of the great forum and the U3 user guide I managed to get where I wanted it to be. :)
Well, almost. My problem is a quite special one, I am afraid, because I have to communicate with the U3 via Mac (newest Macbook, USB3) and MatLab (2014b). This is unfortunately non-negotiable. :(
Anyway, using exodriver/calllib from within Matlab and a derivative of the feedback(AIN, IOType1) low level function from mhopeng’s U6 Matlab class, I can scan the analog input on AIN0 in a for-loop with a interscan delay of about 1 ms. This delay is comparable to what you write in the user guide 3.1. (I use Matlabs software timing), so that’s cool.
Everything looks fine, no errorcodes, checksums seem valid etc. I see my periodic signal on the Mac screen the same way I can see it on my oscilloscope. It seems to have the right voltage values (after calibration) and the timing is also like it should be.
Without any obvious pattern I observe sometimes (maybe every 10000 to 20000 runs inside the loop, i.e. 10-20s) that a single difference between the timestamps of consecutive samples taken from AIN0 is unusually long (up to 250ms instead of 1ms). During this time existent signal data is either not acquired or not sent to the mac. I know the data exists because I verified that with my oscilloscope (so it is at least being sent from the source to the U3). The software timestamps are still valid and the data's temporal integrity is thus intact but missing data would seriously screw up the post-processing of my signal (like finding peaks; missing data for 250ms is not good when your signal is at around 4Hz). btw, pausing the for-loop from within Matlab for 10ms to give the U3 some time between write/read calls also does not help.
I know it’s not much to go on and I apologize for that. But do you guys happen to know of any circumstance where the U3 would just shut down for a while, takes ages to process write/read just to continue after 100-250ms at the normal rate without giving any errorcodes? For instance if an internal buffer overflows or whatever…
i know it could also be on the other (mac) end or in between (usb) but just wanted to make sure its not the U3 because reading an analog signal is not supposed to be that difficult for it, right? I wonder what i do wrong....
Kind of desperate here after what was otherwise a nice experience. please let me know if you need more info on what i do, like the matlab code etc.
thanks for the good work, i already learned a lot. :)