LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone help me? Trigger camera acquisition​n with RTSI connection

Hi all,

 

I've posted this in two other forums now and have gotten no responses so here's my last try.

 

I am having sync issues with my code.  I wish to generate a certain number of samples - these correspond to raster scanning mirror positions.  However, I also have a optical switch (PCI-6731) and camera (PCIe-1427) in the code.  For each mirror position, I want to switch my optical switch and capture a camera frame.  Seems simple enough but in practice it's proving frustrating!!

 

In an effort to sync everything, I outputted the CO.Pulse.Term to

(1) RTSI0 channel (camera) and to

(2) Ctr0Out which my switch is connected to. 

 

I have used the IMAQ Generate Pulse.vi to trigger the camera.  I know that my board does not have an RTSI frame trigger so in MAX I set Trigger Mode to 1 (Internal), Trigger Source to CC1, I have unticked the CC Lines source box and CC1 is set to External trigger 0.  I connected my two boards with an RTSI cable. 

 

Originally, I was grabbing triggered images and putting them in a folder but they were completely out of sync with the switch and took a long time to capture.  I decided to grab the frames and save them to .avi instead and then split the frames afterwards.  But I am still having sync issues.  I tried to put in the IMAQ ConfigureTrigger3.vi to configure the action to trigger each buffer but I kept getting timeout errors so I removed it.  The .avi capture is within a while loop, set to stop when is equal to the number of original samples (i.e. positions) I set.

 

Why is there a sync issue with the switch and camera acquisition if both are determined by the same sample clock rate?  Does anyone have any insights?? Apologies for all the cross posting but I am desperate to get this up and running. Smiley Sad  Please see the attached code.

 

Miika

0 Kudos
Message 1 of 1
(1,507 Views)