LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture image triggered externally in random

I am using a PCI-1422 card and Windows XP, with labview 7.1 (IMAQ 3.0.1). I have an independent function that generates a trigger signal from another DAQ card to my high speed camera. I want to capture the triggered images and put them into files and AVI. The files and AVI are not a problem. Trigger generation is not a problem either.

My problem is that the image acquisition is always running and overwrites in the buffer list whatever the trigger signal is. I want to keep the buffer intact once the image has been acquired. The trigger signal rate and starting can be chosen by the user. Let say I want 100 images taken at a rate of 400fps when the user hit a push button. And I want to keep those 100 images. That is, the acquisition will stop when the 100 has been taken.

I am learning IMAQ so I am going step by step. I have built a labview VI to generates the trigger signal, whenever I push a button, it send the trigger signal to the camera. Then I have another VI that runs to acquire the signal when there is a trigger. I don't really understand the exemple since the grab, ring, snap and sequence start when we start the VI at whatever frame rate. I want the VI to wait until there is a trigger, then put the image in the "i" buffer once there is a trigger signal and NEVER back to this buffer, waits for the following trigger signal, and write in the following buffer. (I don't see how the while loop can be of any help, since the buffer index will be the loop index, and will be random...).

Any help/exemple is welcome. I guess I don't deeply understand all the icons really works.. (the "Wait" doesn't let pass when there is a trigger, and the GET doesn't recognize the trigger either.. the Extract will not wait anything and take whatever is filled in the actual buffer, Occurence is obscur to me as the occurence linked to a loop does not retain the loop to proceed..)

Thanks

Mathieu
0 Kudos
Message 1 of 2
(3,030 Views)
Hello.

It sounds like you are essentially trying to get started with a triggered acquisition in LabVIEW.

First off, there are several different types of triggering that can be done with IMAQ (and it can be a little confusing). See this link for a brief overview of the triggering types.

It sounds like you are sending the trigger to your camera directly. The type of acquisition that you are describing is what we call a Sequence, which is basically a finite acquisition. There are several shipping examples that you can take a look at for this type. I would reccomend the LL Sequence.vi which can be found in the LabVIEW example finder. If you are sending the trigger to the camera, and the camera truly is not outputting images unless it receives a trigger, then you should basically be able to run these out of the box. If your camera is sending images in free-run mode, then you will have to use the IMAQ Triggering VIs.

I hope this gives you a breif overview.
Regards,
Colin C.
Applications Engineering
Colin Christofferson
Community Web Marketing
Blog
0 Kudos
Message 2 of 2
(3,000 Views)