Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple camera image acquisition IMAQdx

Solved!
Go to solution

Hello,

 

I am working on a LabView code that can acquire images from two cameras that are externally triggered in conjunction with the acquisition of some digitized data. I have a working version of this code that works with only one camera IMAQ, and I am running into issues when I have added the second camera. 

 

The issue: When I run the code, the two images saved for a single trigger are always from only ONE of the two cameras. So I get two of the same image saved, instead of one image from each camera. When I trigger the cameras multiple times, occasionally the images saved will swap to be from the other camera, but I haven't found a pattern for when or why it acquires from one camera or the other.

 

I am sure this is just a result of my novice LabView skills. I would appreciate some help identifying the bug. 

 

Both cameras are identical FLIR grasshopper3 cameras and have the names "cam2" and "cam3." Cam2 is associated with the "MS" and cam3 is associated with the "Target"

They both work independently in NI MAX and in the previous code that only acquires from one camera. 

The buffer numbers are changing as expected on both.

I have tried triggering the cameras at different times and at the same time with no effect. 

 

Perhaps the two grab functions can't operate on two sessions at the same time and need some sort of sequence structure? Or perhaps the close camera vis are in the wrong place? I do have the issue that the stop button on the front panel doesn't stop the whole VI....

 

I have attached the VI. Thanks in advance!

0 Kudos
Message 1 of 4
(1,441 Views)
Solution
Accepted by sorchaniburca

You named both images "Triggered Grab", so they are actually using the same image space.  One of your acquisitions writes an image to that space, then the other immediately overwrites it in the same space.  The order will be somewhat random.

 

If you change the name for one of the images, they will use separate spaces and work properly.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 4
(1,412 Views)

I looked at the stop buttons.  You have eight stop buttons inside the case statement, plus one outside!!!  You should delete all the ones inside the case and just use the one outside the case.  Change the stop outputs coming out of the case statement to "Use Default Value if Unwired", and remove the ORs in the image acquisition frame.  A single button will work much better.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 3 of 4
(1,410 Views)

Thank you!! I knew it was something silly on my end. Also appreciate the advise with the stop buttons - I cleaned all that up 🙂

0 Kudos
Message 4 of 4
(1,303 Views)