09-09-2005 03:32 PM
What
is the best method for creating and using a subVi that was created specifically
for displaying results?
I created a subVi for displaying stress (tension & compression). I started
with a Numeric Control/Vertical Pointer Slider which I changed to a Numeric
Indicator. I added 2 LEDs for out of bounds indicators (+ and -). I used the
Property Node for the Slider to permit setting the minimum and maximum values
for the scales. The subVi has only two inputs; the min/max scale value and the
data to be displayed. I added a Decoration in the form of a graduated color
scale to match that used in PTC's Pro/E.
When I use the subVi each instant in the Block Diagram uses the same Front
Panel. This makes the Slider or Needle flicker.
What I'd really like is for my subVi to work and act like the original Vertical
Pointer Slider and appear directly on the main Vi.
I know I can create multiple copies of the subVi's file in the folder on the
disk but that makes maintenance a pain because each change will require the duplication
once again. This will still create multiple Front Panels to display the data.
I need a solution that will work with the data for about 20 strain gauges
displayed on the screen at the same time.
Copying and pasting the Block Diagram for my stress subVi into the main VI will work but will also create a wiring nightmare
How do create this type of display.
09-09-2005 05:59 PM
09-09-2005 08:00 PM
Hi JoeSz,
Would you like all the sliders/limits on a single panel, like so(?):
09-10-2005 07:19 AM - edited 09-10-2005 07:19 AM
One thing is to be sure to provide some way (label, window title, etc...) for the user to keep track of what data is in each window. If you need more help, I can put together a simple example. Let me know...
Mike...
Message Edited by mikeporter on 09-10-2005 08:26 AM
09-12-2005 06:28 PM
09-12-2005 07:10 PM
09-12-2005 08:29 PM
Hi JoeSz,
I think you're doing GREAT, for only having used LabVIEW for 1+ weeks. Have you programmed in any other language?
See attached Slider2.vi - perhaps it's closer to what you need(?)
Note, all the slider controls are inside a cluster, and they're processed as an array. You don't have to do it this way. The alarm limits are also housed in an array. While the VI changes one of the "Thermometer"'s scale via its property node, the other Thermometer scales are changed through a reference to the control - which eliminates the need for 8 seperate property nodes on the diagram. However, you should use the seperate-property-nodes method. The reference method makes a lot of assumptions about the individual clusters and their contents.
Did you plan to use multiple pictures for your multiple DUTs?
Cheers
09-12-2005 09:09 PM
P.S.!!!
If, as it seems, you will have multiple - identical - clusters ( grouping the slider control & two alarm LEDs ) then consider making that cluster a "type-def". Otherwise, you may find yourself devoting a lot of time to the formatting & cutomization of (20?) individual cluster controls. Oh yeah, you mentioned "Arrows" to identify the strain gauge selected/applicable? This is certainly doable, but I'm GUI-challenged. Try posting it as a seperate question (like "how can I make 'arrows' - pointing to controls - appear/dissappear on the Front Panel?".
Cheers
10-05-2005 06:17 PM - edited 10-05-2005 06:17 PM
Dynamik,
Thanks for "Slider2.vi" it was quite
informative! It's taken me a while to get back to working on my VI.
I tried to create a modified version of "slider2.vi" so I
would understand what you had done (I still don't understand everything) as
well as creating the vi I needed for my testing. I succeeded except for being
able to display the information on the front panel. For some reason I create a
cluster with 20 clusters within it each of them containing a slider (with a
multi-colored scale) and hi/lo out of bounds indicators. I used "Cluster
to Array" so I could use "Bundle by Name" within a "For
Loop" to set the values. The problem comes when I attempt to take the
array information and apply "Array to Cluster." The resulting cluster
only has 9 elements. What happened to the other 11 elements? The
"Help" has not been very helpful. With the broken wire deleted, I've
inserted an indicator for the "For Loop" index and a "Wait"
to slow down the loop so I can follow the values. The index goes from 0 to 19
as expected.
I'm at a loss as to how to proceed. I've attached my
"Test-problem.vi" to this message. Is there something fundamental
I've missed? Where is the problem?
Thanks
To answer your question: I've been programming for 25+ years, Everything
from assembly language, to procedural languages (FORTRAN, PL/I, PASCAL,
C), to object oriented languages (Java), to scripting languages (C
Shell, Perl).
Message Edited by JoeSz on 10-05-2005 06:17 PM
10-05-2005 07:20 PM