Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom Picture in/out in Inspection Interface with VBAI 2015 and a touchscreen

Solved!
Go to solution

Hi there,

 

I am using a NI CVS-1458RT with VBAI 2015. To the CVS-1458RT is a NI touchscreen connected which is used to control the custom made inspection interface.

Also pictures are taken with two different cameras with different resolutions. Because of that the image from camera #1 is scaled to the size of the image indicator and the image from camera #2 is far smaller (smaller resolution). So I need a way to change to zoom factor for the image indicator.

I tried to change the Image Area Size with a property node of the image indicator but it seems that the VI that is used for the inspection interface is not executed as expected.

On the inspection interface is a boolean control which is directly connected to a boolean indicator. But when I run the inspection with my test_VI  the boolean indicator changes not its state when I toggle the boolean control.

 

I would like to create a buttom to zoom in and out on the inspection interface to control the displayed image area of the Image indicator. I do not want to use the build in zoom tool of the image indicator because for zooming out I have to press "Shift" and click on the image. A keyboard is not connected to the CVS-1458RT because we want to use ONLY the touchscreen.

 

Thank you in advance

Andreas

Download All
0 Kudos
Message 1 of 5
(3,015 Views)
You can adjust programmatically the zoom factor of the image indicator using property nodes.
Thanks
uday
0 Kudos
Message 2 of 5
(2,986 Views)
Solution
Accepted by topic author Andreas_Elster

If you have code behind your custom UI, make sure to check the box to execute it if you want the VI run when the Update Inspection UI step runs.Update Inspection UI.png

I think that's probably what you are missing.

I also noticed that the current selected tool on your Image is the Pointer tool instead of the Zoom Tool. Zoom.png

Make the zoom tool selected by default and then the user can click on the image to zoom in (press shift while clicking to zoom out).

 

Hope that helps,

Brad

0 Kudos
Message 3 of 5
(2,972 Views)

@udka

I tried to use more than one property mode of the Image indicator but it seemed that the code was not executed properly/ not at all. For testing purposes I connected two indicators to the resulotion property mode and both of the indicators (for X and Y pixels) showed an value of zero.

 

@Brad

I'll test your suggestion at work tomorrow.

The pointer tool was deselected because I don't want the user of the touchscreen to use it. There is no keyboard connected (that's the reason why we use a touchscreen Smiley Wink ) to the CVS and so the user can only zoom into the picture with this tool.

 

Thank you both for your replies.

0 Kudos
Message 4 of 5
(2,951 Views)
Use ZoomSingle/ZoomInteger Properties of the image indicator.
Thanks
uday
0 Kudos
Message 5 of 5
(2,946 Views)