Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

migration from VBAI to labview

Good Day! I am currently using 4 cameras (sony XC-HR50) for real-time inspection. I've written 4 individual scripts in VBAI 2.5 for each of the cameras.  To inspect, I run each of the scripts one after the other. We were told by one of the technicians of NI that it is possible to just run one single inspection program for all of the cameras if we migrate our inspection to labview and write a single program there. What I did was migrate each of the scripts from VBAI to labview. When I migrated my scripts I noticed that all of them have the same file names, folders, libraries, etc. I was thinking that maybe I can just open each of the new VIs and then just copy and paste them to a new blank VI then afterwards just do some editing I can have a single image and inspection file.
 
My problem now is that whan i did that, instead of having the four images from the different cameras in my panel I have four of the same image from the first VI that I opened. I migrated to labview 7.1.  
 
If anyone would be able to help me with this I'd be very grateful.
 
0 Kudos
Message 1 of 16
(5,760 Views)
Hi joeltucit,
 
do you have the 7.1 vi that you have created that I could look at?
It sounds like you might be using the same name for the images that you create?  Or you're only creating one image in labVIEW and wiring this into all of the camera aquire vi's.
 
There could be a number of reasons and the nest way to troubleshoot them would be to post your code and I'll have a look for you.
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 2 of 16
(5,759 Views)
AdamB,
 
Let me first correct my original post. I only get one image (which is from the first VI i opened) and not 4 of the same image. I'm also sending the four VIs originally generated by the migration.
Thank you for your time. 
Download All
0 Kudos
Message 3 of 16
(5,750 Views)
Here are the rest of the Vis. I must apologize I'm still very new at this.
Download All
0 Kudos
Message 4 of 16
(5,750 Views)
Hi Joeltucit,
 
Well as I mentioned you seem to be using the same image name for the four images that you are creating: "image".  However in this case I doubt that this will cause the problem.  Try changing them all to "Image1" Image2" etc etc first just in case!
 
Where are you displaying the images you acquire?  The "4-cam trial.vi" has no image indicators in it so I am assuming you are using a RT system (window 15 is a realtime display).  This means that you are displaying the 4 images one on top of the other giving the impression you are only displaying one image at a time.
 
I have quicky updated your vi to resize the 4 images that you create, then there is the starting of the code to place the images (using image to image) in the four corners of the display. (you need to add the IMAQ dispose.vi to delete the images)
All you need to do is input the resize resolutions (X & Y) to be half the display size.  Then you need to place the images (using image to image) in the correct places.
 
For example.
640 by 480 screen - Size all four images to 320 by 240
Offsets for all the image to image functions:
Top left offset = (0,0)
Top right offset = (320,0)
Bottom left offset = (0,240)
Bottom right offset = (320,240)
 
This should then display as needed.
 
Please post back if you don't understand or need some more guidance.
 
Thanx
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 5 of 16
(5,745 Views)

AdamB,

Good Day! I thank you for your quick response. However, I was not able to open the VI you posted. I only have LabVIEW 7.1 and whenever i try to open it it returns an error code 9 saying it is done on LabVIEW 8. If it is not much trouble could you send me the file saved on an older version of LabVIEW.

Regarding your other suggestions, I'll try your advise right away. Thanks again.

joeltucit

 

Message 6 of 16
(5,741 Views)
Hey Sorry about that.
 
Here you go
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
Message 7 of 16
(5,740 Views)
AdamB,
 
I've tried it but i still can not make it work. However, i've shown whatever it is that i have finished so far to my professor (i'm an MS student) and he advised me to shelf the idea of migrating for now and just try to rewrite the whole acquisition and inspection code in LabVIEW. So for now that is what i'm going to do.
Thank you for all your help and more power.
 
joeltucit  
0 Kudos
Message 8 of 16
(5,720 Views)

Hello

As you are using Sony XC-HR50 camera. you must have camera file to be used in Automation Explorer. Pl. send that file to me at ajay_shankar@hotmail.com. I am using PCI-1405 IMAQ card but it is not showing camera option SONY XC-HR50

Ajay Shankar
0 Kudos
Message 9 of 16
(5,150 Views)

Hi Ajay,

 

You can find camera files for the Sony XC-HR50 camera available for download on our FTP site. Alternately, you could use the Industrial Camera Advisor to locate a compatible file. I hope this helps 🙂

David G
Sales Engineer - SE Michigan & N Ohio
National Instruments
0 Kudos
Message 10 of 16
(5,104 Views)