From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word or phrase selects the proper radio button.

Hi guys,

 

I am having a difficult time trying to get a word or a phrase to be able to be recognized and select the proper radio button but I can't seem to figure out how to associate it. I placed a 0 for the first radio button but i get a red dot. Is this the proper way to do this?

 

I apologize for the seemingly simple question but I want to make sure I am doing it correctly.

0 Kudos
Message 1 of 9
(2,444 Views)

What is your intent here?

 

Do you want the output of Radio Button selection to drive a case, but you want the case selection to be a string?

 

What you have here doesn't make sense by itself

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 9
(2,442 Views)

If you make the labels of the controls inside the radiobutton the same as the boolean text, you can just wire the radiobutton directly to the case structure or format it into a string.

 

RadioStrings.png

 

 

0 Kudos
Message 3 of 9
(2,435 Views)

No, I probably should have explained myself a bit better.

 

I have a SubVI that controls a few parameters on a piece of equipment. One of the controls has three different modes that can be set so I figured a Radio Button would be a good fit . I can take the radio button selction and generate a string from it easily but I need to be able to set the radio button in case the same SubVI is called again so the previous set of parameters are displayed to the user. I figured bringing in the string that set the mode on the piece of equipment could be the driver to set the radio button.

 

I hope that makes sense.

0 Kudos
Message 4 of 9
(2,420 Views)

Carry it as a radiobutton. No need for strings.

 

It is still not clear at all what you want. Can you attach a simplified scenario that contains the subVI?

0 Kudos
Message 5 of 9
(2,407 Views)

I think I know what you want...

 

Change your Radio button labels to Captions and you can change the captions dynamically, so your labels would stay the same but your captions can change.

 

Snap24.png

2014 Version Attached.

 

mcduff

 

PS The labels cannot change dynamically, they need to stay fixed.

0 Kudos
Message 6 of 9
(2,392 Views)

@mcduff wrote:

 

Change your Radio button labels to Captions and you can change the captions dynamically, so your labels would stay the same but your captions can change..


 

Nowhere do I read that the radio button text should dynamically change, but if that is desired, we would change the "boolean text.text" using code. No need for captions.

0 Kudos
Message 7 of 9
(2,386 Views)

@CA

 

I interpreted

I can take the radio button selction and generate a string from it easily but I need to be able to set the radio button in case the same SubVI is called again so the previous set of parameters are displayed to the user. I figured bringing in the string that set the mode on the piece of equipment could be the driver to set the radio button.

 

I thought "Bringing in string to set" meant he/she wanted to change something in the control. Could be boolean text, could be a caption for the boolean, e.g, ON/OFF still applies but instead of "Light" it says "Table Saw." Maybe he/she is in a workshop that has lights, table saws, etc, that need to be on and off. Smiley LOL

 

mcduff

0 Kudos
Message 8 of 9
(2,380 Views)

Yes, it is not clear at all. Either:

 

  1. A radiobutton control with fixed entries, potentially setting a new value (selection) via a local variable as needed.
  2. A radiobutton control with fixed entries, where the boolean text can be changed by the code as needed.

We need a much more detailed description of the problem. In the attach code, the "value" is changed, thus I was guessing "1". 😄

0 Kudos
Message 9 of 9
(2,373 Views)