LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

alternative to this

Solved!
Go to solution

hi all

 

i need your help....

 

please look at my VI attched. what i have done is that i have bunch of options and when user press any of those options it is compared with an existing array constant and then executes the specific program whcih would be in its respective case structure. 

now i know that this is very basic programing approach and when my options will increas it would be very difficult to handle the second case structure .

At the end what i want to do is that i would be getting data from the serial port which will get compared by the array constant and then the specific case structure will execute.

 

So my question is that is there any other way to implement this ... a rather more professional approach ?

 

regards 

Regards
0 Kudos
Message 1 of 26
(4,069 Views)
It is easy! Just add any cases to Case Structure as shown in attachment. :smileyhappy:
0 Kudos
Message 2 of 26
(4,060 Views)
Sorry, a have made an error...
0 Kudos
Message 3 of 26
(4,051 Views)
I think You mean this...
0 Kudos
Message 4 of 26
(4,049 Views)
And if You want to uses events it is a good idea to handle "On Value Change" in this case...
0 Kudos
Message 5 of 26
(4,047 Views)

hi kolan

 

thanks for the help but this is not what i need ......what i need help with is that the compare function ..........okay to make things more clear  

i will put my question like this how can i compare things more efficently ... like in my case i have use an constant array and i m getting the data to compare with, from the radio buttons... so any other way to do the compare thing more effectively ?

 

Regards
0 Kudos
Message 6 of 26
(4,036 Views)
CAn you also post a screen shot?
0 Kudos
Message 7 of 26
(4,031 Views)

How about this example? (look at the atachment)

Program choose an event by radio-button's label.

Download All
0 Kudos
Message 8 of 26
(4,022 Views)

From what i understand your program generates the string "Program2" when you select the radiobutton "Case2".

A simpler solution would be the following:

 

radio text.PNG

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 26
(3,991 Views)
I think, muks wants to see map<string,string> C++ analog to make association case#->program# but not a standard massive index number#->program reflection...
0 Kudos
Message 10 of 26
(3,981 Views)