I have a T7-pro connected to a headless rpi zero and I am reading data with a python script. The data are 9 analog measurements (3 thermopiles and 6 thermocouples). I won't have access to this system after I deploy it.
My python script (attached) summarized:
- Open the labjack,
- Stream a few measurements in a while loop
- average the measurements
- Close labjack
- open a file in append, append row to data file, close file
- send the average data to initialstate.com
Right now I have a cron job to execute this script every minute. At some point (minutes/hours) the script fails to contact the labjack with errors 1227 or 1239.
Is this an issue with my approach? The rpi? T7? Is there a better way to go about this?
Hello,
Your approach looks alright, though you could try adding a retry on ljm.openS. For example: you could try to open the device 10 times using try/except in a loop.
To help us debug, please answer some questions:
I'm noticing in the LJM changelog that there are some fixes that look relevant to your issue, but the available releases are old. I'll add a new LJM release so you can try it out. I will update this thread when it's available.
I am running a USB connection with ljm version 1.07. I will try upgrading, is there a newer version for ARMv6? I do not see one beyond 1.07. Thanks
Sorry for the delay; we're working on releasing a new version. I will update this thread when it's ready.
great. thanks for the follow up.
Can you update on when this will be available? Thanks
Sorry about the delay. There is a new beta release for ARMv6:
https://labjack.com/support/software/installers/ljm