LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

show graph that is created in a subvi

Solved!
Go to solution

Here are pdf prints of my code. The VI file calls a sub VI on the right and attempts to retrieve data which can be graphed.  The Sub VI shows how I'm attempting to dump data retrieved from an oscilloscope into an array of doubles, which I then hope to be able to access and graph from a Higher level VI.

 

My problem Is I have a book that tells me how to deliver info into a sub VI, but not retrieve output data.

Thanks - Matt

0 Kudos
Message 11 of 33
(2,578 Views)

Yes, there is data shown in the array when I run the Sub VI independently.

-Matt

0 Kudos
Message 12 of 33
(2,577 Views)

Hi Matt,

 

You may want to check out this Developer Zone article on SubVIs.

 

Developer Zone Tutorial: SubVIs

http://zone.ni.com/devzone/cda/tut/p/id/7593

 

Specifically, you may want to read the section on Assigning Terminals to Controls and Indicators.  Thanks!

 

Message Edited by StarsHockey on 02-05-2009 01:00 PM
Stephen Meserve
National Instruments
0 Kudos
Message 13 of 33
(2,554 Views)

Thanks Steven, I've looked at this document before.

 

If I understand correctly, in order to take data from a sub VI and use it in a VI I must create some form of indicator in the sub VI. In my case my indicator is an array of numeric indicators and cannot be a waveform.  I then wire/connect that indicator to a terminal of my Sub VI. 

 

From there I can have my VI call the Sub VI and attach a waveform up to the output terminal (linked to the array) of my sub VI.

 

Am I missing something? It seems this should work unless theres some specific trick to using data held in an array with a waveform graph.

Thanks

-Matt

0 Kudos
Message 14 of 33
(2,535 Views)

Hi Matt,

 

I think you've got a good grasp of it!

Stephen Meserve
National Instruments
0 Kudos
Message 15 of 33
(2,531 Views)

Great... but what does it take to obtain data from my sub VI.  I've also tried outputting to an array in my VI instead of a waveform using the data from my sub VI. This produced no data in my array.

 

Thanks - Matt

0 Kudos
Message 16 of 33
(2,520 Views)

Hi Matt,

 

I've attached a simple example of building a subVI passing arrays.

Stephen Meserve
National Instruments
0 Kudos
Message 17 of 33
(2,506 Views)

Hi, I think I'm getting close to doing what I want to do. 

 

> 6) Next, I created a VI server reference by selecting "Programming" "application control" "VI server reference".  Right clicked on the "Server Reference" and choose "Link to" "Pane" "Waveform plot"

 

 

I'm using LabVIEW 7.0, and it appears that there is no such thing as a "VI server reference" (unless it's hidden in a place other than the one mentioned above). What can I do in this case?

 

I'd really appreciate any help. 

 

Regards,

 

Hong

0 Kudos
Message 18 of 33
(2,109 Views)

Hi Matt,

 

When you wire the array to an output terminal on a subVI without wiring it to a waveform indicator, does the main VI run? Are you able to attach any kind of indicator to the output array other than the waveform?

 

- Regards,

Beutlich
0 Kudos
Message 19 of 33
(2,076 Views)

It could be a problem with either the terminal connection passing data or the waveform graph. You might try debugging steps like attaching other kinds of indicators to the subVI and attaching constants to the waveform.

 

- Regards,

Beutlich
0 Kudos
Message 20 of 33
(2,059 Views)