ni.com is currently experiencing issues.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial scan until \r\n

Solved!
Go to solution

I removed the 500 ms delay you had. The VISA read will delay waiting for the next line of data. You don't wont to miss it, so do not add a delay into between reads. It is not needed to prevent hoggin the CPU. The VISA read will be the delay. I did add it to your "Don't Read" case to slow down the while loop. Also added the flush funtion to dump what the GPS sends when you are not reading. 

 

The Read One Line VI is a stripped down version the one I use every day.

I noticed that an over all timeout check is missing. If your GPS start sending out text without a return (it get in some abnormal mode?), the VI will lock up waiting for a return that never comes. Add a time check to the Read One Line VI inside the loop to check if it is taking too long and abort if it is.

Omar
0 Kudos
Message 31 of 34
(581 Views)

Thanks everyone for helping me, I really do appreciate the time yall took to look at my code and figure out what wasn't right. Both Eric1977 and Omar_II codes worked but Omar_II's seemed to run more smoothly. 

Thanks again!

0 Kudos
Message 32 of 34
(580 Views)

Yes, I was trying to decipher what you had designed.lol 

I will do that eventually, but right now I'm just glad to finally get the data in the correct format into the file.

0 Kudos
Message 33 of 34
(575 Views)

Added an overall timeout to the Read One Line VI

Omar
0 Kudos
Message 34 of 34
(573 Views)