U3 Latency Issue | LabJack
 

U3 Latency Issue

2 posts / 0 new
Last post
David
David03182's picture
U3 Latency Issue

Hi All,

I am using Labjack U3 to run a strobe light via Matlab (2013b) with a string of 1s and 0s to signal the on/off of the light.

The issue I am having is when trying to flicker at frequencies above 25Hz, there is no resulting signal to the strobe, when I run the strobe close to its max frequency around 22Hz I can see that it does not fully complete each on/off cycle suggesting a timing issue

Ideally I am looking at running the strobe at 40Hz so would need a latency of 12.5ms

I am using a windows XP (I know technical reasons as to why), but have tried the code on a Windows 7 machine and have the same result

From what I have read this kind of latency should not be a problem for Labjack

Anyone have any ideas what is going on?

Thanks


David

 

This is the code I am using to interface with labjack

 

 

for second = 1:time

 

        tstart = tic;

    

        ljudObj.AddRequest(ljhandle, LabJack.LabJackUD.IO.PUT_DAC, 0, volts, 0, 0);

        ljudObj.GoOne(ljhandle); %Send the request

        telapsed = toc(tstart);

        count = count + 1;

 

        delay(halfphase-telapsed);

        telapsed = toc(tstart);

       

 

         tstart = tic;

         ljudObj.AddRequest(ljhandle, LabJack.LabJackUD.IO.PUT_DAC, 0, 0.00, 0, 0);

         ljudObj.GoOne(ljhandle); %Send the request

         telapsed = toc(tstart);

         delay(halfphase-telapsed);

     

     

end

 

LabJack Support
labjack support's picture
A few points to look into:

A few points to look into:

  • Use an oscilloscope to measure the output of the DAC. As frequency increases there may not be enough time for the signal to cross the logic thresholds of the strobe control.
  • The DAC on the U3 has a 10ms time constant. That means it will take 10 ms to perform ~63% of the voltage swing. To get to 40 Hz we may need a faster output.
  • What are the logic thresholds on the strobe control?
  • Use a DIO if possible.