Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Simple Calculation (http://www.chiefdelphi.com/forums/showthread.php?t=102072)

ChiefDJ 05-02-2012 23:39

Simple Calculation
 
I was wondering how to make simple calculations in labview. For example, have 5+5 run continuously until it reaches a certain number such as 40. I tried a while loop but it doesn't run continuously. Any suggestions?

Alan Anderson 06-02-2012 00:15

Re: Simple Calculation
 
No matter how many times you compute 5+5, the answer will never be 40.

While loops can be configured to run either as long as the "continue" condition is true, or until the "stop" condition is true.

Can you describe what you're trying to accomplish? The way you're asking the question doesn't seem to lend itself to a useful answer.

live4321 06-02-2012 09:29

Re: Simple Calculation
 
Do you mean something like having X+5=X in a loop?

Joe Ross 06-02-2012 12:57

Re: Simple Calculation
 
The trick is that you don't want to add 5 and 5 together repeatedly, becasue the answer is always 10. You want to add 5 to the result of the previous calculation. To do this you need to remember the previous calculation. In LabVIEW, there are two structures that remember a value from a previous loop, they are a feedback node and a shift register.

If you use one of those, you should be able to get it to count to 40.


All times are GMT -5. The time now is 11:43.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi