LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent problem about while loop and shift register

Dear Sir/Madam

I am paul, a student using Labview 6i and Fieldpoint, has got a minor problem with using shift register.
My problem is that i want to set a constraint to make a loop activite --- when the previous temp. < Max. temp and present value > Max. Temp
then the while loop will run. However, it turns out that no matter the situation satisfy or not. The loop run. It makes me confused. i sincerely hope anymore can give me some comments or correction. Here is my program and i look forward to your reply as it is urgent.

Thank you very much for your attention
Best Regards
paul wl choi
Download All
0 Kudos
Message 1 of 3
(2,269 Views)
Hi,
if you speak about the loop which is connected to "4" and "H4" double variables then I think that your problem is in understanding of how the while loop works.
The while loop is the loop with "post condition", I mean that it runs at least one time. This loop checks the condition after the execution of iteration. Even if your condition is false the loop executes the iteration, then checks the condition and then stops. I think that you are in this situation.
To solve this you just need to insert the case structure inside the loop. You have to check the condition in the loop and execute the operation only if condition connected to the case structure is satisfied.

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 3
(2,269 Views)
You will have to use a case(true or false) structure inside the while loop. To simplifing your diagram, you could use arrays as oppose to scalar.This would also help if you would like to apply your while loop condition on your 8 inputs. Hope this help.

http://labviewtraining.netfirms.com/
0 Kudos
Message 3 of 3
(2,269 Views)