WillUpdate
WillUpdate

Reputation: 53

How to modify an output value in LabVIEW?

enter image description hereI am very new to LabVIEW and what I want is to know if it's possible to modify an indicator. I have a loop, and in every iteration I want to add a new value (given by the user via a control) to that string indicator, and to display it? I tried many ways, but since it is an output none of them worked. Is it possible to do that? Thank you.

I have also tried using a feedback node, but I think this somehow gives me an infinite loop. enter image description here

Upvotes: 0

Views: 410

Answers (2)

nekomatic
nekomatic

Reputation: 6284

To keep a running total - or similar value - in a loop, use a shift register.

VI snippet with shift register

This is just a minimal example in which the loop repeats every second until you click the stop button, but you can adapt it to how you want the control flow to work.

Upvotes: 0

Steve
Steve

Reputation: 1018

In LabVIEW, an indicators state will be updated every time that it receives a new value.

Loop indicating how wiring into a variable means that it generates an updated display value

By far the easiest way to do this is to simply run a data-flow wire into an indicator terminal. Beyond that you have local variables, and property nodes which add additional concerns.

In your case it looks more to be an issue with the logic associated with your display update than with your actual updating of the value. (Additionally, why are you using a string display to indicate a numeric value? Using a numeric suddenly simplifies all of your logic.)

Upvotes: 3

Related Questions