Error 66 re-visited (Labjack U12 with Labview 2017). | LabJack

Error 66 re-visited (Labjack U12 with Labview 2017).

3 posts / 0 new
Last post
Error 66 re-visited (Labjack U12 with Labview 2017).

Hi, I am trying to use a Labjack U12 on a Windows 7 machine and Labview 2017.  In the first test, I wrote the digital sequence in the top part of the while loop, where I am pulsing a relay (do 0) 60 ms out of every 4 s.  This worked fine and as expected.  Then I added to that, the lower portion with the EAO and EAI functions and go this strange "Error 66".  All of the Labjack VIs come from ljackuw.llb, which I downloaded in April 2018.  And I also have in the same folder, ljackuw.dll.  I know this has been discussed in previous forum topics, but I haven't really found a solution for this one.  I've attached some pictures of the front panel and block diagram.  The latter jpg image shows the error.  Any advice is greatly appreciated.  Thanks!

File Attachment: 
LabJack Support
LabJack Support's picture
Error 66 is "could not claim

Error 66 is "could not claim labjack":

Usually you get this when you make a call and that call can't claim the U12 because some other process is hogging it, but in your case it could be that a parallel part of your VI is hogging the U12 and thus some other call in your VI can't claim it.


I don't see where you do error handling, but the error pop-up box you get is interpreting NI errorcode 66, not LabJack U12 errorcode 66.  Perhaps you have no error handling and LabVIEW is doing some default behavior where it detects there is an error and interprets it as an NI error?

Look at "e function" for a demonstration of normal error handling.  The error cluster is passed in series sequentially from one sub-vi to the next.  If any VI returns an error, following sub-VIs will not do anything except pass along that error.  At the end the errorcode is passed into a LabJack U12 function that interprets the code and returns a string representation.


I can't see exactly why your VI is having a problem, but I can see it has a hard to predict data structure.  It does not have well defined data flow.  Search the Internet for "labview data flow" for background on the topic.  In your case you have a sequence structure, with a while loop, in parallel with 3 other sub-VIs that are in parallel with each other.  We have no idea when any of this parallel elements will run or if they will get a turn to run at all.  The simple solution is to wire all the U12 sub-VIs in series, using ID in/out and error in/out as shown in our examples.  That is the easiest way to know the order in which each call will happen.


Hi - thanks for the message. 

Hi - thanks for the message.  I'll look into all of those things next week (unfortunately, I'm leaving town right now, and I'm VERY anxious to solve this).  I've done this before countless of times - running parallel instances of EDO, EAO and EAI with previous versions of Labview and it's run fine (no errors).  So this was certainly a surprise to me.  But what you say makes sense.  The ultimate VI will be much bigger, so I'll probably need to be very careful in how these are executed. John.