Showing results for 
Search instead for 
Did you mean: 

For loop feeding the constant value from string

Go to solution

I want the user enter the interval number, let's say he enters 10. Then for i=1; i<10 , i++ , then next time if he enters 5 , loop runs for 5 times

so when I created a for loop in labview the number should be constant. The input value is a string so how do I convert  string to constant?

0 Kudos
Message 1 of 5
Accepted by topic author Canucks.canucks

You seem to be speaking in some version of C.  This is LabVIEW -- get used to it.  Users can enter data in any kind of Control -- if the control is a numeric control, the input will be a number.  If the control is a String control, it will be a string.  The Block Diagram has (String) functions to convert strings containing representation of numbers (e.g. "10") into number (such as the number ten).


I regret that the Getting Started with LabVIEW Tutorials have been (temporarily, I hope) moved from their place at the beginning of this Forum.  You really need to learn the basic elementary parts of LabVIEW ...


Bob Schor

Message 2 of 5

So I changed it to numeric indicator..still same problem

0 Kudos
Message 3 of 5

Sorry yes I meant to write a pseudo code rather than labview apologies

0 Kudos
Message 4 of 5

Thank you! I changed it to numeric control..

0 Kudos
Message 5 of 5