Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggering IMAQ camera capture via DAQmx operation

Solved!
Go to solution

Dear all,

 

I thought I might re-post this in this forum to see if I get any more insights!!

 

I am working with a PCIe-1427 board connected via link to a camera (SUI Goodrich) and am also using a PCI-6731 board to which I have attached an M-series SCC-68 connector block.

 

I have been successful in writing code for controlling .avi capture from the camera and writing separate code to control the switching of an optical switch connected to the SCC-68.

 

The two lines of the optical switch relay differing information and I wish to alternately introduce this information to the camera for analysis.  Ideally I wish to trigger the acquisition of the camera capture with the optical switching such that each frame contains information of a single channel only but I have been unsuccessful as yet in the integration of the counter DAQmx operation with the IMAQ camera code. :smileysurprised:

 

Is this possible?  I see from 1 previous post that through the use of an RTSI cable I can connect the two devices together (or alternately use the DAQmx to output a trigger on the digital lines).  Can anyone suggest information or an example on how to route signals from DAQmx via RTSI to IMAQ?  Also is there anything that I should be looking out for with regards the pulse generation to the switch which allows the signals to be passed via RTSI? 

 

I find that by running my camera and counter code in the same vi both will work (obviously not in sync) - if I connect the RTSI and select camera settings to accept RTSI triggers, should this be a simple solution?

 

I would greatly appreciate any insights you would have; my time is running out very quickly and is really distressing. :smileysad:

 

Kindest regards and thanks,

Miika

0 Kudos
Message 1 of 4
(2,431 Views)
Solution
Accepted by topic author CP Miika

Hi Miika,

 

If I understand correctly what you are trying to do in the VI you've attached, you want the counter output from the DAQ task to act as the per-buffer trig on you IMAQ task via RTSI.

 

To do this, use the DAQmx Channel property node to set the output terminal of the pulse to be RTSI 0:

A.  Select Property >> Counter Output >> Pulse >> Output Terminal

B.  Change the property node to write.

C.  Create a constant and select /Dev1/RTSI0

 

On your IMAQ Configure Trigger VI, set RTSI as the type, set the line number to 0, set the action to trigger each buffer, and set the polarity to rising edge.

 

Oh yeah, be sure to connect the RTSI ribbon cable to both boards.  I've forgotten that before, and felt really dumb later.

 

-Jeff

 

 

 

 

Message 2 of 4
(2,425 Views)

Hi Keller,

 

The code now does what I wanted it to do - many thanks for such an informative response!! :seismically:

 

Kind regards,

 

Amiga

0 Kudos
Message 3 of 4
(2,424 Views)

Apologies, it was supposed to read 'Hi kellam' Smiley Tongue

0 Kudos
Message 4 of 4
(2,423 Views)