Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

VSYNC from IMAQ -D6804 cable?

Hi,

I would like to synchronize the IMAQ frame acquisition process with DAQ (Analog Signal generation). So I need to get either the VSYNC or Frame Start signals from IMAQ. I know that this can be done through RTSI. Unfortunately the RTSI we just purchased is so short that it cant connect our IMAQ with our DAQ card. Well, I dont want to wait till we get a longer RTSI and so, I would like to test this application immediately. Is it possible to get VSYNC or Frame start through the D6804 cable? Or is this cable used only for providing external triggers to IMAQ? If it is possible then kindly let me know how to configure the same for various IMAQ outputs.

Also I dont quite understand the difference between VSYNC and Frame Start signals. Please explain.

Thanks & Regards,
Aarthi
0 Kudos
Message 1 of 7
(4,533 Views)
Hi Aarthi -

Thanks for your patience while I researched your questions to get you an informative reply:

  1. Since the D6804 cable contains connections for the external trigger lines, you should be able to drive a trigger on one of those connections using the IMAQ Trigger Drive2 VI.  Just set your "Trigger Type" to "External" and choose the corresponding "Trigger Number".
  2. VSYNC is sent at the beginning of each field in an interlaced signal, so there can be two VSYNC pulses per frame. Cameras with the asynchronous reset feature also typically continue outputting VSYNC pulses to maintain the period of the signal, even though the camera might not be acquiring images. So in those cases, triggering off the VSYNC will be useless.  In these cases (and perhaps others), the Frame Start signal will be the only true indicator of the beginning of a frame.  In normal situations, both VSYNC and Frame Start will occur at the same time.  For safety's sake, I recommend using Frame Start to trigger your acquisition.
David Staab, CLA
Staff Systems Engineer
National Instruments
Message 2 of 7
(4,520 Views)
Hi David,

Thanks for your response. I configured the IMAQ Trigger Drive2 vi as you said. The camera which we have is Basler L104k-2k line scan camera and we use IMAQ NI-PCI-1428 frame grabber. In our application we do buffered frame acquisition and we have configured the frame settings to be 1000 lines per frame. The problem that I am facing now is - I not able to get the VSYNC or Frame Start signals from the D6804 cable. I am able to get the HSYNC pulse which is in synch with the line integration time of the camera and it is correct. In NI IMAQ VI Reference help it is mentioned that

Vertical Synchronization Signal Vertical synchronization signal that is asserted at the beginning of each frame by the camera. This value does not apply to line scan acquisitions.
Frame Start Asserted when a frame is being captured.
Frame Done Asserted at the end of each frame that is captured.

Note  Frame Start and Frame Done are not supported for line scan acquisitions.

Is this the reason for me not being able to get the VSYNC/Frame start pulse?
Let me know what setting I need to use to obtain VSYNC/Frame Start with this camera.

Thank you very much,
Aarthi
0 Kudos
Message 3 of 7
(4,509 Views)
Hi Aarthi -

Knowing that you have a linescan camera changes things. Smiley Happy As you've found in our documentation, there is no VSYNC signal in a linescan acquisition.  Since the camera sends only line data, only HSYNC pulses are used.  In addition, the driver merely collects the specified number of lines and builds a frame from them afterward.  Because of this, there is no actual acquisition of a frame, so there isn't a Frame Start signal either.

The only workaround I can offer is to use the HSYNC signal and tell your DAQ device to either ignore the appropriate number of pulses (999 of every 1000 pulses, for instance) or to change your synchronization timing to work with pulses that are generated 1000 times as often.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 4 of 7
(4,509 Views)
Thank you David. I changed my synchronization logic to work with the HSYNC pulses.

Regards,
Aarthi

0 Kudos
Message 5 of 7
(4,475 Views)
Hi,
 
I've been having the same problem with a linescanner and I am confused about what actually happens during a frame aquisition.
David, you say the driver collects the required number of lines. I was under the impression that the frame was built up in the frame grabbers onboard RAM? If this is the case then the it seems that it would be conceivable for the frame grabber hardware to output a signal when the buffer is  full/empty.
 
Is there any way of querying the number of lines in the buffer?
 
 
Thanks,
Mike
 
  
0 Kudos
Message 6 of 7
(4,433 Views)
HI Mike -

You're correct that building the image from acquired lines is performed in onboard memory.  When saying that the driver performs this task, I left my wording imprecise to avoid delving into details that weren't pertinent to the conversation at the time.

As said in the previous posts of this thread, the current design of our IMAQ devices doesn't generate a Frame Done signal during linescan acquisitions.  I'm not privvy to the design specs that explain why this is the case, but unfortunately the signal just isn't generated.

There's also no means of querying the board for the number of lines currently in an (onboard) acquisition buffer.  Until the frame is completely built, we don't have access to it.  However, if you have a DAQ device, you can drive the HSYNC signal to a RTSI line, read that line on your high-speed DAQ counter, and track the lines that way.
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 7 of 7
(4,426 Views)