I get this error code in a c# program where the data acquisition runs in a separate thread from the main thread. The same code seems to work fine if the data acquisition runs on the main thread. This error is thrown after a day or so of taking data usually.
Thanks for reporting. It sounds like an LJM thread safety issue. I'd like to get more information to help debug it.
First, please make sure you're running the latest beta software:
https://labjack.com/support/software/installers/ljm
Also, please update to the latest firmware using Kipling.
What LJM functions are called in the data acquisition loop?
What LJM functions are called in the main thread? Or in other threads?
If possible, please enable LJM debug logging as described here:
https://labjack.com/support/software/api/ljm/function-reference/debuggin...
Then, once the error occurs, please send us your debug log before opening any other processes that might use LJM.
I have the latest beta software installed and I just updated the firmware.
Once it sets up the labjack and starts a stream with eStreamStart it just reads out data with eStreamRead.
There are no LJM calls in the main thread or other threads. The only communication is to send averaged data through an event handler.
I'll try and enable debugging.
That's surprising that no other LJM calls are being made.
Does the issue still happen if you use SetStreamCallback? SetStreamCallback essentially runs eStreamRead in a separate thread from main:
https://labjack.com/support/software/api/ljm/function-reference/ljmsetstreamcallback
I updated the firmware and another issue that I had returned. It was the same as in this forum post https://labjack.com/forums/t7/channel-readout-changes-order. I'd like to try the SetStreamCallback, but it doesn't look like that is implemented in the C# libraries. Is that correct? There should be a way to make an event handler that would do a similar thing.
[Edit by admin: Fixed link]
Sorry, yes, you're correct. SetStreamCallback is not currently implemented in the C# wrapper.
It looks like you copied the wrong link.
Sorry I meant to copy this link https://labjack.com/forums/t7/channel-readout-changes-order. It looks like I'm no longer getting the LJME_ERROR_BIT_SET, but the channel order is getting scrambled again.
Glad to hear you're not getting LJME_ERROR_BIT_SET anymore. I sent a message on the other thread.