Fast Streaming With A Logging Set On A U3


Recommended Posts

Hi,

I'm trying to speed up a GUI and included code from the stream 4 channels UD example from the website and the streaming itself works OK for a single channel running at 30kHz. However, when I log the data via a logging set it works fine for a few seconds and then DaqFactory hangs with a C++ runtime error and the program isn't responding, any idea what might be going wrong here and how it can be resolved? Can the File.write commands be used together with LabJack streaming instead of the built in logging set and would that possibly resolve my issue?

Thanks,

Marcus

Link to comment
Share on other sites

You can't use File.Write() to do streaming data. Well, you can, but it'd be pretty involved. My first thought is that you need to make sure you are running the latest UD drivers and firmware from LabJack. Then, in DAQFactory make sure you have the Align Threshold set to 0. If it persists, post a .ctl doc that demonstrates this.

Also note that none of the LabJacks support streaming of 4 channels at 30khz. The maximum scan rate I believe is 60ksamples for the UE9 on Ethernet. 4 channels at 30khz is 120ksamples.

Link to comment
Share on other sites

Yup, I did updated the UD driver and the align threshold is set to 0, in this example I'm only using one single channel (CH 7) which I pull the time from and log to the file and the problem still occurs, either the C++ Runtime Error or DAQFactory becoming unresponsive and with a “Labjack Device #0 error. Buffer overrun while streaming. Stream stopped”.

I've attached the .ctl, try setting it to 20 or 30 kHz and see what happens if you let it record for a while, the last error I got was after around 5-6 seconds running @ 30kHz.

Thanks,

Marcus

Link to comment
Share on other sites

Did some tests today and it seems as if the logging function starts to lag a bit at around 8-9000Hz (recording data to file with the correct frequency but not for as long as the logging is active, when I timed it at 10seconds it produced around 6 seconds worth of data). Increasing the sampling frequency to 15kHz starts to log ok but when the logging is stopped DAQFactory encounters a C++ runtime error, looking at the 15kHz results file it does contain data with the right timing interval but not nearly for as long as the logging was active before the C++ error occurs.

Again, not really a big issue for me but it would be good to know if the streaming with logging function is memory/CPU limited or if there's some built in limitation using the logging function with the LabJack. I'm on a 3GB Ram, Windows 7 64bit Intel Celeron P4600 @ 2 GHz laptop.

Thanks,

Marcus

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.