LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving image sequence from Vision Acquisition Express VI

Krispiekream,

Thanks, but the saving goes quickly enough, I was just having trouble being able to control when saving starts and stops using a button.

 

muks,

The trick was changing the button to switch when pressed.  When I did this for the Save On/Off button on the VI with the nested while loop that I posted yesterday, the saving works great.  The Stop button doesn't seem to do anything unless the Saving button is on, and the Stop Imaging button stops the acquisition, but causes the Imaging Number and Frame Rate indicators to shoot up to unrealistic values (>10000).  But at least the saving control works well, as I can always stop acquisition by stopping the VI.

 

I did try the case structure inside a while loop as you suggested.  The saving control works, but for some reason the files saved are empty - turning saving on must turn the acquisition off.  But regardless, I'll stick with the nested while loop.

 

Thanks for your help.

0 Kudos
Message 11 of 22
(2,863 Views)

but for some reason the files saved are empty - turning saving on must turn the acquisition off
I dont get that. Can you post the screen shot?
0 Kudos
Message 12 of 22
(2,844 Views)

Hi jman1,

 

Looking at the block diagrams you've posted so far, the reason your acquisition stops when aaving begins is becuase you have data dependency between the loops.  In other words, in LabVIEW a loop will only send its outputs once the loop has finished.  Therefore, your acquisition must finish before you can save with the architecture you have presented.

 

Take a look at this community example:  Saving Multiple AVI Files from USB Grabs.  This uses and button's value change event to determine whether the images will be saved.  Feel free to download and modify it too.  You will want to replace the USB IMAQ VIs, as they are outdated (and replaced by IMAQdx, which supports USB cameras as Vision Acquistion Software 2009).

 

 

 

Message 13 of 22
(2,832 Views)

muks,

Here is my attempt using case structures.  I haven't attempted to fix it since Kristen's advice.

 

Kristen,

Thanks for the explanation.  I'll attempt to modify that example for my application.

 

Case Sequence2.JPG

0 Kudos
Message 14 of 22
(2,822 Views)
Yup, that is what i suggested. Working now?
0 Kudos
Message 15 of 22
(2,802 Views)
It still stops imaging when saving begins.  It might be just an incorrect setting in that particular Vision Acquisition Express VI.  The saving/imaging works fine when I use an imaging while loop inside of a saving while loop, as you originally suggested, so I'm going to stick with that for now.
0 Kudos
Message 16 of 22
(2,785 Views)
My personal view is dont use an express vi. Use your own simple sequence of init-acquire-stop. Atleast this way where you want the stop to be and correctly wire it.
0 Kudos
Message 17 of 22
(2,775 Views)

Hello,

 

I saw your post and I'm having the same problem. I'm really new at LabView so I was wondering if you could send an attached version of the VI so I know exactly where the functions are and what they are called.

 

Thanks in advance

 

ffsalik@millikin.edu 

 

 

0 Kudos
Message 18 of 22
(2,104 Views)

hello,can you explain to me please the different composants that you use in this VI with their names.thank you. 

0 Kudos
Message 19 of 22
(1,478 Views)

In addition to the Vision Acquisition Express VI, here are the names of the other functions they used. Ultimately, their code is appending the loop iteration onto their chosen file path in order to save each acquisition with an incremental file name.
String Functions Names.png

0 Kudos
Message 20 of 22
(1,469 Views)