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: 

image display reference control still not working

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. 

 

   

0 Kudos
Message 21 of 36
(2,153 Views)

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.

Message Edited by rpursley8 on 04-28-2010 10:04 AM
Randall Pursley
Message 22 of 36
(2,145 Views)

Dirk: That's not my case. I need to manipulate the image control, not just the image.

Randall: That works, actually. Anyway, I'm still a bit reluctant to use such workarounds in the production environment. But maybe I'll give it a try. Thanks


View my profile on LinkedIn
0 Kudos
Message 23 of 36
(2,138 Views)

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.

Message Edited by rpursley8 on 04-28-2010 10:17 AM
Message Edited by rpursley8 on 04-28-2010 10:24 AM
Randall Pursley
0 Kudos
Message 24 of 36
(2,137 Views)

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"?

0 Kudos
Message 25 of 36
(1,314 Views)

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

Tina K.
Applications Engineering
National Instruments
ni.com/support
Download All
Message 26 of 36
(1,282 Views)

That's the workaround I am using.

0 Kudos
Message 27 of 36
(1,274 Views)

Hello again,

 

Has that workaround been working for you?

 

Best,

Tina

Applications Engineering

National Instruments

Tina K.
Applications Engineering
National Instruments
ni.com/support
0 Kudos
Message 28 of 36
(1,271 Views)

Yes. It is my understanding that it won't work in an executable though (I may have read the whole thread a bit superficially)?

0 Kudos
Message 29 of 36
(1,266 Views)

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 

 
Michael Bilyk
Former NI Software Engineer (IT)
0 Kudos
Message 30 of 36
(1,216 Views)