Closed violetteta8 closed 5 years ago
Still seems to work with SN 356. Kyle is bringing another SUNA and a USB cable tomorrow. We can attempt to speed or slow the instrument with integration time/averaging settings. After, we can pull the "AddSuna" branch into the Master.
I'm going to say the TimeOut fix took care of at least SN 356. No issues over the last 60 15min values!
After playing with this, I still think the TimeOut was the problem. But, I added some other logic to allow us to still process the stats, even if we miss values (min number of good values is 10, and only store in the "Good" array for processing). I'm closing this issue.
For documentation's sake: the SUNA at MDM is intermittently missing a single value (making the entire array NANs) which causes the median calculation to return an NAN as well. We have another SUNA here (SN 356). It began running properly, and then over night missed single values in some of the sampling, but not all. We began seeing it more often and the logger was missing the first or first and second values of the 30sec burst. Mark found the SerialIn timeout was set to 50 (0.5s). After discussion, we realized that this might be the problem. If the SUNA takes >0.5s to output a value, the logger has already moved on to the next instruction and has no values to fill the array with. When it syncs back up, it works fine. I chose to increase to a 2 second timeout. So far, SN 356 has worked flawlessly for 10 punches (2.5hr). I will continue to monitor and attempt to force the SUNA to delay longer between outputs to see if that will make it break again. I'm keeping this issue open until we determine the timeout was our problem.