LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

count counter counting mechanism

Hi, I'm running into a dilemma. I'm trying to create a counter using labview. It is done without the use of any external hardware purposes.

I created a press button that when each time you press it, the display shows starting at 1 will increment to 2, press it again then 3, again then 4. Press the second button and it decrements. I try using the increment and decrement device but I don't know how to store and reuse the value. I can't figure out what controller device to use to do this.

Here is an attachment of the vi.

Thanks in advance,

Joe
0 Kudos
Message 1 of 6
(2,614 Views)
Joe,

I am not exactly sure what you are trying to accomplish here, but let me take a stab at it: it seems that you are trying to output a value based on an increment/decrement via user interface. I haven't sat down and built a logic table, but I suspect I don't have to. It seems to me that the core of your problem is that you are trying to figure out how to store your count.

If in fact that is your question, then I would offer a shift register as the solution to your problem. Depending on how your interface works (I wasn't sure if the VI you posted was the user interface or not) you would need a loop that iterates once (if the VI is called) or runs continous (if the VI is the UI). You would store your count in a shift register, with logic that e
ither increments, decrements, or doesn't change it, based on the input.

Please let me know if this is the direction you are looking for. If not, please elaborate a bit.

Good luck
0 Kudos
Message 2 of 6
(2,614 Views)
Find attached a frame work that I've used to accomplish similar task. Please note that it's only the TRUE case of the first button that is activated.
0 Kudos
Message 3 of 6
(2,614 Views)
notsure wrote:

> Hi, I'm running into a dilemma. I'm trying to create a counter using
> labview. It is done without the use of any external hardware purposes.
>
> I created a press button that when each time you press it, the display
> shows starting at 1 will increment to 2, press it again then 3, again
> then 4. Press the second button and it decrements. I try using the
> increment and decrement device but I don't know how to store and reuse
> the value. I can't figure out what controller device to use to do
> this.
>
> Here is an attachment of the vi.
>
> Thanks in advance,
>
> Joe

################

Hi Jo,
for shure or not :))
Try this one. Does it fit your needs?

Ciao,
Rainer
Message 4 of 6
(2,614 Views)
.
Forgive me if I state the obvious but can't you use the increment/decrement arrows builtin any numeric control?
In the control editor you can replace their pictures to fit your needs and mask the numeric display under a transparent decoration to prevent the user to enter numbers directly.


LabVIEW, C'est LabVIEW

Message 5 of 6
(2,614 Views)
Wow! That's it, it work!


Thank you very much to all of you!

Joe
0 Kudos
Message 6 of 6
(2,614 Views)