LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

State machine for temperature control

Hi!

 

Recently ive just created a labview program to control temperature of a temperature chamber. But I cant seem to make this one case work.

 

So, I want my heater (thermocouple 0, CH0) to make sure that it doesnt rise above 40 degrees while at the same time make sure that the water (thermocouple 3, CH3) in the chamber does not rise above 30 degrees. There is this case whereby if my temperature of heater has not risen above 40 yet but my water has already reached 30, I would want the heater to off. However, it will just stay on the entire time until the heater has risen above 40 and then it will off. I noticed there is this error under "compare temperature" (state machine) but im not sure how to edit it. 
Please help!

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

Hi Shalalas,

Unfortunately we are not able to run your VI due to missing subVI's and undefined enum. So you better share your entire project in a zip file. And than let us see what you are missing.

Add 273 on whatever Celcius said.
-Kelvin
0 Kudos
Message 2 of 3
(2,349 Views)

Hi Shalalas,

 

So, I want my heater (thermocouple 0, CH0) to make sure that it doesnt rise above 40 degrees while at the same time make sure that the water (thermocouple 3, CH3) in the chamber does not rise above 30 degrees. There is this case whereby if my temperature of heater has not risen above 40 yet but my water has already reached 30, I would want the heater to off. However, it will just stay on the entire time until the heater has risen above 40 and then it will off. I noticed there is this error under "compare temperature" (state machine) but im not sure how to edit it. 

- The states "on heater" and "off heater" differ just by their input values: why not join both states to "switch heater" with some input values? No need for local variables…

- why do you create the "Temperature" array in state "acquire temp" this convoluted? Why not use a simple BuildArray with just one input? Why adding an empty array followed by ArraySubset?

- When you want to prevent temperatures rise above a certain limit you should check them both with "greater or equal". Right now one of them is checked for "less or equal"…

- What's the goal of your temperature control? Is it just "heat as much as possible, but prevent certain temp limits"? That might be hard to reach because of delays and thermal inertia in your system…

- Right now your loop will stop on error: I don't think that's a good idea when the heater might be switched on…

 

Please help!

You should ask specific questions - not just write down your wishes/requirements ("I want…")!

Otherwise the answer is always: "Program according to your requirements!"

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,343 Views)