01-28-2011 10:11 AM - edited 01-28-2011 10:14 AM
Hi,
Here is a program getting data from a GigE camera, then do some caculation for each frame, then display it.
I have set it MAX, that the camera works in a frame trigger mode, so it should snap a frame each time it receive a trigger.
But I have several questions, please help me out.
First Question: Dose the program run as: 1, continuously get image following the trigger, then put them into the buffer. At the same time, the calculation loop get one frame after another frame at its own speed.
Or 2, the program will wait for the calculation to complete, and then wait for trigger to get frame, so in this case, if the calculation last long, it may miss trigger.
Second Question: I am confused about how it calculate frame rate, what dose the saying "frame rate in a Ioop" mean? I check the help, it saids to average on 1000ms, but I still do not understand.
Third Question: My calculation loop is very slow, it takes about 160 ms per loop. But I want to achieve a frame rate of 20Hz. Is there a solution?
Thank you, I also attached my code, please see it.
Solved! Go to Solution.
01-31-2011 07:44 PM
Hey ustcmiaor,
Can you attach the subVIs?
Regards,
A. Zaatari
02-01-2011 02:50 PM
Sorry, I forget that. Here it is~
02-03-2011 01:16 PM
Hey, ustcmiaor,
Since you have the start vi outside the loop, this means that the internal buffer is being updated with the most recent triggered image independent of what is going on inside the while loop. However, to reach a higher rate of acquisition, you could just create a producer consumer loop to buffer that data through. The problem is you probably wont be able to acquire for a very long time before your memory runs out, so I would be careful, also you will not be able to see the image update in real time.
Regards,
A. Zaatari
02-04-2011 11:06 AM
Hi, A. Zaatari,
Thank you very much for your reply.
I do know something about the producer consumer loop, but since the queue deal with single data operation, while my data is a 1204 array, I don't know how to add or remove 1024 data at a time.
A simple for loop of 1024 times seems do not work, can you show me how to do that?
Miao Zhang
02-08-2011 12:39 AM
Hey Miao,
Are you refferring to the data type? are you asking how to queue an array with 1024 elements?
02-08-2011 12:02 PM
Yes, I am referring the data type, so I just need to wire a array constant. Thank you.