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.
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.
04-28-2010 08:40 AM
Vladimir,
I guess I am trying something quite similar (multiple image processing functions selectable from a parent VI, each function with its own front panel of controls). I guess you would wire the image reference (not the image control, but the image itself) to the subVI anyway. Then the subVI manipulates directly the image. The problem is just to get it displayed properly in the parent VI, which is possible with the structure I suggested.
There is only one single dynamic event "controls changed", whose reference is transferred to all subVIs the first time they are being called (and for example stored in a shift register). The structure in the parent VI is thus very simple. All subVIs are based on the same template, and I just fill in the required functionality and controls.
Dirk.
04-28-2010 08:57 AM - edited 04-28-2010 09:04 AM
Maybe you can also try converting the reference to a variant and then in each sub vi you can convert it back to an ImageControl reference. I don't know if this will work any better than downcasting the reference, but maybe it will compile into an exe.
Also, the example I posted works for me every time. I can open and close it multiple times and run as often as I like in both 32-bit and 64-bit LabVIEW 2009 and have never gotten an error.
04-28-2010 09:13 AM
04-28-2010 09:16 AM - edited 04-28-2010 09:24 AM
I loaded these two files (Main.vi and sub.vi) posted earlier in this thread into a project and compiled them into an exe. It seems to run just fine for me and works just like it is supposed to.
I compiled my example into an exe and it worked as well.
09-16-2015 03:40 PM
Almost 9 years later...
Still not working in LV 2013 SP1. Has this been fixed in LV 2015 or does this belong to this general "solution"?
09-17-2015 02:13 PM
Hi X.
Unfortunately, this specific bug hasn't been fixed in LabVIEW 2015, but I have attached a workaround for you here. The main VI contains an Image control. The subVI has a Generic Control Reference Input to which the Image Control Reference is wired. In the subvi a "to more specific class" function is used to get the full properties list for an Imagecontrol. For test purposes I used the Set background color Property. The workaround has been written in LabVIEW 8.2
Best of luck.
Tina
Applications Engineering
National Instruments
09-17-2015 03:05 PM
That's the workaround I am using.
09-17-2015 03:17 PM
Hello again,
Has that workaround been working for you?
Best,
Tina
Applications Engineering
National Instruments
09-17-2015 03:36 PM
Yes. It is my understanding that it won't work in an executable though (I may have read the whole thread a bit superficially)?
09-18-2015 11:09 AM
Hi X,
I too took a cursory look at the forum but it looks like some one was able to compile into an .exe in the post just before yours:
I loaded these two files (Main.vi and sub.vi) posted earlier in this thread into a project and compiled them into an exe. It seems to run just fine for me and works just like it is supposed to.
I compiled my example into an exe and it worked as well.
Regards,
Michael Bilyk
Applications Engineer
National Instruments
866-275-6964
support@ni.com