Hi verdurin,
To elaborate further on what altenbach said about a parallel loop with controlling your shutter, I have attached a sample VI.
On the front panel you can set the time to record for ("recording" will take place throughout the program's execution), a delay to open the shutter and then a duration for the shutter to be open (all in ms).
In the block diagram, one loop records video (you can insert your own code into the top loop to do this) while the bottom loop moves through different states in a state machine (see comments in the block diagram for more information on this). When the recording time elapses, the program terminates.
I hope this is suitable for your application!
Regards,
Tom
Applications Engineering, NI UK