04-16-2013 06:26 AM
Hello. I have spent many hours on this problem and still no result, so I am asking here.
The thing is, that I have a while loop, which gives me a different number on each iteration (measuring temperature). And I am trying to do something like this:
boolean=1 %inicitialize boolean set
while 1=1 %some while loop
if temp > 200 then
boolean=1
else
if temp < 20 then
boolean=0
else
end
So in conclusion it should change the boolean value, if the temperature step over 200 respectively 20 in other cases let the boolean be as it was.
I am good at programming, but totaly screwed with this GUI-based stuff 🙂 Thanks in advance.
04-16-2013 07:34 AM - edited 04-16-2013 07:34 AM
What have you tried?
The simplest solution would be to use a While loop with a shift register. Keep the boolean value in the shift register. Inside you loop, you read the temp value and use a case structure (wire the temp value to the case selector). Use cases "..20" (values less than 20), "200.." (values greater than 200), and "Default". In the less than 20 and greater than 200, set your boolean to the desired value. In the Default case, wire the boolean value straight through.
04-16-2013 07:44 AM
Are you totally new to LabVIEW and graphical programming?
Since you, as you said, are a good programmer, you will have no problems to learn LabVIEW. Once you have discovered and learned how to use the properly functions for each action, you will be able to improve your productivity.
About your question, I really don't understand what you want to do.
But pay attention at the Case Structures (you can make them work as a If/Else function), at the Comparison Palette and at the Boolean Palette.
I've attached some snapshots to you check where you can find these stuff mentioned above.
04-16-2013 12:51 PM
Thanks to both of you. I thought case structure operates only with true/false statement (and in this case I could not figure it out). I have not read the whole documentation, my apology. I think it should work now. Thank you again.