# Labjack, error defining the driver

**URL:** <https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025>\
**Category:** Support\
**Created:** [August 27, 2024, 2:50pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025 "2024-08-27T14:50:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcadena](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jcadena](https://mworks.discourse.group/u/jcadena)\
**Post date:** [August 27, 2024, 2:50pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/1 "2024-08-27T14:50:20Z")

</div>

Hi Chris,  
Here Jaime from schmidlab in fribourg  
I’m starting to transition from using NI-DAQ to LabJack T4. I installed the required drivers for a T4 on a MacBook Pro (M1) with Sonoma (14.6.1). I’m using MWorks 13.  
By using the following definition (labjack):

var test\_input=0  
iodevice/labjack\_ljm labjack (  
update\_interval = 1ms  
connection\_type = USB  
device\_type = T4  
autostart = true  
){  
iochannel/labjack\_ljm\_analog\_input(  
line = AIN0  
value = test\_input  
)  
}

Im having the following error

01:38:11: ERROR: An unanticipated error occurred. This is probably a bug, and someone will want to run this in a debugger. Error message was: “vector”  
01:38:11: ERROR: Cannot turn off LabJack LJM device COMM LED; error = 1307 (LJME\_OLD\_FIRMWARE)  
01:38:11: ERROR: Failed to parse experiment /var/folders/h3/mvv2pvgs1ml3dlbxj\_tgvqj80flgc\_/T/MWorks/Experiment Cache/\_Users\_cadenava\_Documents\_GitHub\_SRG\_repo\_Projects\_Test\_scripts\_Test\_labjack.mwel/tmp/\_Users\_cadenava\_Documents\_GitHub\_SRG\_repo\_Projects\_Test\_scripts\_Test\_labjack.mwel.xml

any suggestions??  
Thanks a lot for the help

Jaime

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 27, 2024, 4:15pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/2 "2024-08-27T16:15:28Z")

</div>



---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 27, 2024, 9:34pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/3 "2024-08-27T21:34:53Z")

</div>

Hi Jaime,

It looks like there may be an error in MWorks’ handling of a _LabJack_ error, which leads to the “unanticipated error occurred” message, so I’ll need to look in to that. However, the LJME\_OLD\_FIRMWARE error code suggests that the root problem may be that your T4’s firmware is indeed too old. (I’ve seen brand-new devices ship with very-old firmware before, so this wouldn’t surprise me.)

Can you try updating your T4 to the [latest firmware](https://support.labjack.com/docs/t4-firmware) and see if that resolves the issue? You’ll need to use the [Device Updater](https://support.labjack.com/docs/device-updater) tab in the [Kipling](https://support.labjack.com/docs/kipling) application.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [August 28, 2024, 12:50pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/4 "2024-08-28T12:50:32Z")

</div>

FYI, I’ve identified the [issue](https://github.com/mworks/mworks-issues/issues/461) with MWorks’ error-handling code. I will try to get a fix in to the nightly build soon.

Chris

---

<div class="post-metadata">

**Author:** ![jcadena](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jcadena](https://mworks.discourse.group/u/jcadena)\
**Post date:** [September 2, 2024, 12:41pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/5 "2024-09-02T12:41:11Z")

</div>

Hi Chris,

I updated the firmware and now the test program is running  
However I got the following error every 2 to 3 seconds:  
"  
WARNING: Scheduled task (/Users/cstawarz/mworks-buildbot/worker/build\_for\_macos/build/plugins/core/LabJackLJM/LabJackLJM/LabJackLJMDevice.cpp:656) falling behind, dropping 3 scheduled executions (priority = 2, interval = 1000, task = 0x600002d6a8a0)  
"

Is this something that can compromises timing?

Cheers,

Jaime

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [September 3, 2024, 1:48pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/6 "2024-09-03T13:48:22Z")

</div>

Hi Jaime,

Those warnings indicate that MWorks can’t read inputs from the LabJack device as often as you’ve asked. Try increasing the value of the [update\_interval](https://mworks.github.io/documentation/latest/components/labjack_ljm_device.html#update-interval) parameter. You could try 2ms to start, but you may find that you need to increase it further (maybe up to 5ms).

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![jcadena](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jcadena](https://mworks.discourse.group/u/jcadena)\
**Post date:** [September 3, 2024, 2:46pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/7 "2024-09-03T14:46:31Z")

</div>

Perfect, that worked well.  
Thank you very much!!!

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [September 5, 2024, 3:56pm UTC](https://mworks.discourse.group/t/labjack-error-defining-the-driver/1025/8 "2024-09-05T15:56:30Z")

</div>


