Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

View Aquired Image in a Tab control

In order to conserve space I would like to view a live image, aquired from a 1409 board,in a page of a tab control. Also to decrease cpu usage I have set up a Low Level ring. I have tried sending the image to a picture control, but the image is choppy (even if I slow down the loop). My image is perfect in a Vision Window, but this cannot be used as a control on a page. Any suggestions?
0 Kudos
Message 1 of 5
(3,324 Views)
Terry,

My suggestion would be making the Vision window a child panel of the main panel, then programatically show/hide it.

You can make it a child panel using "Make IMAQ Child", which is a routine from NI. I posted a revised version of it in a recent reply here.

To hide or show the window, you can use hide/show window. Compare the terminal for the tab control to a constant for the desired page, and if equal show the window.

Bruce
Bruce Ammons
Ammons Engineering
Message 2 of 5
(3,324 Views)
Terry,

Bruce has the right idea, try making a child panel and use WindShow to hide or show the display....Attached is an example I wrote using multiple boards and displaying two images on the pages of a tab control...I hope this helps.

Best Regards,
Chris D
NI Applications Engineer
Message 3 of 5
(3,324 Views)
This is a great idea, however is there a way to create a create a 0,0 reference for the panel so when you run the VI the panel objects are all in the right position even if the window was scrolled slightly during development? If I take your sample VI and just move the tab control the image window will follow it, however if I only scroll the window some amount and then run the VI the image window is not relative to the tab. Hope it make sense.
0 Kudos
Message 4 of 5
(3,324 Views)
Terry,
Instead of using the IMAQ window to display your image you could use an intensity graph and display your image that way. Then your image would always stay on your tab page. As for the 0,0 reference you asked about, I always set the FP.Origin number in the initialize state of my program so that the front panel is always located where I want it.

Chris
0 Kudos
Message 5 of 5
(3,324 Views)