LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Empty serial port read buffer

Solved!
Go to solution

So the error filtering solution seems to be working just fine. I have a follow up question though. Every once in a while, the pyrometer appears to spit out some gibberish even though according to HyperTerm, the data stream appears to be immaculate. Admittedly, I didn't watch HyperTerm for very long and my own program very rarely sees the gibberish value but is there any way to cut this out completely?

0 Kudos
Message 11 of 13
(888 Views)
Solution
Accepted by topic author RudyB

Well without some sort of error detection/correction built into the data stream, like a CRC then all you can really do is a comparison to try to detect bad data.

 

You must have the communications spec. go through it and figure out what good data should look like.

 

Then you will have to come up with a couple checks, like length and maybe a string pattern compare.

 

Read the help on Match Pattern Function and the Match Regular Expression function in the String palette.

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 12 of 13
(880 Views)

All of your suggestions were immensely helpful. Using them, I'm now able to do a character by character match and toss all the bad strings. Thanks again.

0 Kudos
Message 13 of 13
(850 Views)