10-13-2014 07:51 AM
Hello
I try to synchronize vision and analog data acquisition (see attached vi). I have two loops, one for the analog data, the other for the video acqusition. The analog loop, in which I get the data from a single analog input, is firing each cycle a hardware trigger impulse to the cam, so that I get a picture and I put it together to an avi file. I have a NI USB 6001 and the picture I get over fire wire.
The problem I have, I can't go over 20 fps. The system doesn't make it. Even at 20 fps it doesn't work properly. The video is safed, but when I play it, the time is too fast in it.
I am not sure if my programming is good for such an application.
Any idea what could be done better?
Thank's
Tom
10-13-2014 03:24 PM
I have many ideas. What is the frame rate for your camera in hardware trigger mode?
All cameras have latency. This is the time you send the trigger to when it actually acquire the picture. Have the trigger signal also power an LED and put it in the camera field of view. Play back the video and see if the LED is on when you view the image.
You are running the camera and DAQ at two different delays. I would suggest you sync the software loops to see if that is the source of the issue. Think you are overloading the camera with a 1 ms loop delay rate.
10-14-2014 09:02 AM
Hello Tom,
have you considered using a producer consumer pattern?
Application Design Patterns: Producer/Consumer - National Instruments
http://www.ni.com/white-paper/3023/en/
Regards,
eletra
10-14-2014 09:04 AM
Also maybe have a look at this document:
Synchronizing Motion, Vision, and Data Acquisition - National Instruments
http://www.ni.com/white-paper/4214/en/