LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan from string with variable format length

Solved!
Go to solution

Question, I have a string I need to scan into separate string variables. The scan from string errors out if the string being parsed can't fill each type defined in the string format. The problem I have is the string length varies with multiple strings separated with spaces up to 13 different string types sometimes and sometimes only 6. Is there a different way to scan the string into different strings with the token command or something and not use this since format varies?

 

I attached an example of what I'm trying to do.

 

Thanks.

 

0 Kudos
Message 1 of 6
(2,952 Views)

We need more information: How do you know how many variables are there? What should the results be for the two samples of input strings in your VI?

 

Are all the variables separated by spaces or some other delimiter? Do you have control over the format of the incoming strings?

 

Lynn

0 Kudos
Message 2 of 6
(2,942 Views)

I would use "spreadsheed string to array" with a type of 1D string array, format %s, and a space as delimiter. See how far you get.

0 Kudos
Message 3 of 6
(2,939 Views)

Great. Could you resend the example in V11 or lower 😃

 

Thanks.

0 Kudos
Message 4 of 6
(2,930 Views)
Solution
Accepted by topic author QRP
Message 5 of 6
(2,922 Views)

Perfect Thanks...

0 Kudos
Message 6 of 6
(2,919 Views)