LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basler camera

Hi everyone,

I have attached my code here which works fine, vision acqusition and imaqe out works perfect. I am able to record a video by pressing start recording button.

The thing is after running a the vi, it opens a avi and when I press record it writes a video. But if during the running vi, I stop the recording and change the name of path file to create a new video. It is not able to do that. It will overwrite to the first one.

Additionally, I want to get date and time automtically on the name of saved video. Is it possible? 

Thanks in advance

0 Kudos
Message 1 of 3
(62 Views)

Your "AVI path" control and the "Create" node it goes into are both outside of your While loop.  That means they run once at the start and never again.

 

You'll need to change up your code to put them inside the loop, running once each time you start recording.

0 Kudos
Message 2 of 3
(40 Views)

I see that you are using an Express VI, which "hides" many of the important features of LabVIEW vision from you, and leaves you with limited control of the acquisition and processing of the images.  You seem to be using only a few parameters -- among other things, it is not clear to me (because I don't have your camera connected) what the frame rate of the camera is, and how it relates to the 80 fps for the Motion JPEG .avi file.

 

Do you want to turn the Camera on, look at Image Out for a while, then acquire Images for a period of time ("Start Recording" set True), pause the recording ("Start Recording" set False), then resume recording ("Start Recording" set True) and maybe have multiple sequences of recorded frames, with no obvious way to tell when one stops and the next starts)?

 

Think of the sequence of Events that you want to achieve, and design your code to fit that.  If you want "Continuous Video Images" (viewed in Image Out) and multiple AVI videos that are started at "Start Recording" = True and ended at "Start Recording" = False, they need to be inside the While Loop.

 

As you note, a good idea is to include Date and Time in the name of your AVI.  Are you familiar with the Timing Functions?  With them, you can create a Date/Time string (such as "3 Mar 25, 13:24:12" that can go before or after any other name you want to give the series of Videos from this particular run.

 

Bob Schor

0 Kudos
Message 3 of 3
(27 Views)