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?
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.
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
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?
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?
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.