As an update, the fixing the loose ground wire appeared to have no effect, as the phenomenon continued. Weirdly, the problem just went away on its own, and I've gotten 4 days straight of good data. This just confirms what everyone has said, I need error checking. I've spent a few hours trying to break down plcnut's solution, and I'm afraid its pretty well over head, so I figured I would try to build a very simple first step. This is what I tried.
1. IF the InQueue is not equal to zero THEN STREAMIN
2. STFIND the letter "T"
3. IF "T" is at index 0 THEN do a little parsing
4. IF "T" is not at index zero THEN DEVCLEAR AND JMP to Step 1.
My problem as always is dealing with the STREAMIN instruction. I can't seem to find a way to get On Success. I've tried various network timeout values, but that never triggers. plcnut had 0x0A OR 100ms. I don't think there are any line feeds in the string, so that doesn't trigger it, and I don't no why I never get a network timeout. I opened a data view for the string used in my project, and viewed it as hex. I exported it and copied into word. Using a HEX to ASCII converter here,
Hex to ASCII I was able to see that there is a CR after the date/time stamp, and after each sensor value EXCEPT the last one. I have attached an excerpt from the meter service manual, and as you can see, each sensor value line should be followed by a space and a CR. I wonder why that last one is getting cut off? For anyone that's interested, I have also attached my string in a Word doc in ASCII and HEX. Note that DMD Data View converts the CR to a period (.), and there is no period at the end of the ASCII string either. Short story long, any ideas how I terminate this STREAMIN instruction?