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?

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.

Do you mean something like having X+5=X in a loop?

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.