Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

limit break of my CCD ???!!!

I've used PCI-1409 IMAQ card,Sony XC-75 CCD(RS-170) and 5411 function generate card to build up my image acquire system.When I trigger the IMAQ card,at the same time,5411 send a waveform to the sample which I want to observe.I download the "IMAQ AVI read write example" from NI website and modify it to fit my need.
Because my experiment is time-critical,so I record the time when each loop performed in the avi acquisition part.I define the time when i=0 performed is "T0",i=1 is "T1",and so forth.By the result of my program ,T1=114 ms,T2=118 ms,T3=136 ms,T4=169 ms,T5=202 ms. What a weird result ?! The highest frame rate of my CCD is 30fps.Time interval between T0 and T1 is too long(114ms),and between T1 and T2 is too short(only 4 ms !! ) Tim
e interval between T2 and T3 is not normal(18ms),too. after T3,the time interval between each frame is 33ms,on coincidence to 30fps.I don't know where the problem is. Is the first delay between Frame 0 and Frame 1(114ms) caused by the initiation of 5411 ?? And I can't explain the "4ms" between Frame 1 and Frame 2 .Thanks for any help.
0 Kudos
Message 1 of 4
(3,062 Views)
In your program, you are timing the loop, not the acquisition. The timer value is probably read at the start of each loop (never can be sure with parallel processes). The acquisition takes a few loops before it synchronizes with the timer value.

If you want to time your acquisition more accurately, put the timer read in a sequence with the acquisition. Immediately after completing the acquisition, the timer will be read.

Another option would require counter-timers, so the timing could be done completely in hardware and would be more accurate.

Even accounting for the timing irregularities, it looks like you may be missing the first frame. I would probably set up a continuous buffer instead of using grab to make sure no frames are missed.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 4
(3,062 Views)
Your help was greatly appreciated.
I have put timer read deep in the "IMAQ acquire sub vi"
,and the time is more accurate. But time interval between the first frame and second is still over 100 ms.Comparing to the reaction time of my sample,100 ms is too long and I can't capture the image of process.
Would you teach me how to use "counter-timers" or "continuous buffer" or point out where some example or documents in NI website may be put to use in my program ?

Best regards

CHChen
0 Kudos
Message 3 of 4
(3,062 Views)
Perhaps you could use a sequence. They are fairly easy to set up and there are a few examples included with IMAQ. Basically, you set up a fixed number of frames to acquire, and each one is acquired as a separate image.

Using a continuous buffer is very similar. You set up the buffer the same way the sequence is set up, but instead of one-shot you select continuous. You have to keep reading the images before they are overwritten, but if you create a large buffer you have a couple of seconds that can compensate for system lags.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 4
(3,062 Views)