Timing Lag Issues


Recommended Posts

Hi all,

I am experiencing the following error when trying to set my sampling rate to less than 2 seconds:

"C1038 Timing lag, data acquisition stalled."

I don't believe I am using excessive channels so unsure why I am getting this issue. I understand it cannot receive information in time but I don't think my setup is overly complex so perhaps something else is causing this?

I have attached the file to this post. 

Any help would be greatly appreciated. 

Regards,

Callum

Wafer Interface.ctl

Link to comment
Share on other sites

You are right. Your application is not particularly complex, and I see only one minor detail that probably wouldn't cause slow acquisition.  The issue is in your conversions.  Two of them reference channels but without [0] so will end up using the full history in the calculation.

After fixing that, I'd start by making sure you are running the latest firmware / drivers from LabJack.  Also make sure you don't have any other applications, like LJLogger, etc. running that also access the LabJack.  Then I'd try setting all the channel timing's to 0, and then set just one channel to 2, then try smaller values.

Link to comment
Share on other sites

Hi,

Thank you for the prompt reply. I was quite sure your answer would solve the problem; however, unfortunately is hasn't :(

I have changed my conversions - the ones that reference other channels/variables I have added a [0] there. 

I have installed the latest drivers from LabJack and ensured no other processes involving the LabJack are running. 

I created a new file with just one channel and tried to get a timing of 0.5; however, the same issue appeared. 

Could this be a hardware problem? 

Thanks

Callum

Link to comment
Share on other sites

It might be.  I'd reboot just to be sure and make sure you aren't running any other software that might access the LabJack.  I'd also try using the actual ID of the LabJack as the D#.

I'd also try a different USB port, preferably a hub without other stuff on it.

Do the LabJack tools also seem sluggish?

Link to comment
Share on other sites

Hi,

Thanks again for the prompt reply.

I believe I have traced it back to my start up sequence. As soon as I run it the timing lag issues begin. I have pasted the code below:

global Offset = 0

using("device.labjack.") 
include("c:\program files (x86)\labjack\drivers\labjackud.h") 


AddRequest(0, LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION, 12, 0, 0) 
AddRequest(0, LJ_ioPUT_AIN_RANGE, 0, LJ_rgBIP0.1V, 0, 0)
AddRequest(0, LJ_ioPUT_AIN_RANGE, 10, LJ_rgBIP5V, 0, 0)
AddRequest(0, LJ_ioPUT_AIN_RANGE, 11, LJ_rgBIP5V, 0, 0) 
AddRequest(0, LJ_ioPUT_AIN_RANGE, 2, LJ_rgBIP10V, 0, 0) 
AddRequest(0, LJ_ioPUT_AIN_RANGE, 3, LJ_rgBIP10V, 0, 0) 
AddRequest(0, LJ_ioPUT_AIN_RANGE, 4, LJ_rgBIP5V, 0, 0) 
AddRequest(0, LJ_ioPUT_AIN_RANGE, 5, LJ_rgBIP5V, 0, 0) 
AddRequest(0, LJ_ioPUT_AIN_RANGE, 6, LJ_rgBIP10V, 0, 0) 
AddRequest(0, LJ_ioPUT_AIN_RANGE, 7, LJ_rgBIP10V, 0, 0) 
GoOne(0) 

What I am trying to do here is set the range of the channels and specifiy certain ones as differential (as in Ch0 + and Ch1 is the -).

Is seems the issue is with the following line:

AddRequest(0, LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION, 12, 0, 0) 

Can u spot anything wrong? I am using a LabJack U6-Pro. maybe the line isn't needed or I am setting the resolution wrong. 

Thanks as always!

 

 

 

Link to comment
Share on other sites

Yes.  Resolution index 12 is the highest resolution available for the U6.  The higher the resolution, the slower the device becomes.   As seen on their website here:

https://labjack.com/pages/support?doc=/datasheets/u6-datasheet/appendix-b-noise-and-resolution-tables-u6-datasheet/

The U6 at resolution index 12 has a sample time of 159 ms PER CHANNEL.  So you have to multiply 159ms * the number of channels and that is the minimum Timing.  Truthfully you need slightly (5ms?) more than that for comms.  If you need faster you either need to use a lower resolution index, or get a second LabJack so DAQFactory can sample both simultaneously.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.