02-06-2012 08:52 AM
I've run into a problem and I'm not sure of the source. I'm developing a program that reads, displays, and writes thermocouple readings at different rates. I'm using the producer-consumer architecture and while the sample rate will not be an option, the refresh rate of the chart that displays some of the temperatures will be controlled by the user. I've been working with the attached example trying to understand where the problem lies with no luck. The consumer loop is set to wait 2 seconds which I can tell it does but the x-axis still counts every second. How do I sample from the producer loop and have the correct time and temperature displayed by the chart in the consumer loop?
Thanks.
02-07-2012 08:07 PM