06-26-2012 06:11 PM
Can anyone help me please?
I have been trying to stream a live webcam from my control room while runing a realtime clock.
I am atatching what I have done so far.
I can't seems to get the clock to run properly while streaming the live video.
I think this coding seems to taking up a lot of processing power.
can this be achieved with minimal processing power?
Thanks.
Vis
06-26-2012 06:25 PM
The clock and the capture are in the same loop. Place the clock in a separate loop and it will run in parallel (meaning the clock can update faster than the video). Additionally, if you place the clock in an event structure, you can use the "timeout" case to make the clock update at whatever interval (in milli-seconds) you would like.
Charles
06-26-2012 06:43 PM
Hello Charles,
Thanks for getting with a solution, Just wondering if you can elaborate please?
Thanks very much.
Vis
06-26-2012 08:15 PM
06-26-2012 10:38 PM
Here is the code that I came up with. A few comments:
I removed the stacked sequence structures, most people in the LabVIEW community consider these to be evil.
I removed the timed loop and the event structure within it
I added an addition while loop in parallel, this loop uses an event structure with the timeout set to 1 second, in the timeout case the clock is updated
The one remaining "Stop" control has been set to "Switch when released". This allows the event structure in the clock loop to fire an event for the "value change" while the original loops looks for a "True" condition to stop it.
I added local variables to initialize "Stop" to false and to set it to false upon a proper completion of code.
The code on my machine prompts a popup box to select the camera settings every time through the loop at the DLL call immediately outside the 0,1 case structure. I left it as is assuming you have that part under control.
Please let me know if I can be of further assistance.
Charles
06-27-2012 03:15 AM
Hello Charles,
I couldn't see a thing.
I only have v.8.5
Can you please save it on earlier version as a backward combatible.
Many thanks,
Vis
06-27-2012 08:15 AM
Here's the 8.5 version.
Charles