‎06-08-2011 02:06 PM - edited ‎06-08-2011 02:07 PM
Hello!
I have a producer/consumer loop LabVIEW program setup to allow me to properly capture images that are quite large (8MP) at approximately 14 frames per second (FPS). The program works great when the consumer loop is a 'while loop' (records at 14fps no problem), but I wanted to make it into a timed loop, so that I may vary the FPS as required. An oddity arises when I do this. Anywhere below 12fps, the loop works fine and the data is recorded properly. However, when I bump it up to 13fps, the consumer calculated FPS goes haywire and starts jumping between ~9 and ~13fps (data processing gets bogged?). When I set the required FPS to 14, the loop executes at a steady 7FPS maximum. Is there something I can do to rectify this situation?
I have attached my .VI
Thanks in advance!
Solved! Go to Solution.
‎06-09-2011 10:39 AM
Palanski,
Are you using LabVIEW Real-Time? Timed loops in a windows OS don't really increase determinism more than a while loop with a wait until next multiple timer. Before you changed the producer consumer loop to include a while loop was the programming running correctly? You may also want to vuse the VI analyizer to see how long things are taking to run. I would leave the producer consumer loop in the traditional set up and change the FPS by controlling the wait timer, after benchmarking your code this should be done the same way as you have it for the timed loop 🙂
‎06-09-2011 10:54 AM
Yes, I am using it in real-time. Your 'wait until next' solution looks to have alleviated most of my symptoms, although the execution of the consumer loop is still lagging behind the producer loop by about .25FPS. I will try benchmarking to see where the bottleneck is occuring.
Thank you so much!
‎06-09-2011 12:40 PM
No problem glad to help
‎06-09-2011 01:42 PM
Just realized my institution doesn't have the VI Analyzer. Is there any other way of getting information that would be helpful to me?
‎06-09-2011 04:33 PM
Palanski,
It would depend on the data you are trying to collect. But for the sake of keeping our forums up to date you may want to make a new forum 🙂
If you have the Real-Time moduleyou can use the built in example under Toolkits and modules>Real-Time > Benchmarking project
for just LabVIEW code you can look at using a comparison of get time and date in seconds reading 🙂