05-29-2012 09:18 AM
You can use property nodes to get the labels of all of your data scructures and they can be written to the stings of a ring control.
The ring can then be replaced with a an enum.
Save the enum as a type def.
WIre it to the case and then do as suggested above to "add case for all values".
Ben
05-29-2012 09:23 AM
Hi Ben, but I only want to have say 200 cases named "0..199" without having to add next case manually? That is if what I am doing is programatically correct to link 200 references from the top level down to a subvi.
05-29-2012 09:37 AM
Here is an example of how you can start the process of using property nodes. You need to dig down into the tabs and clusters until you get to the elementary controls with the data.
What Ben is suggesting will allow you to have meaningful names on the case selectors rather than 0..199 without having to type them all in.
Lynn
05-29-2012 09:56 AM
Hi Lynn, i think we are on different tracks albeit your suggestion will come in handy. It has also go me thinking that i perhaps dont need to bundle all my cluster references up in order to feed the 1 cluster line from the top level into my subvi but perhaps do as you have done with the front panel reference ctl? Would this work in terms of then indexing the particular set of results or controlling which tab page was visible during my report geneartion subvi?
05-29-2012 10:47 AM
Yes, you can use property nodes and control references to manipulate the appearance of the panel.
This can be slow and may be confusing to the user if the panel changes just as the user clicks on a control for a different purpose. Plan carefully.
Lynn
05-29-2012 10:59 AM
@Grant_C wrote:
Hi Ben, but I only want to have say 200 cases named "0..199" without having to add next case manually? That is if what I am doing is programatically correct to link 200 references from the top level down to a subvi.
To me it sounds like you are going about things the wrong way. First, if you have 200 controls on your front panel something is very wrong with your application and the UI would be virtually unusable since no one will be able to keep track of the clutter you present. If you are using controls on the front panel as some type of variable storage, again you are going about things the wrong way. In LabVIEW you can think of the wire as the variable. (It is a bit more complex than that). If you are passing large number of references to subVIs you are again going about things in the wrong way. Unless the subVIs are written specifically and only for the purpose of controlling the UI than a subVI should have no knowledge of the UI. Your application should be separated to have code to control the UI and that is the sole purpose of it. Then you would have code that does the processing. Use queues, user events or notifiers to pass data from the processing code to the UI when updates are required.
As others have said it would help if you tried to better explain what you are trying to accomplish.
05-30-2012 01:11 AM
Hi Mark, just to clarify, i have 200 clusters that include controls/indicators/tab pages.
05-30-2012 01:14 AM
@ johnsold, Hi Lynn, my report generation vi will execute after all the tests have completed. It is basically a subvi that will create a MS Excel report and MS Word report. The user will have no input at this point.
05-30-2012 01:52 AM
Mark_Yedinak wrote: If you are passing large number of references to subVIs you are again going about things in the wrong way. Unless the subVIs are written specifically and only for the purpose of controlling the UI than a subVI should have no knowledge of the UI. Your application should be separated to have code to control the UI and that is the sole purpose of it. Then you would have code that does the processing. Use queues, user events or notifiers to pass data from the processing code to the UI when updates are required.
Hi Mark, yes, I am trying to feed a cluster of 200 references down into my report generation subvi. In a previous post, I included a vi with my front panel and the BD shows the various types of data that I am referencing. The front panel clusters of results is populated in a flat sequence of test with minimal user interaction. Once the test is finished (all clusters populated), I then want to use these results for report generation. The reason I include the tab page reference is that some of the tables/indicators are not suitable for my report so I simply manipulate the particular tab page which is visible and take a screenshot and programatically add this to my report instead. All other results, I simply use property node to index the appropriate reference line to gain access to the results.
During my test sequence, I have all clusters of indicators/tables etc on the top level and use a single reference line down into my subvi's where I simply use a property node(value) to populate my top level. I achieve this single line by bundling up the references into a single cluster of references. Can you please offer advice if you think is a good method or not.
Regards,
05-30-2012 03:36 AM
@Ben. Hi Ben, i believe what i am trying to do with my 200 references of clusters is similar to a thread you were involved in some time ago: here. Can you shed any light on the Xcontrol your rookie developed?
Regards,