LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image property node error

I'm trying to pass a reference to an image to a subVI, but I'm having trouble with types.  My end goal is to be able to watch a series of images that cycle through the subvi without opening the subvi.

I've attached a LV file with a very simple example of this type error; you may need the vision tools installed to use the file.  In the attached file, I've created an image, and a reference to that image.  I use a property node to read off the value of that image reference.  However, "value" is apparently not the image itself; it is a hexadecimal.  I found a way to link a reference number to an image (through a property node) but I don't know how to create a reference of this type in the vi that is calling this subvi.

Is it possible to update the image in the front panel in this way?

Thanks!
0 Kudos
Message 1 of 9
(3,467 Views)
Can you please post the code for lv 8.0 or a screen shot of your block diagram?
0 Kudos
Message 2 of 9
(3,446 Views)
Here is the block diagram for the VI I posted yesterday.
0 Kudos
Message 3 of 9
(3,435 Views)
I think the difference has to due with some of the references being strict. I know what that means for VI references (strict references have the connector panel's types as part of their typedef). But I don't know what it means for imaq references. If you right click on the green reference and turn off include data type, it'll return variants like the blue references but the type seem to be even more different.

You can try the below code for a possible work around for the problem, which uses the "Variant to Data" node.


Another thing to keep in mind is that IMAQ images are references (unlike most labview types) so multiple wires can reference the same image. This might be also useful for a work around.



Message Edited by Matt W on 07-29-2008 08:00 PM
Message 4 of 9
(3,417 Views)
Nice and simple solution matt.I was stuck with conversion of values using reference
0 Kudos
Message 5 of 9
(3,406 Views)
Thanks to Matt W for suggesting two solutions!

As for the second suggestion, I tried passing the image (purple image wire) into the subvi and it ran just fine, but it never updated the image in the calling vi.  If there is some way to tweak this to make it work, then this is probably the most elegant solution.

I tried the first suggestion, but I'm getting a compile error now, which is completely new for me!  I'm attaching a pared down piece of my code that shows the compile error.

"Compile error.  Report this problem to National Instruments Tech Support.
Control not in owning dco, ddo=0xB32544C"

Is it time to give up on references and use globals?  I'm tempted to give up on subvis entirely and just combine everything into one huge vi!
Download All
0 Kudos
Message 6 of 9
(3,385 Views)

Hi Vive,

did you try this?

Hope it helps.
Mike



Message Edited by MikeS81 on 07-31-2008 06:57 AM
0 Kudos
Message 7 of 9
(3,371 Views)
Thank you... but I'm still getting a compile error when I try to pass the reference in!


Download All
0 Kudos
Message 8 of 9
(3,351 Views)
Hello Vive,

The attached workaround should work. Replace the the 'Control Refnum' control with a 'Generic Refnum' control. This can be done by right-clicking on this control and selecting 'Select VI Server Class' >> Generic >> Generic. I hope this helps.


Vivek Nath
National Instruments
Applications Engineer
Machine Vision
Download All
Message 9 of 9
(3,308 Views)