LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make an Event Structure work with a webcam feed?

Hello,

 

I'm pretty new to LabVIEW, and I really need some help on a school project.

 

In the program, a webcam contantly streams video.  At the same time, I am trying to add an event structure inside of the while loop that contains the webcam information.  An event structure seems to be just the thing I need to add to make my program work, but after adding it, the webcam stopped showing its feed.  My guess is that it's specifically not working with the webcam part, because I've used event structure inside of while loops before.  How can I prevent the event structure from interfering with the webcam?

 

I cannot take a screenshot of the back panel at this time, although I can do it within the next 24 hours, if necessary.  Otherwise, I can try to describe the program to the best of my ability.

0 Kudos
Message 1 of 4
(2,912 Views)

i did this a while back for my school project.

see if its what you need

 

Best regards,
Krispiekream
0 Kudos
Message 2 of 4
(2,902 Views)

Back Panel?  I like it, kind of catchy.  I suppose that is the opposite of Front Panel.  We tend to call it a Block Diagram.

 

As to your problem, sorry I can't help much without a few more details, or a screenshot.  What often works even better is to attach your VI (within reason).

0 Kudos
Message 3 of 4
(2,900 Views)

Chances are, you are trying to run one while loop with the event structure inside the while loop.  There are two things that you can do, first, you can have two parallel while loops running.  One will be the code of your webcam, and the other has the event structure in it.  The second thing you can try is placing your webcam code inside of the event structure under the "timeout" case.  Set the timeout to a value that won't conflict with yout camera's rate.

 

If you need further assistance, please include a screenshot, or your code.  Thanks,

 

-Scott Wiest

National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(2,864 Views)