06-12-2013 02:42 PM
A couple of things I see:
Make these changes and then get back with us.
06-12-2013 02:53 PM
I have no need to write any data to the module at least as of right now. It is just continuosly reading data from the GPS unit. I made all the suggested changes and I am now back to square one. The only data written to the text file is the LAST data which was present in the text box on the front panel. I need it to continuosly update. Also, the last string which was printed to the text file was only a partial string.
06-12-2013 03:10 PM
This the the sub VI I use to read a serial port ONE line at a time. The specified termination character ("return", "/r", 0xA) is used to terminate the read at the end of one line.
If it does not get a termination character, it will return a time out error. Feed that into a case structure and don't write to the file if there was an error
06-12-2013 03:19 PM
A few things I immediately noticed.
06-12-2013 03:21 PM
Try this...
06-12-2013 03:26 PM
@Eric1977 wrote:
Try this...
I'm sorry, but I have to point out your Rube. You get the file position and then immediately set it to the same value. Why even set the file position? You don't need to because the position is incremented with every write.
06-12-2013 03:26 PM
Try this with the Read One Line
06-12-2013 03:28 PM - edited 06-12-2013 03:29 PM
@Eric1977
I believe that did it! There was just one extra $ printed on the very last line, but I think I should be able to handle that. The attached text file is what I have been aiming for.
06-12-2013 03:35 PM - edited 06-12-2013 03:36 PM
@Omar_II
This code seems to run much more quickly and I have yet to get any unwanted characters printed on my text file. Thank you so much!
06-12-2013 03:39 PM
Your right. I did a test in another VI and set the file position to end first and then e While Loop handle the rest. Thanks for pointing out my Rube.