LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview vision -> while loop + image + shiftregister = 2 times same image.

Well I got this problem here at home. 

 

I've this .vi 

 

 

 

I've labview 8.6 + labview vision module + labview vision module for usb webcams.

 

Well this .vi is pretty simple but it gives me some strange results...

When I run this I get the same image on "image1" and "image2"... while in fact "image2" should be the "image1" of the last loop. This should be visible when you set the sleep time of the loop higher. Now the problem is is that on my frontpanel "image1" and "image2" are ALWAYS equal... But then when I click on the two wires of "image2" and "image1" then the difference is visible. But on the frontpanel "image1" equals "image2"...

 

A couple of weeks ago when I first was testing with labview + vision on my university there was a visible difference between the two images. This was with the same webcam and software.  

 

Anyone got an idea how this is possible? 

0 Kudos
Message 1 of 9
(5,119 Views)

How fast is your update rate?

 

Have you tried setting the image indicators to "advanced...synchronous display"?

 

(sorry, I don't have vision stuff, so I cannot test).

0 Kudos
Message 2 of 9
(5,103 Views)
With update rate I think you mean my sample time right? If that is the case I fetch a sample every 2 seconds. But with the silder I can change that ofcourse and 2 seconds are more then enough to see difference. Also I tried your suggestion I didn't had it turned on but unfortunatly it had no effect.
0 Kudos
Message 3 of 9
(5,096 Views)
ps. If I've my highlight execution on then it works...
0 Kudos
Message 4 of 9
(5,092 Views)

Hello Wouser,

 

to display two different Images at the same time you will need two different image buffers.

Please note that you will have to use two different names when creating the image buffers.

In your case the use of "IMAQ Copy" would be recomended to create a copy in the other buffer.

You can think of the purple "Image" Wire as a Pointer to the Buffer containing the actual Image data.

 

I hope this helps!

 

Regards

 

Moritz M. 

Message 5 of 9
(5,075 Views)

Wetzer wrote:

You can think of the purple "Image" Wire as a Pointer to the Buffer containing the actual Image data.


That's what I thought too, but why would it behave differently during execution highlighting? (sorry, I don't have IMAQ, just curious ;))

0 Kudos
Message 6 of 9
(5,065 Views)
When execution highlight is on, the code is stepping slow enough that each update of the image controls can be seen.  That is probably not the case when running full speed.  The image control connected to the shift register probably just flickers through two updates in the loop as the data in the image buffer changes.
Randall Pursley
0 Kudos
Message 7 of 9
(5,054 Views)
Well I still don't know the actually problem. But I think it's something with my labview/vision library/laptop. Since I tested this same circuit also on a computer at school and there you can see the difference on the images at the frontpanel... and that computer is slower then my own laptop... 😞
0 Kudos
Message 8 of 9
(5,046 Views)

Hello Wouser

 

Randalls post gives a good explanation on why your code works when "highlight" mode is enabled.

What still remains questionable is the difference between these two computers. 

Here is the Code that should do the trick on any computer:

 

USB_IMAQ_Forum.jpg

 

Since i aint got no USB Camera i couldnt test this code, but i am confident that it will work.

 

Regards

 

Moritz M. 

0 Kudos
Message 9 of 9
(5,019 Views)