LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to wait for process variable to reach setpoint before moving on?

Hello all,

 

I have added my own code (you can see it in the image, its the case structure and the things connected to it) to a given VI from the maker of my controller. The purpose of this program is to ramp up temperature by steps, wait at the top until told to continue, then ramping down by the same step. The part I am stuck on is that I also need the program to wait for the ACTUAL temperature to reach the setpoint before the program gives it the next setpoint. At the moment, the program is increasing the setpoint rapidly without waiting for the process variable to reach the setpoint, not to mention the fact that this process will not work when ramping down. 

 

snip12_7.JPG

the right-most red circle is where the process variable (temperature) is called, the upper most red circle is where I am currently stuck. The right-most red circle is where the setpoint is called. 

Download All
0 Kudos
Message 1 of 3
(727 Views)

Make it into a better state machine with better defined states.

 

What are the current states, I can only see "start" and "ramp up". Is there a state for "wait for setpoint", for example?

 

(sorry, I cannot see your VI, no LV2021 here. Consider "save for previous" before attaching. Toplevel VI is sufficient. We don't need the drivers).

0 Kudos
Message 2 of 3
(717 Views)

What are the current states, I can only see "start" and "ramp up". Is there a state for "wait for setpoint", for example?

"Wait for setpoint" is exactly what I am struggling to add to each of the states (or, if possible, outside the case structure). 

 

My apologies, I get an error thrown when trying to save for previous version saying the destination path is too long. Hopefully the attached images are not too clunkly to make sense of. start.JPGramp up.JPGdwell.JPGramp down.JPGstop.JPG

0 Kudos
Message 3 of 3
(706 Views)