LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Improvment of the webcam lagging problem

Dear all,
 
I have made a program to monitor and analysis a system. Based on the many funcitons, there are many "while loop" and "For loop" inside my program. I also installed a USB Webcam to monitor of my system. By my test, the system need use arround 0.8 second to run each period. However, the webcam program only could updata image with 0.8 to 1 second each time which providing a lag performance. 

Can this problem be solved?? I am a new labvew user so maybe i don't know some methods which can solved thhis problem. Would anyone can help me?

Additional Question: With my know, The processing method of Labview program is step by step which look like C++. Can the program run at the same time with dfferent procedure?

Thank you you all fistly ^^!

Kim
0 Kudos
Message 1 of 2
(2,585 Views)
Hi Kim,

LabVIEW follows a dataflow programming system, meaning that a VI will execute as soon as it has received all of its necessary inputs.  This means that if you place two while loops inside of a VI, and there are no wires connecting them, they will run concurrently.

If you want to update your webcam image at a specific framerate, you should keep it as an independent loop in your VI.  You should be able to use a Grab function in your while loop to acquire at the desired framerate.  I have attached a screen shot of the code you would use to do this.




I hope this helps.


Rishee B.
Applications Engineer
National Instruments






Message Edited by risheeb on 01-21-2008 12:18 PM
0 Kudos
Message 2 of 2
(2,559 Views)