02-24-2010 11:49 AM
Hi,
I am still becoming used to LV 8.6. I tried searching the forums for a resolution to this issue, but couldn't find one. One of my projects involves editing a VI which was made and configured to measure motor currents from several motors in one of our instruments. We are interested in several motors within the instrument and also in key steps of the sequence of operations: loading a sample, discarding a sample, etc. Furthermore, we are interested in creating different versions of this VI for our various departments (R&D, Mfg, etc.) with options and controls appropriate for each dept. I was tasked with simplifying the current VI and adding some of the newer items (selection for dept.). However........ I think I have actually made the VI more complicated and cluttered! :smileysurprised:
Previously, there were about 20 instances of the same code for the display of the waveform and key value indicators for each sample in the block diagram. I corrected the case structure such that now there are about 20 cases and the space taken up by that structure is the same as one individual chunk of that code, rather than 20 times it - so the diagram is a lot less cluttered.
02-24-2010 11:49 AM
Part 2 of my first post:
However... I made a main case structure to select the department (R&D, Mfg, Service, etc) and another case structure within that to select what motor we were interested in........ Then something shocking hit me as I was editing the second case structure: When I duplicated the code from the first structure to edit in the second one, basically everything duplicated on the front panel! In other words, it became humongous! So then it occurred to me if there was a way to control which graphs and other front panel features are displayed depending on which case is selected...... Is there such a way?
What I am asking is this: Say I want to measure/display data from Motors A and B; but the code and functions for A and B are different enough to warrant them having a separate case..... As it stands now, everything from the diagrams for A and B displays on the front panel........... That is, about 40 graphs, etc........ Is there a way to change it such that when i select case A, only the controls and graphs for case A will be displayed?
I know that LV 2009 has a tabbed feature and that seems like it would be an answer to my dilemma..... I would make a bunch of tabbed pages on the front panel with each one corresponding to a particular case... I haven't been able to figure out how to get the tab control to work properly....
Please lend me some advice LV experts!
Thanks
02-24-2010 03:45 PM
Hi all,
Nevermind my previous questions. I searched the forums a little more and found a way to do what I intended using a property node and linking it to the waveform graphs. The selecting "visible" as the property that gets controlled.
Works like a charm now!
02-24-2010 05:46 PM
Actually, it isn't quite going as well as I planned..... I can only make a few controls or indicators on the front panel hide at a time using a property node. Is there an easier way to make it such that multiple front panel objects (lots of graphs, controls, etc) can be hidden or un-hidden based on what case is executed?
I think one approach might be to make certain cases and segments of the block diagram into a subVI and then use a property node to make its front panel visible (correct me if I am wrong, but the default for a subVI is to not display its front panel items on the front panel of the primary VI?).......
I would appreciate the advice from some LabView power users!
Thanks
02-25-2010 01:28 AM
Here is a vi which will allow you to hide/show the required control/indicators based on the input names given.
Guru
02-25-2010 07:46 AM
Guruthilak,
thanks for the very helpful reply and vi example. I will adapt it to my needs and let you know when I get it working for my needs! I will give you a kudos! 🙂
02-25-2010 08:03 AM
You also may want to investigate using sub-Panels. It takes some work to get them going the first time but they offer mega-flexibility. here are two handy examples.
Ben