LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Static values

I'm trying to get this counter to work without an indicator. How do I do itCapture.JPG

0 Kudos
Message 1 of 3
(2,133 Views)

Use a Shift Register to hold the counter value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,117 Views)

(I am not sure why you call this thread "static Values". A value that is incremented or decremented is not static, right? If there is more to the question, try to spell it all out. What should it be used for?)

 

How would you know what the value is if there is no indicator? If the output is never used, the LabVIEW compiler might even eliminate all code as dead code.

 

As a first step, try rewriting the code without any local variables. Also remember that there is a +1 and -1 primitive. You also need an event for the stop button. Your numerics should also be blue when dealing with integers.

 

Here's how it could look like. Only one event frame is needed. The min&max keeps it nonnegative.

 

 

IncDecStop.png

 

Of course you could just use a numeric control. They have increment/decrement buttons built in. You can define the valid range (e.g. non-negative) using the "data entry ..." feature. 😄

0 Kudos
Message 3 of 3
(2,106 Views)