Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69758

How to update input from DAQ assistant to formula node

$
0
0

Hi everyone. I am fairly new to both LabVIEW and programming in general so I found myself stuck with this problem.

I am trying to control the temperature of a water bath (CurrentTemp) to remain constant by continuously increasing or decreasing the thermostat temperature (SetTemp). The DesiredTemp is the user-defined temperature that the water bath should reach. Now, I have decided to use formula node for this, and the problem is that my code is working fine until I include a do-while loop, but then the program does nothing and the loop runs continuously. I am guessing I need a way to update the CurrentTemp acquired from the DAQ, but I lack programming skills in order to solve this. Please help!

int32 SetTemp=22;
do{
if(DesiredTemp>CurrentTemp)
SetTemp=SetTemp+1;
else if(DesiredTemp<CurrentTemp)
SetTemp=SetTemp-1;
else
SetTemp=SetTemp;
}while(DesiredTemp!=CurrentTemp);

Viewing all articles
Browse latest Browse all 69758

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>