As a relative novice, I'd appreciate any suggestions here. I'm running this board and, despite needing to average out a lot of random noise, getting quite good results. But after a (variable) time lag the readings lock up as per the attached jpg.
Reloading the sketch fixes it for a while, but that's no comfort as I want it to run unsupervised 24/7.
I don't think it can be a coding problem.
The only thought I have is that that the board makers did not include pull-up resistors as the Honeywell chip (or it's cheap knock-off substitute) seems to require.
If you have Win10, perhaps the PLX-DAQ doesn't like Win10, or vice versa.
For a test, I would run the serial data into putty or the Arduino IDE monitor. Then copy and paste into excel. Hint If you are not familiar with Data/Text to columns you should look into it.
Wideband noise is difficult to filter digitally. I would remove the filtering from the arduino code and see what it takes to filter it in Excel, then port that to the arduino.
Thanks for your interest, I'll keep looking into that.
I've since discovered that the readings lock up even using the serial monitor without PLX-DAQ; so I'm no wiser. It's odd that it works well for an unspecified period then locks up.
As a test i would increase the range of X, Y, Z to int32_t In theory it should not matter but just a test.
The other thought is noise on the power supply to the sensor. Perhaps it is getting reset, I'm not familiar with your sensor, what happens if it is not initialized after a power interruption?
Thanks everyone for your interest and advice, I'll follow up your suggestions.
The fault is not with the Excel macro - it still locks up when I just use the Arduino serial monitor or serial plotter.
I've replaced both the USB lead and the Arduino Nano with others - no difference.
It is certainly not some sort of overload/out of range problem, as bringing a magnet close to the sensor sends the plot rocketing up or down.
It's not related to any external change, other apps running on the PC, or to a set time - it appears to happen quite at random, sometimes after running successfully for several hours.
When the fault occurs, simply closing the serial monitor and opening it again restores normal functioning. No need to touch the hardware.