LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan String Token Problem with leading Tokens

Solved!
Go to solution

@QRP wrote:

I think for some reason all of this stuff is setup for ending delimitors even the spread sheet to string function. There has to be a way for Labview to be able to handle in coming serial traffic with leading tokens. I sure miss my C programming language, it's so simple that way 😃


As far as I know, C works the same way.  You could probably setup a loop that looks for 2 * and then grab the data between them.  But that's more trouble than its worth when all you need to do is throw away the first element of the array.

 


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 11 of 14
(632 Views)

@QRP wrote:

Jeff you are the master my friend. Your last example worked wonderful. Thank you so much!


My name is not Jeff...

 


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 12 of 14
(630 Views)

Sorry crossrulz, your example works great. Thanks again.

0 Kudos
Message 13 of 14
(625 Views)

@QRP wrote:

Jeff, I really like your approach, but every time I run the example it returns the data starting in array offset 1 and not 0, why would that be?


With *xx*xx*xx, Because there was no string before the first delimiter so an empty string is generated.  If all tokens are at the end of the string xx*xx*xx* the last value would be empty. with xx*xx*xx only three elements are generated


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 14
(619 Views)