Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting trigger pulses during saving image

Hi,

 

Could you help me? I want to ask how I can count trigger pulses during saving images. First I am using NI-1429 and Basler Sprint spL4096-140k. I have an encoder with 56k resolution with about 18k pulses per second; shutter is set to 36 microseconds.

 

I want to save an image with resolution 56k x 4096, which is one revolution of a container, then I want to wait 12 revolutions (during this time captured data must be saved and some pre-processing have to be done).

 

How can I count the trigger pulses, during this data operations (saving this image takes some time) and then how can I trigger acquisition of next image? I can imagine 2 parallel while loops. In first one, there is capturing and then saving with processing and in second one your function to read trigger status. But I do not know if this while loop is started so often Ii need to and what about communication between each other while loop?

 

Thanks for reply

 

Dan

 

0 Kudos
Message 1 of 2
(2,667 Views)

Dear Dan,

From your description I understood that you want to use line-scanning with IMAQ in LabVIEW.

When using triggers, you need to configure the triggerlines and the actions for the triggers.

I found in the LabVIEW help a VI, which is responsable to set up the triggers for line-scanner. This VI has an input, where you can describe how many trigger impulses you can skip at the end of the line.

I attached a screenshot of my LabVIEW Vision help:

imaq_skip_trig.png

 

You can reach this VI in the Block diagram function palette on this path: Vision and Motion > NI-IMAQ > Signal I/O > IMAQ Configure Trigger3.vi

 

Using these settings you don't need to use an other while loop to check the trigger state, which I think is not a good practise, since you get 18k trigger pulses per second.

If you need to count the pulses with a custom way, and this solution isn't good for you, you can consider using DAQ device with counter inputs.

 

Best Regards,

Tamas Szekely

Applications Engineer

National Instruments

 

 

0 Kudos
Message 2 of 2
(2,650 Views)