LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data to subpanel

I have an architecture question for the labview 8.2 community...

I have two indicators that I'll be passing data to and I would like to create a single picture (png, jpg, ect) of both indicators. The key aspects is that the data to these indicators will be changing and it's not until the end user clicks "snap picture" on the front panel when the picture is taken.

I'm leaning towards creating a subpanel on the main vi then passing the data by "call by reference" to a subvi. When the GUI event happens in the event structure a "Get Image" of the subpanel is taken.

I have two questions.
1) I haven't gotten data to update properly in the subvi.  The "Get Image" always snaps a picture of the default vi and without the values.  What's the best way to pass the data in?
2) Is their a better architecture  to use for this goal?  I'm open to other ideas it their is a more efficient and streamlined approach.

Thanks.

0 Kudos
Message 1 of 6
(4,014 Views)
Hi Dallas,

Can you provide a stripped down version of your code to for me to better understand your application.
Can you also put some comment in the vi explaining what you expect and what you are seeing.

Appreciated


Van L
NI Applications Engineer
Message 2 of 6
(3,985 Views)
> I have two questions.
> 1) I haven't gotten data to update properly in the subvi.  The "Get
> Image" always snaps a picture of the default vi and without the
> values.  What's the best way to pass the data in?

The Set Value method should work. Also, if the VI is not looping, you can
simply put it's panel in the sub panel, and call the VI like any ordinairy
VI, using it's connector pane to pass data. That is the best, if it means
"easiest". If best means the most scalable, you'll need a more elaborated
architecture (see 2)).

> 2) Is their a better architecture  to use for this goal?  I'm
open to
> other ideas it their is a more efficient and streamlined approach.
>

Yes. There probably are better architectures. Most of the time I create
seperated user events for each seperate type of info I need to communicate.
I put the user event in a buffer, and each dynamic VI that needs that info,
registers for it's events. Often those VI's are in subpanels, but sometimes
they are VI templates, so I can start multiple instances. Sometimes there
front panels aren't visible at all, for instance DAQ VI's. I don't mean to
say this architecture is the best, but it has been great for all my projects
so far.

Any good architecture will need a lot of effort and experience. Not only
experience with LabVIEW, but also with the kind of projects it is made for.
That is why thee is no "best" or "standard" architecture. A power plant
needs another architecture then a word processing program...

Regards,

Wiebe.


0 Kudos
Message 3 of 6
(3,957 Views)

Do you have an example of you #2 scheme that you can post?

 

-Tim C.

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 4 of 6
(3,816 Views)

"Tim C." <x@no.email> wrote in message
news:1219686008741-766838@exchange.ni.com...
> Do you have an example of you #2 scheme&nbsp;that you can post?&nbsp;-Tim
C.

No, not at hand.

What are you interrested in? The user events, subpanels, dynamic starting of
VI's?

Regards,

Wiebe.


0 Kudos
Message 5 of 6
(3,787 Views)

Oops, I do have some examples...

 

Regards,

 

Wiebe.

Message 6 of 6
(3,783 Views)