Discussion:
Image property node error
(too old to reply)
Vive
2008-07-29 05:10:07 UTC
Permalink
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!


Image Property Node error.vi:
http://forums.ni.com/attachments/ni/170/344656/1/Image Property Node error.vi
muks
2008-07-29 14:40:05 UTC
Permalink
Can you please post the code for lv 8.0 or a screen shot of your block diagram?
Vive
2008-07-29 21:10:05 UTC
Permalink
Here is the block diagram for the VI I posted yesterday.


Image Property Node error.png:
http://forums.ni.com/attachments/ni/170/344931/1/Image Property Node error.png
Matt W
2008-07-30 01:10:05 UTC
Permalink
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.<img src="Loading Image..."> 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


Example_VI_BD6.png:
http://forums.ni.com/attachments/ni/170/344960/1/Example_VI_BD6.png
muks
2008-07-30 08:10:05 UTC
Permalink
Nice and simple solution matt.I was stuck with conversion of values using reference
Vive
2008-07-30 23:40:05 UTC
Permalink
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.&nbsp; 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!&nbsp; I'm attaching a pared down piece of my code that shows the compile error."Compile error.&nbsp; 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?&nbsp; I'm tempted to give up on subvis entirely and just combine everything into one huge vi!


Compile error.vi:
http://forums.ni.com/attachments/ni/170/345316/1/Compile error.vi


Labview Compile Error.png:
http://forums.ni.com/attachments/ni/170/345316/2/Labview Compile Error.png
MikeS81
2008-07-31 05:10:05 UTC
Permalink
Hi Vive,
did you try this?
<img src="Loading Image...">
Hope it helps. MikeMessage Edited by MikeS81 on 07-31-2008 06:57 AM


Unbenannt1.PNG:
http://forums.ni.com/attachments/ni/170/345351/1/Unbenannt1.PNG
Vive
2008-07-31 20:40:19 UTC
Permalink
Thank you... but I'm still getting a compile error when I try to pass the reference in!


MikeS's suggestion.vi:
http://forums.ni.com/attachments/ni/170/345683/1/MikeS's suggestion.vi


MikeS's suggestion.png:
http://forums.ni.com/attachments/ni/170/345683/2/MikeS's suggestion.png
Vivek_N
2008-08-08 02:40:05 UTC
Permalink
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' &gt;&gt; Generic &gt;&gt; Generic. I hope this helps.


Mikes suggestion edited.VI:
http://forums.ni.com/attachments/ni/170/347730/1/Mikes suggestion edited.VI


Mikes suggestion edited1.JPG:
http://forums.ni.com/attachments/ni/170/347730/2/Mikes suggestion edited1.JPG
Continue reading on narkive:
Loading...