LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to skip 3 chars when use "scanf from string" by the parameter "format string" ?

Solved!
Go to solution

hi, I want to read a num 123 from the string like that "sfg123" "fgd123" "ghj123"

I know that I can use "%3s" to skip 3 chars, but it will add an output to "scanf from string"

So, how to use parameter "format string" not only to skip 3 chars, but also add no output to the "scanf from string"

0 Kudos
Message 1 of 6
(3,882 Views)

Scan from string has an input name "initial scan location". Wire a diagram constant of 3 to it.

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

it does work

but I want to know is there any special method through the parameter "format string" to skip 3 chars, just like "*" "?" "." "$"

0 Kudos
Message 3 of 6
(3,797 Views)
Solution
Accepted by topic author chenyin

Hi Chenyin,

 

Try this VI....

I think... This is what you are expecting....

 

new.jpg

 

<<Kudos are welcome>>

0 Kudos
Message 4 of 6
(3,789 Views)

@chenyin wrote:

hi, I want to read a num 123 from the string like that "sfg123" "fgd123" "ghj123"

I know that I can use "%3s" to skip 3 chars, but it will add an output to "scanf from string"

So, how to use parameter "format string" not only to skip 3 chars, but also add no output to the "scanf from string"


What is wrong with having the extra string output on the Scan from String function?  You don't have to do anything with it, and in your picture you are not.

0 Kudos
Message 5 of 6
(3,775 Views)
I just want to know is there any special method to reach the same results. What you said is OK.
0 Kudos
Message 6 of 6
(3,745 Views)