Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronized IMAQ and DAQ Analog Input acquisition

Hi all,

 

I'm trying to simultaneously acquire images from a linescan camera connected through an NI-1433 framegrabber and make synchronised measurements from an analog input on an NI-6351 DAQ card.

The light falling on the camera is modulated at 50 kHz and this modulation is physically connected to the voltage being measured (i.e. there is no uncertainty that the two measurements should be linked together).

 

The camera line rate and DAQ card sampling frequency are both referenced to a common external 100 kHz and both correctly sample at 100 kHz.

 

The frame grabber buffer (at my chosen resolution and bit depth) is 500 lines and I want to synchronise grabbing a buffer of 500 lines from the camera and a corresponding 500 samples from an analog input on the DAQ card.

 

To achieve this I'm setting up a 100 Hz counter output from the DAQ card across RTSI and telling both the framegrabber and DAQ card to start their acquisition of 500 measurements on detection of this RTSI clock. 

 

I've verified that both the framegrabber and DAQ card depend on the RTSI pulse by switching the triggering channels for each to different RTSI channels independently and looking for the acquisitions to timeout. 

 

Both the DAQ card and camera run at 100 kHz and successfully detect the 50kHz modulation but the they are not synchronised in time.

 

I feel like I'm close but might be missing some crucial aspect of VI order/design pattern for getting these synced. Any advice would be greatly appreciated! 

 

Attached it the code and a couple of screenshots.

 

Thanks

 

Matt

0 Kudos
Message 1 of 1
(764 Views)