giles,
I have a suggestion, but I only have time to be brief right now. The key to timing precision is to use the output from one of your DAQ board's Counter/Timers instead of using digital I/O.
1. Outside your main loop, configure a finite AI task and a triggered single pulse Counter task. The trigger signal for the Counter task should be the AI sample clock. You should also define the delay time and pulse time here.
2. When the user presses the button on screen, start the Counter task first and then the AI task.
3. When the AI task finishes collecting all its data, stop it and stop the Counter task as well.
4. On each user button press, steps 2 & 3 will happen with very repeatable relative timing between the AI waveform and the "Shutter open" pulse signal.
5. After the main loop ends, don't forget to clear the AI and Counter tasks!
Hope this helps get you started. There's more info on Counters in the online help, examples, and here at ni.com.
-Kevin P.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).