Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to update/refresh main panel's image displays inside subvi?

Solved!
Go to solution

Hi everyone,

 

I have a image display control located in my main panel,  and I have a subvi which do some process works inside it.

but what I have done inside the subvi can not be seen in the main panel.

I used image session controls as the input/outpout nodes for subvi.

 

If I use image display control as input node for subvi,

I can see the realtime displays in the subvi's panel,

but this is not waht I wanted.

 

anyone have good idea?

0 Kudos
Message 1 of 11
(5,304 Views)

Use reference to Vision Control. Then you can use Value Property node for ImageControl in your SubVI and Refresh Image method.

 

http://zone.ni.com/reference/en-XX/help/370281P-01/nivisionlvbasics/display_an_image/

 

Andrey.

 

0 Kudos
Message 2 of 11
(5,302 Views)

Thanks Andrey, but maybe i donot present my confuse clearly.

 

The problem is,

if I use a imaq image control inside the subvi as input, what updated only can be seen in the panel of subvi, the imaq image control on the panel of mainvi do not refresh.

if I use the image session control inside subvi as input, there is no display inside subvi, neither updated for image on panel of mainvi.

 

what I want is,

1. image display was located on front panel of mainvi,

2. image process was completed inside subvi,

3. image of mainvi update imediately according to process inside subvi.

 

 

 

0 Kudos
Message 3 of 11
(5,279 Views)

BTW,

 

inside the subvi,  I pass the processed result to the property node vale or vale(signal), even I call the 'refresh display' metheod, neither have the effect.

0 Kudos
Message 4 of 11
(5,270 Views)

Hello aricn,

 

I am not sure if I understand correctly, but see the two attached examples.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Download All
0 Kudos
Message 5 of 11
(5,264 Views)

hi Klemen,

 

what you give me is 2012 while mine is 2011, could you help to save as old version? Thank you.

0 Kudos
Message 6 of 11
(5,253 Views)
Solution
Accepted by topic author aricn

@aricn wrote:

BTW,

 

inside the subvi,  I pass the processed result to the property node vale or vale(signal), even I call the 'refresh display' metheod, neither have the effect.


Strange.

 

For example, this is your main VI (where Image Display is placed):

refr1.png

 

This is your SubVI, where Image Displays gets updated by reference:

 

Refr2.png

 

Now Image Display updated in Main.vi from SubVI:

 

Refr3.png

 

Project (LV2012) in attachment.

 

Andrey.

Message 7 of 11
(5,252 Views)

The project above saved for LV 2010.

 

 

0 Kudos
Message 8 of 11
(5,249 Views)

Reall sorry, i have attached 8.6 version.

 

Also, I think the answer of Andrey_Dmitriev is what you are looking for. I think I understand your problem now. My example updates the image only after subVI is executed.

 

Regards,


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Download All
0 Kudos
Message 9 of 11
(5,248 Views)

Andrey and Klenmen, thanks very much for your great help.

 

Andrey's giving is just what i wanted, from your code i know HOW to do, i arrange the code like your block, and it works fine.

 

But more detailly WHY, i dot know, specially two fuctions, 'to more specific class' and 'to variant',

before i think the Image Out node could be linked directly to image control's 'Value' property node, it should be working, infact it not.

 

I will use this style afterwards.

0 Kudos
Message 10 of 11
(5,231 Views)