From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer the image processing steps from subVI to its Main VI front panel image control?

Hello Folks,
 
I am working on an Image Processing application using LabView 8.0 and this is my first attempt to write big program. I had written a SubVI to process the images and can see each process step (i.e. gray, binary) on its front panel, when I ran it independenly. Now I am trying to use this SubVI into main application, but not been able to see any thing on the MainVI front panel image ctl. Can anyone suggest, how I can do this. Thanks in advance.
 
Manu
0 Kudos
Message 1 of 20
(4,118 Views)
Hi Manu,

More info would be helpful. Perhaps attach your vi's in question or a least of pic.

That being said if I understand the situation you could make references to your front panel controls that you want to update and pass these refs down to your sub vi.  Then you should then write new values to these refs in your sub vi and this will update the higher level vi.

Hope this helps.

--Russ
0 Kudos
Message 2 of 20
(4,107 Views)

Hello Russ,

Thanks for your reply. I will try to express better this time.

MainVI :  Main App1.vi

SubVI :  Dome Curvature.vi

Refer the enclosed pic file (jpg), which shows the subVI in foreground and MainVI in background. The subVI is doing all the image processing and with every step (i.e. cases in block diagram) and displays the output on its front panel. I am using the pallet property node in every case to reflect the changes to image on its front panel image indicator. The subVI is working fine.

Now the MainVI is the top level vi. The same subVI is used inside the MainVI to perform image processing on certain images. The MainVi is running OK with no errors and also the subVI is passing all the calculations results into the indicators on the MainVI front panel except image. The only image I can see is based on pallet property selection (i.e. gray, binary etc.) on front panel of MainVI. I cannot see the intermediate image steps. 

What I would like to see are the same steps of image processing of SubVI on the MainVI front panel image indicatior. Kindly suggest. Thanks.

Manu

0 Kudos
Message 3 of 20
(4,100 Views)
Manu,

The sub-VI is designed to pass the information back to the main level VI only after its completion.  However, there is a way to circumvent this,and Russ eluded to it.  Along with passing the image data back to the main level VI through the image indicator, pass a reference from the main level VI image control into the sub-VI.  Then, place a property node in each step of the sub-VI that takes that reference as the refnum input.  Populate each property node with the image data during each step.  You should then see the image control on the main level VI update with each update in the sub-VI!

I hope that my explanation was clear and makes sense!  If not, please post back, and I will try to clarify!

Respectfully,
Message 4 of 20
(4,081 Views)
Hello Jeffrey,
 
Thanks for reply. I never used the reference control. So any example will be of a good help. Thanks.
 
Manu
0 Kudos
Message 5 of 20
(4,067 Views)
Hi Manu,

If you search the NI Example Finder in Labview (under the Help menu) for references one example that comes up is the "Property Nodes.vi" . In that example a reference to a waveform graph is passed down to a sub vi and many properties of the top level graph control are changed in the sub vi.

Cheers,

--Russ
0 Kudos
Message 6 of 20
(4,063 Views)

Hello Russ,

Thanks for your reply. I had seen the example and tried to implement but with little sucess.

I created the image control ref in MainVI and connect to SubVI icon (after modification to the connectors of SubVI).

I created the ctl refnum in SubVI on its front panel and tried to create the property node (i.e. from application pallet that has refnum input). Now which property I should attach and also How should I select that property in newly created property node. This is where I am stuck. Your help will be greatly appreciated. Thanks. The SubVI .jpg is enclosed.

Manu

 

0 Kudos
Message 7 of 20
(4,048 Views)
Manu,

You should select the Value property and simply wire in the image data (purple wire).  You will probably need to right-click the property node and select "Change to Write".

Regards,
Message 8 of 20
(4,041 Views)

Hello Jeffery,

Thanks for your reply. On weekend, I tried most of the options, but "value" property  and others doesn't work with IMAQ images. Yes, it works well with graphs.

Manu

0 Kudos
Message 9 of 20
(4,025 Views)

Hello Jaffery/Russ,

Still looking for some ways to solve image data transfer problem. Any help will be greatly apprecited.

Manu

0 Kudos
Message 10 of 20
(4,018 Views)