Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Attaching NIVision Windows to main panel

Hi,
 
Does anyone know how to attach a NI Vision Window to a panel ? I am using LabWindows but do not want to allow the user to move any of the NI Vision windows used to display images.
0 Kudos
Message 1 of 7
(3,989 Views)

I thought this was a really easy one to answer until I realized it was LabWindows instead of LabVIEW.

In LabVIEW, starting with version 7, there is a new indicator for images that is attached to the page.  There may be an equivalent indicator for LabWindows.

Before version 7, I used a LV tool that would anchor the image in the panel.  I don't know if that could be adapted to LabWindows.  It was called "make IMAQ child" or something like that.  You should be able to search my previous posts to find it - it was a subject of conversation several times.  It made the image display window a child window of the panel, effectively locking it into the panel.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 7
(3,977 Views)
Ok. I will look for your example. I also realized that IMAQ 1394 WITHOUT using NI VIsion uses a CANVAS control to show images. A CANVAS control is always locked to the panel. I will figure out how to transfer my NI Vision data to the CANVAS object instead of using a regular IMAQ Window. I am not sure if that will slow down a little bit my throughput, but will try anyway.
0 Kudos
Message 3 of 7
(3,970 Views)
Hey Pacsoft,

There is an example program that does what you are trying to do. It can be found on the following link Embedding the IMAQ Vision Window in the LabWindows/CVI Main Panel.
 
I hope this helps. Let me know if you have any further questions regarding this. Thanks and have a great day.
 
Regards,
DJ L.
0 Kudos
Message 4 of 7
(3,963 Views)
I already read that example code, but the NI Vision window is a child of the main window, and is not locked. This program shows you the code to allow the child window to be moved within the main window.
0 Kudos
Message 5 of 7
(3,961 Views)

That looks like the LabWindows version of the routine I was talking about.

It seems like it would do the job.  You do have to lock it each time you run the program, but that is just a minor pain.  I usually put a decoration where the image was going to be to reserve the space for the image so I didn't put anything else there.

I think there are other calls you can use to modify the attributes of the image window.  By making it not resizeable and removing the frame, all that was left was the image locked in place.  This prevents the user from moving it.  Of course, if you want to move it within the program it is easy to do.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 7
(3,954 Views)
Makes sense. It could save a lot of time trying to transfer all the image data to a CANVAS object. I will try it.
0 Kudos
Message 7 of 7
(3,946 Views)