LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure selector label

Solved!
Go to solution

Hi people,

 

Is it possible to change the names of case structure selector label programatically like VISA Property Node does 

 

in a control, for example ?

 

I have fixed labels, but in some situations, I want to change the labels of this case structure before the software arrives up 

 

to this case structure.

 

Thank you very much

 

Henrique

0 Kudos
Message 1 of 6
(4,059 Views)

You'd need to look at VI Scripting.  This woud also require the VI to not be running at the time.  You'd need to open it to edit with VI Scripting and change the label.

 

Really, what is it you're trying to do?  This doesn't sound like something "easy" and there's likely a better way to do what you're trying to do.

Message 2 of 6
(4,045 Views)

 

Thank you....I guess I am difficulting the program without need

I will try to do another way 🙂

 

Henrique

0 Kudos
Message 3 of 6
(4,037 Views)
Solution
Accepted by topic author hbierwag

Not sure what you intend, but you could consider a "mapping function" to achieve this flexibility.  Suppose you have a Case Statement with 5 Cases -- let's call them Initialize, Take Sample,

Set Gain, Change Sign, Exit.  Now suppose you have 7 states, State 1, State2, State3, State4, State5, State6, and State7.  Write a function (possibly with controls) called "State to Case" that takes State1 .. State7 as inputs and outputs the appropriate Case Labels, Initialize, Take Sample, etc.  All you need to do it change the mapping function and the States map to whatever your Map tells them to.  If you make the Map function have a Case that controls it, you can have a Case (the Map switcher) do exactly the run-time mapping you describe.

 

[Sorry, I'm rambling here, but I hope you get the idea ...]

 

Bob Schor

Message 4 of 6
(4,012 Views)

Thank you again...to say the truth I love the flexibility of VISA Property node

 

that many times let us spoiled.

 

Henrique Bierwagen

0 Kudos
Message 5 of 6
(4,006 Views)

Hi Henrique,

 

Is it possible to change the names of case structure selector label programatically like VISA Property Node does

In which way does a "VISA Property Node" change any selector labels "programatically"?

In which way is "the flexibility of VISA Property node" related to the case structure selector label?

 

Can you show examples of what you want to achieve?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,965 Views)