04-13-2012 02:38 AM
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. Please see the attached code.
Miika
This site uses cookies to offer you a better browsing experience. Learn more about our privacy statement and cookie policy.