03-27-2012 07:18 AM
Hello,
I would like to know if it is possible to convert some text buttons into a single variable text string.
Let me try to explain:
I have 3 buttons: Simulation, Send, Quit
Now I want to use a case structure, in which it's possible to switch between those 3 options.
So if you press the Send button for a second, I would like to have a Text string with the text: Send.
If I press Quit, that same text string has to change into Quit, so I can connect this string to the case structure.
Is this possible? It seems easy but I can't figure out how to do it in an easy way.
The way I made it: Convert Boolean to (0,1), these values multiplied with a number,
for example (1,2,3), than make a case structure with (1,2,3) and write the right text into a text string.
But I think it can be done much more easy, isn't it?
Thank you!
Solved! Go to Solution.
03-27-2012 07:48 AM
It's hard to give a solution without knowing what you are doing with the text after you get it, but you may want to consider using an event structure to handle your button presses. There are several good examples in the LabVIEW help.
03-27-2012 08:04 AM
DFGrey,
With the text I want to control the case structure. So if I press the Send button,
I want to write a text "Send" in a string, and that string is attached on the case selector.
If I press "Quit", that same string has to contain the text "Quit" so the case stucture changes to the case Quit.
Hope you understand it?
03-27-2012 08:17 AM - edited 03-27-2012 08:23 AM
Hi,
Check the attached VI. I think this must help you. The mechanical action of the buttons are "Switch untill released". You can change it according to your requirement.
The second example is using Event Structure.
Regards,
Nitz
(Give kudos to good answers, Mark it as a solution if your problem is Solved;))
03-27-2012 09:01 AM
Have you tried Radio Buttons?