LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Ring and Enum Controls...

Hi...

I would like to use a ring (menu) control which let me the option to select strings. Each string which (probably) connected to a case statement which contained specific data to be used for calculation.

At the same time, the user could also be able to key in NEW string and NEW data. The NEW string and new data are updated and are positioned accordingly on the ring control and the case statement. I would like this option available if the user wish to conduct a NEW test.

Example: Ring Control
1. Menu 0
2. Menu 1
3. Menu 2 (new string key in by user)

Case Statement..
1. 0 - Default
2. 1 - Menu 1
3. 2 - Menu 2 (make a new case statement for the new data)

And finally, how can I make the data (in the case statement
) available to be used in other.vis? Store to array in Global Variable.VI ? Or perhaps store to a file.txt which can let me read and write to it?

Thanks for reading...please help if you can.

Thanks,
jnui76
0 Kudos
Message 1 of 11
(3,829 Views)
While it's fairly simple to have the ability for a user to add new strings to a menu box, you can't create new cases programatically, nor can you add new code to a case statement. What exactly do you need to do inside the case statement? If you want to do some analysis, maybe you can use the evaluate formula node and save the formula.
0 Kudos
Message 2 of 11
(3,829 Views)
May I suggest that a Listbox to be used instead of Ring control. You may be able to use its property node "ItemNames" , "Value" & "Dlb-Click" for all you need to do. Upate the listbox with "LIST" filenames under file I/O

Yes, writing each menu data to a file is a prefered way (at least for me :)). Later, user would be able to load/ read data of the selected item (from the list box)by double-click on the item.


Try this out on your own first.
IFF still having problem, drop me a note at
spokesman@ianfung.net

Have fun and all the best
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 3 of 11
(3,829 Views)
Alright, here is the sample program.
Do necessary changes to suit your need.

ian.f k
spokesman@ianfung.net
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 11
(3,829 Views)
Hi Dennis,

Hmm... it is unfortunately I can't make use of the case statement.

For your information, I would like to conduct a pump test. Ideally when performing a test, the user select the string data (or keyed in string data for new type of test). The selected string data will refer to the 2 sets of numeric data in the case statement (initially in my opinion). Example, inlet and outlet of the pump diameter.

These 2 numeric data will be in "standby" mode in the program. Somewhere when conducting a test, the user wants to view the Graph performance of the pump. Once clicked, the 2 numeric data will then be used in for calculation and conversion from mV to bar so that it can be plotted onto the graph.

Well, that is what I intend to do. Any ideas o
r suggestions?

Thanks,
juni76
0 Kudos
Message 5 of 11
(3,829 Views)
Hi Ian,

thanks for contributing your example.
I will try to understand and modified if I can get around it.

But please do read on my comment on Dennis statement.
I hope that what I intend to do will give you some suggestion to me later.

Thanks again,
juni76
0 Kudos
Message 6 of 11
(3,829 Views)
Hi Ian,

I have look into your codes. I was wondering which part of the listbox codes will let me initially keyed in pre-fixed sets of data and displayed on the listbox?

Once it is running, user has the option to select that pre-fix datas to be used or key-in a new one?

And, can I remove the the "Queue".vis without disrupting your current program?


Looking forward to ur reply,
juni76
0 Kudos
Message 7 of 11
(3,829 Views)
1. Pre-fixed sets of data
~ Wire an string array constant of "data" to the "ItemNames" property (extreme upper-left outside loop, see: List filename here)

2. To select, simply click the item in the listbox
To key-in new name, Double-click on the item
To add new item, click "Add"

3. Yes, you may remove the Queue BUT you will then have to put each function into separate case, which will in turn making your vi a mess.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 8 of 11
(3,829 Views)
Hello Ian,

Is it possible for you to look at my codes please? I am stuck with my Menu Ring option (which I would like to do).

I have attached here my.vi for you to look at...if you would like to help me out.

Thanks,
juni
Download All
0 Kudos
Message 9 of 11
(3,829 Views)
hi, sorry for the late reply as I am on sick leave now.

Now, I have had your vi modified as attached.
However, my opinion is that you should

1. Save each New ECS data with its Type-Test as filename to a fix location

2. Load the file with the Ring Menu's [String] property (index the selected ring menu string as filename)

3. You may just forget about using the array for keeping your data.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 10 of 11
(3,829 Views)