LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Button to String

I am trying to create a button in which when the user presses it, it types in a string into a string control. How can I do that?

0 Kudos
Message 1 of 5
(857 Views)

Hi Aether,

 


@AETHER1 wrote:

I am trying to create a button in which when the user presses it, it types in a string into a string control. How can I do that?


So you want to do something like this:

 

IF button press THEN
  local of string control := "String"
ENDIF

 

So what have you tried and where are you stuck?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(851 Views)

Yes, this is exactly what I am trying to achieve in code terms. I still haven't tried anything yet as I am still confused where to begin.

0 Kudos
Message 3 of 5
(774 Views)

Hi Aether,

 


@AETHER1 wrote:

I still haven't tried anything yet as I am still confused where to begin.


When you don't know where to begin this simple code then you should start with the Training resources offered at the top of the LabVIEW board!

 

After doing so you should start by placing a case structure in your empty block diagram as that is the LabVIEW way of IF-THEN-ELSE…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(765 Views)

No need to create a button, because it's already there. The code piece is in the PNG, you can drag and drop onto the block diagram space. I set the button to switch behavior.

 

temp.png

0 Kudos
Message 5 of 5
(751 Views)