05-27-2013 08:02 AM
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?
Solved! Go to Solution.
05-27-2013 08:37 AM
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.
05-27-2013 09:43 PM
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.
05-28-2013 12:24 AM
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.
05-28-2013 01:03 AM - edited 05-28-2013 01:04 AM
Hello aricn,
I am not sure if I understand correctly, but see the two attached examples.
Best regards,
K
05-28-2013 01:45 AM
hi Klemen,
what you give me is 2012 while mine is 2011, could you help to save as old version? Thank you.
05-28-2013 01:47 AM
@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):
This is your SubVI, where Image Displays gets updated by reference:
Now Image Display updated in Main.vi from SubVI:
Project (LV2012) in attachment.
Andrey.
05-28-2013 01:52 AM
The project above saved for LV 2010.
05-28-2013 01:52 AM - edited 05-28-2013 01:57 AM
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,
05-28-2013 05:56 AM
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.