Showing results for 
Search instead for 
Did you mean: 

Convert a Boolean trigger into text string

Go to solution



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!

0 Kudos
Message 1 of 5

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.

This account is no longer active. Contact ShadesOfGray for current posts and information.
0 Kudos
Message 2 of 5



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?

0 Kudos
Message 3 of 5
Accepted by topic author Stef_vl


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.


(Give kudos to good answers, Mark it as a solution if your problem is Solved;)) 

Download All
Message 4 of 5

Have you tried Radio Buttons?


0 Kudos
Message 5 of 5