LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple timed events

I need to write a VI that starts a video capture, then opens a shutter after a set time period, closes the shutter after a different set time period, all the while capturing video for a set duration.

At the moment I have a while loop with a countdown timer that covers the overall video capture, but I'm having difficulty fitting in the two shutter events.

Would it be better to use a synchronized time structure for this?
0 Kudos
Message 1 of 7
(3,436 Views)
Maybe you can do the shutter operations in an independent parallel loop?
0 Kudos
Message 2 of 7
(3,435 Views)
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
0 Kudos
Message 3 of 7
(3,406 Views)
Tom,

Don't mean to sound ungrateful but could you attach a version compatible with LabView 8.2.1, as that's what I'm running here?

Thanks a lot,
Adam
0 Kudos
Message 4 of 7
(3,391 Views)
Hi verdurin,

Sorry about that, I should have done so in the first place! Let me know if you have any other trouble with this.

Regards,
Tom

Applications Engineering, NI UK
0 Kudos
Message 5 of 7
(3,387 Views)
Tom,

That's great, thanks.  The only problem is that it stops when the shutter closes, whereas we need the video capture to continue after that.  Would I just need to add a new state after the "Close" one?

Cheers,
Adam
0 Kudos
Message 6 of 7
(3,378 Views)
Sorry - ignore that.  It's doing just what I wanted.

Thanks a lot.

Adam
0 Kudos
Message 7 of 7
(3,374 Views)