LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how come the chart will not automatically morph inside of a SubVI?

If I create a chart on the front panel of a VI and find the node on the block diagram and connect it to a 1-D pixel array the chart automatically morps to accept it (it turns from orange to blue I16). However if I make a chart and put it in a sub-VI inside of the VI, (above VI), I connect the front panel chart to the connector pane, and when I try to wire the same 1-D array of pixel source to the newly made Sub-VI it I get a dashed line and it says, "This wire connects more than one data source". How come the Chart will not morph to accomodate the 1-D array? It is hooked up to the Panel and there is a node on the outside of the sub-VI ready for hookup.

What can I do to solve this?

Brian
0 Kudos
Message 1 of 4
(2,530 Views)
You need to create a polymorphic subVI.

Within LabVIEW, open the help, go to the Index tab, scroll down to: "polymorphic VIs, building".

This should get you started.
0 Kudos
Message 2 of 4
(2,530 Views)
> What can I do to solve this?
>

Charts adapt to the types wired to them. When you create a subVI and
wire it up the way you describe, you aren't wiring to a chart, but to a
subVI, and subVIs do not adapt to type. In otherwords, in your case
there are two diagrams, main and sub. Sub is already wired, and the
chart has already adapted. The subVI states what type must be wired to
it. In main, you wire a new type, and the subVI enforces its type. The
chart in sub never sees the new type.

Greg McKaskle
0 Kudos
Message 3 of 4
(2,530 Views)
Sorry, reading your problem again, it seems to me that you have a much simpler problem.

Open the subVI and right-click on the chart. Select "change to control". Voila!


(You won't get a change in the data type of the chart in the subVI if you change the data type in the caller, but automatic coercion at the subVI boundary should take care of this.)
0 Kudos
Message 4 of 4
(2,530 Views)