LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

missing frames

I'd greatly appreciate any help on this.

I'm attaching the problematic part of a code that I'm trying to use for triggering a CMOS camera to capture a certain number of frames per trigger. In the part attached, the while loop should cycle until all frames are captured and converted to arrays. The marked 2D array inside the while loop gets updated correctly as many times as the number of frames per trigger is set. However the 3D array out of the while loop shows only about 1/3 of the number of frames captured inside, which I guess it means that the while loop cycles slower than the frame rate.

I replaced the while loop with a for loop, but it didn't help. Increasing the number of iterations of the while loop and the 50ms wait time didn't help either.

Is there any other way I can try to solve this problem?

Thanks!

frames.png

0 Kudos
Message 1 of 5
(1,635 Views)

That just doesn't make sense.

 

You can't lose data from inside the loop to outside the loop.

 

What is happening in the cases you don't show?  I see you have "Use Default if Unwired" tunnels which mean the other cases don't have wires going to the tunnel, and if they execute, they'll pass out empty arrays to get built up into the 3D array.  Do you ever see that the other case wind up executing?

0 Kudos
Message 2 of 5
(1,610 Views)

Thanks for your reply. I removed both case structures as they almost never go to other cases, but I still get the same result.

Is there any way that I pile up the captured 2D arrays inside the while loop using shift registers to generate the 3D array? If so, can you please show me in a simple code how to do that? I'm really new to labview...

Thanks a million!

 

0 Kudos
Message 3 of 5
(1,599 Views)

Sure.  You use Build Array inside the loop.  Wires in and out are 3-D arrays from and to the shift register.

The new 2-D array from that iteration goes into the lower left input.

 

Message 4 of 5
(1,591 Views)

Thank you again. Will try that!

 

 

0 Kudos
Message 5 of 5
(1,582 Views)
Products may include a surcharge. Surcharge is calculated during checkout for U.S. customers. Learn more