LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scan for string

Solved!
Go to solution

HI erveryone,

 

I am working with the Scan from String fuction, but I have a problem. The string that I have as input is "temp=32.2", so I am using the Scan function as follows:

 

undefined

 

But as output 1 I have "temp=32.2" and 0 in the output 2.

 

Does anyone have an idea of how to separate "temp" in output1 and 32.2 in output2?

 

Thanks for your help

Raymundo Cassani
0 Kudos
Message 1 of 8
(2,952 Views)

Try a format of "%4s=%f"

0 Kudos
Message 2 of 8
(2,948 Views)

Thank you for early answer, but, what happens if my string is size-variable? I mean for some readings I have temp=32.2 for others something like: voltage=122.1,  current=12, or humd=51.2 

Raymundo Cassani
0 Kudos
Message 3 of 8
(2,944 Views)
Solution
Accepted by topic author rCassani

The you need to program around it, for example as follows. There are many ways to do this...

 

 

Message 4 of 8
(2,942 Views)

thank you

Raymundo Cassani
0 Kudos
Message 5 of 8
(2,935 Views)

Just make a small change to your format string, easy to do when you construct the format string from the dialog in the right-click menu.

 

undefined

Message 6 of 8
(2,927 Views)

he wants the leading string too, maybe....

0 Kudos
Message 7 of 8
(2,919 Views)

@altenbach wrote:

he wants the leading string too, maybe....


That sits in the first output. 

0 Kudos
Message 8 of 8
(2,915 Views)