Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to aquire synchronized shot by shot data from two oscilloscopes and a firewire camera

Hi,
 I am trying to aquire triggered data from two oscilloscopes (through a GPIB -USB interface) and a firewire camera. The data from each oscilloscope and the image from CCD has to come from the same trigger ( I need a one to one correspondence) and to be saved into different files each time the trigger occurs. The trigger signal comes at 10 Hz rep rate. Camera can save the images as bmp in real time, however, the oscilloscopes cannot save the data as fast. I need to make sure that the recording data comes from the same trigger. As a trigger source I use a four digital delay pulse generator SRS. Each oscilloscope and the camera are triggered by the different output channels of this delay box. In order, camera is triggerd first ( because it needs 2 ms to open the shutter), then the first osc. is triggered after 2ms, then the second one 2 microsecond later.  In order to make sure that the oscilloscopes finished recording data, I used a trigger holdoff of 2 seconds for each one on them and a sequence of occurences. I was thinking that I can then use set occurence for the camera to hold off saving the image until osc are done. However, if I look at the time stamps that the data files from osc are written, I cannot tell if there are coming from the same trigger.Also, i was expecting at least 2 sec time difference between consecutive timestamps, but it looks like the holdoff doesn't work. Any idea of how to address these problems?
Thank you so much.
 Andrea
PS. I attached a vi that I have written it so far.
0 Kudos
Message 1 of 4
(3,391 Views)
Sorry, I just saw that there was no vi. Trying again. Thanks
0 Kudos
Message 2 of 4
(3,387 Views)
Hello,
Your attached vi is missing alot of vi's however upon looking at your code and reading your post I am wondering
if you writting the time stamps in separate loops has something to do with your triggering appearing off.
Also why not tied some of the error lines together to ensure certain parts of your code run at the same time?

Let us know if this helps.
Christian A
National Instruments
Applications Engineer
0 Kudos
Message 3 of 4
(3,331 Views)
Hello,
 Thank you for your reply. I think that my code finally works. I put everything in a flat sequence structure, with seq. frames that initialize all the instruments ( which work in single acquisition regime), then in the next frame I froze the waveforms and the image ( basically simulate the run/stop on the osc), followed by transferring the data from the camera, and each oscilloscope. Every iteration in the loop is done in about 2 sec (100 shots acquisition takes 200-208s). I hope by using the flat sequence structure I solved the trigger problem..ie that the acquisitions are synchronized in that frame. Right now, looking at the time stamps on the data files doesn't make sense to check the synchronization, since the transferr is done one after the other.
 Is there any way to confirm on infirm that in a flat sequence, all three parralel processes will start executing at the same time? Visually, I can see that the Run/ Stop from the two osc. blinks at the same  time with the LED from the camera which indicates the triggered acquisition.
 
Thank you,
 Andrea
0 Kudos
Message 4 of 4
(3,329 Views)