Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

image and data synchronization at different scan rates

Hello to all.
In my application I need to synchronize image and data acqusition at different scan rates. For example, for each 100 point of data I need to acquire 1 image. How can I perform this?
As I understand I need to use one sample clock to these both operations.
I have an PCI-1411 image acqusition board with external trigger, and I route the  sample clock signal from the data acqusition board PCI 6221 (through PFI connector), but I need to reduce the scan rate for the image acqusition.
Thank you, Andrey
0 Kudos
Message 1 of 5
(3,523 Views)

Do you have a counter/timer available on the DAQ board?  You should be able to downsample the sample clock by a factor of 100 through the counter/timer, then route it to your external trigger.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 5
(3,511 Views)
Bruce, hello.
Thank you for the information.
 
I wrote to ni forum about image and data synchrinization at different scan rates.
Here is my question and your answer:
 
My question was:
Hello to all.
In my application I need to synchronize image and data acqusition at different scan rates. For example, for each 100 point of data I need to acquire 1 image. How can I perform this?
As I understand I need to use one sample clock to these both operations.
I have an PCI-1411 image acqusition board with external trigger, and I route the  sample clock signal from the data acqusition board PCI 6221 (through PFI connector), but I need to reduce the scan rate for the image acqusition.
Thank you, Andrey
 
And your answer was:

Do you have a counter/timer available on the DAQ board?  You should be able to downsample the sample clock by a factor of 100 through the counter/timer, then route it to your external trigger.

As I cleared up, I have a counter/timer available on the DAQ board.

Can you explain more in detail how can I put this solution into practice.

Thank you,Andrey

0 Kudos
Message 3 of 5
(3,489 Views)

Hi Andruha,

Basically what has to be done is that you have to create a pulse for every 100th sample that you take.  That pulse will then be wired to the trigger for your frame grabber. 

I am unsure of which DAQ board you are using, but I will assume that you are probably using a Multifunction DAQ board such as an E- or M-Series Device (ie PCI-62XX).

I went ahead and created an example program for you that I think should clear up some of the confusion.  Basically in the example you will do the typical commands that you would need to read an analog input (AI).  In parallel to the AI you will also do a CO Pulse Ticks task.  That task will generate a pulse of specified length and a low time for a specified length.  In this case we say that the source of the ticks is the AI Sample Clock.  What that does is it means that we can have a pulse being generated for every X AI Samples taken.  For your case I made it to where the example pulses every 100 ticks.

I think this should give you a better idea of how to do what you are doing.  You should be able to play around with the values and get the appropriate rates for your application. 

As far as hardware is concerned you will need to connect your trigger line for the camera to the output for the counter you are using.

I hope this helps you understand everything a little better.  If not, just let me know what is happening and we can try to see what else we can work with.

Regards,

 
Message 4 of 5
(3,473 Views)
Otis, thank you very much. It's works.
And I think it's more easly to use only one counter for such purpose instead two counters. In a such way I need to use the output of counter 1 (desired frequency) as a gate for counter 0 which uses a sample AI rate as a source. And thus I need to connect counter 0 output to the framegrabber video.
Best regards, Andrey
0 Kudos
Message 5 of 5
(3,465 Views)