LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating dynamic subpanel

Hi all,

I would like to create a probe that will take in a cluster that consists of a path to a vi and some flattened data.  The vi pointed to is going to be loaded in to a subpanel on the probe, and knows how to unflatten the data (which is passed to it by the probe) to display it in a more useful way.  Well that is the idea, but I am having trouble trying to realise this goal.  I'm using LabVIEW 7.0.

Does anybody have any idea how I could implement this idea?

Thanks,


Adrian
0 Kudos
Message 1 of 4
(3,894 Views)
Seems like a reasonable thing to do. What exactly are you having trouble with? Creating custom probes, or subpanels, or interpreting flattened data?
0 Kudos
Message 2 of 4
(3,888 Views)
It is more like confusion as how LabVIEW works.

If I understand LV correctly I would do the following:
  1. place a sub panel down on the FP
  2. open up the reference to the VI
  3. Pass the flattened string to the FP of the VI
  4. Run the VI
  5. Attach the VI to the panel
  6. Close the VI??
Well, the things that confuse me are:
  1. If I close the VI, the FP should disapear from the sub panel
  2. Would the VI require that I make it reentrent?
I'm trying to think this through before I tackel this problem.  Any thoughts about my concerns?


Adrian
0 Kudos
Message 3 of 4
(3,883 Views)
You seem to be mixing and mashing multiple concepts, so that's probably why you're confused.

Subpanels are a way of embedding the front panel of a VI inside the front panel of another subVI. Basically, you create a reference to a VI and pass that reference to the "Insert VI" method of the subpanel. When you're done you use "Remove VI" to remove the VI from the subpanel. Examples ship with LabVIEW to show you how to use them (Help->Find Examples).

The flattened data business is a way of setting the values of controls of a VI that you intend to call dynamically. The subpanel calls a VI dynamically. You can set the values of the controls for the subVI before the executing the "Insert VI" node of the subpanel in case the subVI has some inputs that you want to set. One of the examples for subpanels that ships with LabVIEW shows this, but the example uses the control reference's "Value" property. This is similar to the flattened data.

You started out by saying you wanted a custom probe. That's fine, as a custom probe can be a VI. Simply right-click on a wire, and select Custom Probe. Walk though the questions and specify you want a VI. LabVIEW will create a simple VI with an input control that is of the same datatype as the wire you had selected. You can do anything you want in the VI that gets created. If you want a subpanel, go for it.

Most of this stuff is actually in the LabVIEW documentation and looking at the shipping examples can help tremendously. If you provide more specific details about what you're trying to accomplish, a more specific answer can be provided.
0 Kudos
Message 4 of 4
(3,864 Views)