Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

VBAI 2009 and its Activex

Another option that's kind of desparate is to use a Run LV step to acquire images from this camera. This way the inspection will load very quickly since none of the steps will try to initialize the camera, and the first time the Run LV step executes, it will initialize the session, and in the cleanup state you can close the session. Here is a sample inspection to illustrate this with the attached LV 2010 VI.

Note: There will be some strange behavior when you're configuring the Run LV step initially to work with your camera, so after you set the step, save the inspection, close the inspection, open a new inspection and make sure the camera works. Then open the updated inspection I sent you. Make sure if you use your own inspection to include this Run LV VI, you add the close to the cleanup state. 

 

Sorry the Touch Panel PC is not initializing the camera well. For the USB camera to work, you would need to install the DirectShow drivers for the camera...that might have been why it wasn't working.

 

Hope this helps,

Brad

0 Kudos
Message 21 of 26
(892 Views)

I tried to open the inspection in VBAI 2010 but it didnt open giving the following message:

 

"The Inspection version is newer than the current Vision Builder AI Version".

0 Kudos
Message 22 of 26
(885 Views)

Sorry about that, I was using our new VBAI 2011. I've attached the inspection for VBAI 2010. Basically just a Run LV using the acquire with mode 0 (Acquire mode), the name of the camera session (which you can get from MAX, usually cam0), and an image variable as the image in. Then I use a select image to display the updated image variable, and in the cleanup call the same VI with a mode of 1 (close session).

 

After configuring the first Run LV with the right name of your camera session and saving the inspection, you may need to even unplug the camera because of how the run LV opens/closes things and so the session may be left open and you can't use it again until the camera is restarted. Once you close the inspection, and replug the camera, you can re-open the modified inspection and it will all work well after that. Make sure to run the step in the Cleanup state before switching to Inspection mode to ensure the session gets closed so it can correctly be initialized when opened and run in inspection mode. Things don't work so well with this approach, because as I said it's a desperate attempt, but if it gets you working, it may be worth it considering the alternatives aren't easy.

0 Kudos
Message 23 of 26
(883 Views)
The at
0 Kudos
Message 24 of 26
(881 Views)

Brad,

 

I tried to message you yesterday that the attachment didnt have any vbai 2010 script but some other files. But somehow my message was not going through. Anyways, i tried to work with the Run VI step as you suggested. When i use the original vi (without making any changes), there is an error stating: IMAQdx Get Image.vi "invalid pointer".

 

Also, the "Select Image" step is not working as it says there is no image variable for input? As i see you only gave Image in for the "IMAQdx Grab.vi" and no "Image out"?

 

Can you please re send the VBAI 2010 script?

0 Kudos
Message 25 of 26
(864 Views)

When you download *.vbai files from the forum, for some reason it changes the extension to .zip. Just change the extension to .vbai and it will work. To avoid that error you were getting, make sure to pass the local image variable as the image in to the VI instead of leaving Current value, which is an empty image passed in.

 

Hope this helps,

Brad

0 Kudos
Message 26 of 26
(860 Views)