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
A few points to look into: