11-02-2009 02:01 PM
Solved! Go to Solution.
11-02-2009 02:30 PM - edited 11-02-2009 02:32 PM
Hi oyester,
I know of no work-around that can help you. The only thing I can recomend is to stop using controls/indicators that are not intended for user consumption.
Sorry,
Ben
PS: Most LV apps do not need extra controls and indictors to work properly. If you want to know more about other methods say so.
11-02-2009 03:02 PM
As for the indictors, why not remove them all and when you debug just probe the wires in the block diagram to determine the values in them?
11-02-2009 03:17 PM - edited 11-02-2009 03:19 PM
I dont know if this is what you need, but you can dynamically change the visibility of a control/indicator. It is not good practice to have your controls and indicators disappear and reappear while your program is running (your VI is not a magic show) but I think it is probably what you are looking for.
Right mouse click on a control or indicator. Go to create>property node > visible. Once placed on the block diagram, you right click on the property node and hit 'change to write'. If you write a constant false to this it your control will disappear. You would do this for each of the controls/indicators you are trying to hide then group them together on the block diagram and write the same constant to all of them.
I do this sometimes for debugging because disable diagraming a control or indicator doesnt hide it. I use this during development and then clean all this up before 'release'.
As Ben said, this isnt exactly awesome programming practice, but i have found it to be kind of useful.
11-02-2009 03:38 PM
Hi oyester,
I have at times encountered the need to provide an advanced user mode where more features are available and in another case I had two entirely different front panels for the same vi.
Here is how I did this:
1) Create two decorations of different colors (for example a raised frame). These define the two areas you want visible
2) When the vi starts - search through the decorations to get a reference to each of the decorations based on color.
3) To change views, set the front panel coordinates to the desired decoration
There is an openG function that sets the front panel to the largest decoration. I used the methods I learned from that function to make one that takes a decoration reference input and sets the front panel to that area.
Once you set this up you can resize the decorations without any programming changes (set it and forget it, lol).
If you want more details, let me know.
steve
11-02-2009 04:45 PM
Your situation is a symptom of a bad practice; controls and indicators are not "variables" - wires are variables. Controls are for users to enter data and indicators are for users to view data. It may be easier for you, in the short run, to work this way but your software won't be readily readable/maintainable/extendable.
11-03-2009 11:08 AM
Your situation is a symptom of a bad practice; controls and indicators are not "variables" - wires are variables. Controls are for users to enter data and indicators are for users to view data.
Please explain to me how to communicate to a subVI without using controls and indicators.
Are you saying that I can't pass an array to a subVI. I have to make the user type it in? You're telling me that I have to show that control to the user when what he really want to see is a plot?
11-03-2009 11:14 AM
Controls and indicators can be used in many ways, some good some not so good.
Allowing user input
Displaying a value (or data set like a graph)
passing avlue to a sub-VI
Getting areturned value for a sub-VI.
Those are all concidered good,proper, appropriate etc.
It sounded (from your original post) as if the controls and indicators you are asking about do not fall into those catagories.
If I (we) read that wrong, please clarify.
Just trying to help,
Ben
11-03-2009 11:18 AM
11-03-2009 11:30 AM
As for the indictors, why not remove them all and when you debug just probe the wires in the block diagram to determine the values in them?
The indicators are not there for debugging, they get passed on to other subVIs.