LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update radio control button from subVI

I have a main VI with a radio button control on the front panel. I has the property of No Selection allowed.

 

I am passing a reference of that radio button control to the subVI.

Within that subVI I am trying to update that radio button control's Value (signaling) to No Selection, but LabVIEW is setting an error. If I changed to just Value, I am still getting an error.

 

I am not sure what I am doing wrong.

0 Kudos
Message 1 of 13
(2,832 Views)

What error is it setting and where?!!

0 Kudos
Message 2 of 13
(2,822 Views)

Well, what does the error say???

 

Can you show us some simplified code. There are millions of ways to do it wrong and maybe a dozen ways to do it right, so don't keep us guessing. Without more information, we cannot narrow it down for you.

0 Kudos
Message 3 of 13
(2,818 Views)

"allow no selection"  can only be changed when in edit mode.

 

If you require the ability to switch at run time you will have to use a cluster of Booleans or such and then implement your own mutual-exclusive logic behind the scenes.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 13
(2,790 Views)

@Ben wrote:

"allow no selection"  can only be changed when in edit mode.

 


I think he's talking about a value of "no selection", assuming that the radio control is set to allow it.

 

Do other selections work without error?

 

0 Kudos
Message 5 of 13
(2,781 Views)

@altenbach wrote:

@Ben wrote:

"allow no selection"  can only be changed when in edit mode.

 


I think he's talking about a value of "no selection", assuming that the radio control is set to allow it.

 

Do other selections work without error?

 


If that is the case, then the control of the sub-VI needs to be modified to match the control when it is set for "allow no selection". That can be as easy as ctrl-dragging a copy of the radio control into the ctrl of the sub-VI. 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 13
(2,778 Views)

We clearly need to see the code. It is possible that the subVI was created (e.g. "from selection") before the the "allow no selection" permission of the control was changed, meaning that the reference input has the wrong type. But that would break the reference wire. We really don't know what is meant by "setting an error". Too ambiguous.

0 Kudos
Message 7 of 13
(2,771 Views)

I have used references before, and they have always worked.

I have decided not to deal with this convoluted code that I have inherited.

Updating the main VIs front panel control which in turn causes the subVI to run again.

Argh.

Thanks for all the input.

0 Kudos
Message 8 of 13
(2,765 Views)

njacacia wrote:

I have decided not to deal with this convoluted code that I have inherited.

 


We still would like to know if there is maybe a bug (as it almost seemed from reading the first posts).

0 Kudos
Message 9 of 13
(2,756 Views)

There may have been.

 

In short my approach is to eliminate the need for the references.

 

0 Kudos
Message 10 of 13
(2,736 Views)