09-17-2015 04:00 PM
Hello,
I am a LV newbie, so your patience is appreaciated 🙂
I am working with a Prosilica GE 680 gigabit camera linked to my computer via Intel PRO G/T 1000 and I am also working with an M-series NI-USB 6212 BNC. Connected to the ni-daq is a light source on each of AnalogOut0 and AnalogOut1 as well as 3 analog inputs: two of the three are reading from the analog outputs, the other input is a signal from the camera saying whether it is imaging or not.
I have been debugging someone's code that is no longer around to help. The code essentially allows the user to synchronize two things: 1) The capturing and saving of a number of avi's of specified length, which in my hands is typically 2 sec movies at 200fps AND 2) Turning on and off two light sources at specified times during the movie. The problem is in the precise synchronization of the light sources with the camera exposure period.
As of now the light sources turn on and off during my movies, which is good. The problem is that the camera turns on late relative to the start signal as evidenced by the "imaging" output signal sent by the camera into one of the analog inputs. The result is that the lights appear to turn on early in the saved avi's since the movie starts later than specified. This is not ideal.
What changes do I need to make to the labview code to make sure that the camera is precisely synchronized with the analog outputs?
Thanks and let me know what info you need from me.
-Alex
Solved! Go to Solution.
09-18-2015 02:00 PM
I've also posted this problem in the Machine Vision boards.
09-18-2015 03:07 PM
Hi areeves87,
Do you mean your camera is slow to turn on, or that the camera acquires images more slowly than is necessary by your analog signal?
I found a Triggered Grab.vi example in the Example Finder which might be helpful for you. In LabVIEW navigate to Help>> Find Examples.
Hardware Input and Output>> Vision Acquisition>> NI-IMAQdx>> Signal Input and Output>> Triggered Grab.vi
This vi lets you grab an image based off of a trigger source.
09-18-2015 03:53 PM
Thank you for your reply Robert,
I do mean that the camera is slow to turn on. I have not tested the acquisition frame rate explicitly but the movies look good.
Bruce Ammons from the machine vision boards suggested that I use the imaging signal from the camera to trigger the analog outputs. That way everything is perfectly synchronized. This made sense to me, so I looked into implimenting the suggestion. After reviewing the code and my hardware situation I realized that the rig is already set up this way. Analog outputs are triggered by the ai/starttrigger terminal which is itself triggered by a PFI that receives the imaging signal from the camera.
So it looks like it is the camera triggering the analog outs and digital counter. Is this different from the triggered grab? Looks like instead of camera triggering daq, its the other way around where daq triggers camera.
I took a screen shot of the wavegraphs for the analog inputs. White is the imaging signal, red and green are the light sources.
Any idea why the camera is slow to turn on?
09-21-2015 02:06 PM
Hello Again,
I neglected to point out that I posted the code I am working with in my original post. So if you have questions about how the triggering is set up you can check it out. Look under the event subdiagram "start value change" to see how the analog outputs and the counter are triggered. Thanks so much for your help,
Alex
09-24-2015 06:16 PM
Hello again,
I have solved the problem. It was a hardware issue. Using SyncOut2 instead of SyncOut1 on my Prosilica GE 680 camera gave me the timing that I specified. No major code edits were needed, other than the edits to support the hardware change.
The question still remains as to why SyncOut2 works and SyncOut1 does not. After consulting the technical manual for the camera I realized that using SyncOut1 requires that I use the isolated ground on my camera's 12 pin IO connector. Although I am an electronics novice, it seems to me that this would require a line going from the isolated ground to my DAQ external circuit ground. I did not do this, although I did when I tried SyncOut2. This missing connection may have affected SyncOut1's ability to send a trigger to the DAQ.
I have included what the analog input wavegraphs look like now that the synchronization is good.
Despite remaining questions I will mark this issue as solved.