LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric to string

Solved!
Go to solution
I am trying to create a survey using labview the program has to go 1-8 and depending on where 8 is it will post a string that is associated with the numeric.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 1 of 12
(3,320 Views)
You will need to better explain what you're trying to do. What do you mean it has to go 1-8? Is it supposed to count? Is there supposed to be some sort of indicator to show the count? Is it supposed to do something, or monitor something while counting? What do you mean "where 8 is"? Where is it supposed to be?
Message 2 of 12
(3,318 Views)
ok it is a survey style program where you are asked to enter in a numbers of your fear 1 through 8 and than depending on where the 8 is in the code it tells you what your vilian will be.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 12
(3,309 Views)
Here is what i would like the program to do it is just the front panel i  need to figure out the logics of the program as well as the the conversion method
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 12
(3,308 Views)

We definitely need more detail. What if none of the entries is 8? What if more than one number is 8? What are the villains?

 

If the user need to enter numbers 1-8 in the 8 controls (no duplicates), you probably should use integer controls. Make an array of all controls using built array and search for "8" using "search array". Use the resulting index to get the villain from an array of villain strings.

Message 5 of 12
(3,302 Views)

the villians are:

 

Captain Hook[1] (Peter Pan)
Fear of Water: 7
Fear of Fire: 3
Fear of Evil: 4
Fear of Fate: 8
Fear of Magic: 1
Fear of Change: 6
Fear of Wildlife: 2
Fear of The Dark: 5

 

Chernabog[1] (Fantasia)
Fear of Water: 2
Fear of Fire: 6
Fear of Evil: 7
Fear of Fate: 1
Fear of Magic: 3
Fear of Change: 4
Fear of Wildlife: 5
Fear of The Dark: 8
 
Hades[1] (Hercules)
Fear of Water: 1
Fear of Fire: 8
Fear of Evil: 2
Fear of Fate: 3
Fear of Magic: 7
Fear of Change: 5
Fear of Wildlife: 4
Fear of The Dark: 6   

 

Jafar[1] (Aladdin)
Fear of Water: 3
Fear of Fire: 7
Fear of Evil: 5
Fear of Fate: 4
Fear of Magic: 8
Fear of Change: 2
Fear of Wildlife: 6
Fear of The Dark: 1   

 

Maleficent[1] (Sleeping Beauty)
Fear of Water: 6
Fear of Fire: 5
Fear of Evil: 8
Fear of Fate: 2
Fear of Magic: 4
Fear of Change: 7
Fear of Wildlife: 1
Fear of The Dark: 3
   
Queen[1] (Snow White)
Fear of Water: 5
Fear of Fire: 4
Fear of Evil: 1
Fear of Fate: 7
Fear of Magic: 6
Fear of Change: 8
Fear of Wildlife: 3
Fear of The Dark: 2 
 
Scar[1] (The Lion King)

Fear of Water: 4
Fear of Fire: 2
Fear of Evil: 3
Fear of Fate: 6
Fear of Magic: 5
Fear of Change: 1
Fear of Wildlife: 8
Fear of The Dark: 7   

 

Ursula[1] (The Little Mermaid)

Fear of Water: 8
Fear of Fire: 1
Fear of Evil: 6
Fear of Fate: 5
Fear of Magic: 2
Fear of Change: 3
Fear of Wildlife: 7
Fear of The Dark: 4

 

the only one that matters is the 8 in the selection if there is mor than one 8 than it will prompt the user to not put more than one 8

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 6 of 12
(3,294 Views)

OK, it seems you should be able to do this very easily as described:

 

"Make an array of all controls using built array and search for "8" using "search array". Use the resulting index to get the villain from an array of villain strings."

 

Have you tried? Where did you get stuck?

0 Kudos
Message 7 of 12
(3,278 Views)

ok i have the first part where i put my controls through a build array here it is what about my villians though how will the program know if i put 8 on the "fear of wildlife" that the string Scar sould appear in the string indecator box

 

here is what i have:

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 8 of 12
(3,264 Views)
Solution
Accepted by topic author Harold_Timmis

Well, as I said, just use search array, search for the first occurence of the number 8, and index into an array of villains.

 

It would be much easier to use an array of controls instead of 8 individual controls, but here's an image of a quick draft. You really should change your inputs to integer (blue) representation. (If you want to keep individual controls, just wire the array you built into the same code, the rest remains identical.)

 

Message Edited by altenbach on 11-16-2008 02:37 PM
Message 9 of 12
(3,252 Views)

here is the code i am using and for some reason it does not work

 

here is the code:

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 10 of 12
(3,236 Views)