Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Camera Init time

When I use Async grab program of the Labview.(the fast object is captured)
I�ve got the problem of that.
Because, when the objects are coming into camera before timeout, the snap is OK, but If the objects are coming after timeout, the snap didn�t working,
Because of the initial time is about 700ms.

I think it�s too long time for close and initial act.
When the timeout error appears, I ignore the error list without the initial act,then that is not working anymore.
I wonder how to reduce the close and initial time.
Could you tell me about hint or advice of the async grab system.
Download All
0 Kudos
Message 1 of 4
(3,333 Views)
Hello,

When I ran your code, images were acquired on the triggers until the timeout, and then after several triggers, the acquisition resumed. Looking at your code, there are several possible sources of trouble. In general, it is best to not use IMAQ Create or IMAQ Init inside of a loop. That will add significant delay to your system, as it can waste system resources. Each IMAQ Create creates a new buffer for acquisition. This could amount to a memory leak. Every buffer should be disposed of after it is used. You can do this using IMAQ Dispose.

I would suggest implementing some error handling into this program. That is, I would use the simple error handler to determine if an error has occurred. Also, use the Unbundle by Name function to stop the while lo
op to stop execution of your program. If you want to keep the program running in the event of a timeout, you can set it up to stop in all cases except for a timeout error.

Try those steps and let me know if the problem persists or if you have any additional questions.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,333 Views)
Thank you for your answer
I tried to change VI and tested it as you said,
but I'm afraid that I'm understand your comment correctly.
The changed VI and the result image is attached.
Please check it, and let me advice about it
I tried to also test several other things.

I tried to attach the file and the picture, but I
couldn't it. because when I attached the file, the next page isn't open.
If you open your e-mail, I send my ficture, and VI.
Then you check it please.

I want to re-grab the image ater timeout without relay.
If you could be possible, you send me about correct VI
My e-mail is redfield@dissem.co.kr
My company is alliance in south korea.
I look forward to hearing from you soon.
0 Kudos
Message 3 of 4
(3,333 Views)
Hello,

Try moving the initialization and setup of the acquisition outside of the loop, leaving the start and stop acquisition VIs inside of the loop. That way you can initialize the board and setup the acquisition once and then just start and stop it multiple times. This will cut down on your program execution time significantly. One possible reason for the failure of the trigger to be registered immediately after the timeout could be that the initializtion could still be running. Those triggers and the corresponding frames would be lost until the initialization completes.

As another suggestion, try performing another acquisition after the occurrence instead of exiting that interior loop. I am curious as to whether or not the occurrence is
resetting properly. That would let us know if the occurrence timing out is directly affecting the continued execution.

Regards,
Scott R.
Applications Engineer
National Instruments
Scott Romine
Course Development Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,333 Views)