LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

producer consumer control of temperature

Hello Everyone

 

Im using a DAQ 6008, and Labview 8.5 to achieve the following outcome:

measure the temperature across a heater bank, compare the temperature to set point, using PID, output a analog value - (0 -5) this then is used to control the duty cycle of pwm output in labview (pwm vi)

 

 I previously tried to write this all into 1 while loop, however due to the slow duty cycle required (1hz) for my output, and the fast sampling of the input I got a 200279 error.

After reading many forums, I have now converted this to a producer consumer loop. Where the Producer loop, reads the temp, and PID produces an output, it outputs the result to the consumer loop, to create the duty cycle of my pwm output.

 

I have a question about the queuing data: My worry is that "old duty" cycle values will be building up in the queue, resulting in a old duty cycles for the pwm output, which do not correspond to the latest as possible temperature - resulting in a unstable control.

 

Was hoping some one would be able to clarify this ?

 

Thanks/ Dankie

0 Kudos
Message 1 of 3
(2,231 Views)

If you only want the latest data, use a notifier instead.  The notifier can only store a single value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,211 Views)

Thank you for your response. I used the notifier example in labview, and it seems to work. (that is no more error) my PID appilcation of the heater is a little bit slow, but ill work on it. 

 

Thanks for the help

0 Kudos
Message 3 of 3
(2,171 Views)