LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Could I change IMAQ image display property in subvi?

Hi,

I have a IMAQ image display on FP, and I change its properties by property nodes. The code works fine.

Now I select those code and want to create a subvi, and it refuses to do it.


Why?  Smiley Sad    Thanks for any help.

Anne
0 Kudos
Message 1 of 5
(3,235 Views)
Hi Anne.

It might be a LabVIEW bug. I see the same (as you say) in LV8.5.1 and NI Vision 8.5.0: Selecting an Image Display Control's Property Node on the block diagram and using Edit>>Create SubVI results in no action by LabVIEW.

Doing the same in LV8.2.1 results in a (broken) SubVI with a Control RefNum for which LabVIEW reports the error "Control requires an external library" ...
Maybe you can circumvent this by creating a SubVI that takes a Control RefNum as a parameter and use "To More Specific Class" to typecast it to an ImageControl. Now you can wire Property Nodes as expected.

Can anyone put some light on this?
Regards, Guenter
Message 2 of 5
(3,220 Views)
Hi Guenter,

I got a way around it, convert the image reference to variant, and in subvi convert it back to image reference. 

It works. Smiley Happy

Anne
Message 3 of 5
(3,214 Views)
Sorry for this post!


Message Edited by Guenter Mueller on 05-01-2008 01:44 AM
0 Kudos
Message 4 of 5
(3,212 Views)

I've found another, perhaps more straight on, work-around to this annoying bug. Instead of converting the image display reference to a variant, a generic control reference can be used as input to the sub-VI and then converting it to a specific image control reference with "To More Specific Class" with an image control reference constant. This constant you can create by first dropping a dummy image display on the front panel, creating a reference to the image display and then creating a constant to this reference. Then you can delete the front panel image.

 

Doing this, you can connect the image display reference direct to the sub-VI.

0 Kudos
Message 5 of 5
(2,850 Views)