LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial scan until \r\n

Solved!
Go to solution

I have made the changes you suggested but I still don't think I am using the case structure correctly...

Download All
0 Kudos
Message 11 of 34
(1,875 Views)

Make the 0 case display 0... --> that means that there was a EOL found anywhere within the string. A -1 will mean that no EOL was found.

 

Edit: Sorry, I told you wrong before. I don't think I've had enough coffee in me yet. Smiley Wink

0 Kudos
Message 12 of 34
(1,861 Views)

One more thing, make the 0... case default.

0 Kudos
Message 13 of 34
(1,859 Views)

Okay, I made the 0 case the default. Could you specifiy what you mean by "display?" I don't want to write a 0 to the text file.

0 Kudos
Message 14 of 34
(1,854 Views)

Example2.png

No problem.

 

On the zero case, place your cursor next to the 0 and add two peroids, not three, so it displays like the image below.

 

 

 

0 Kudos
Message 15 of 34
(1,845 Views)

Finally someone on here who is blatently clear! lol

I made the change but unfortunately no data is written to the text file. 

I clicked on the wire coming from the offset past match while the VI was running and it displayed a probe dialog window. The window displayed the values of going through the offset past match wire and I never saw a 0 or -1. It jumped around from 81 to 24 to a few other numbers.

0 Kudos
Message 16 of 34
(1,842 Views)

These forumns have been giving my browser fits. Plus it would help if I could a) type correctly, and b) get the syntax right.

 

Post your vi, not the images.

0 Kudos
Message 17 of 34
(1,838 Views)

Using google chrome?

This VI is meant to get serial data from a GPS module and print the NMEA strings to a text file for post-processing. I don't think you would be able to get anything useful out of running the VI. I won't deny you it though.

0 Kudos
Message 18 of 34
(1,834 Views)

@Eric1977 wrote:

Example2.png


I like to use the Greater Or Equal 0 function to make things a little more clear.  It also helps that I use the structure label to say what question is driving the case structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 19 of 34
(1,829 Views)

Tried that too. I think a better way to approach this would be this. Read the data in one byte at a time. Don't start to read until a $ is encountered. After a $ has been seen, start to print to the text file. Contine printing until a \r\n is seen. Go to a newline and repeat the process. Attached is the output from the last attempt using the greater than or equal function. 

0 Kudos
Message 20 of 34
(1,824 Views)