LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

button listener

I modified Dan's button listener program to have buttons DELETE, DELETE ALL, and ADD ALL. There is a bug in that if you hit buttons A, B, and C before you hit DELETE, DELETE ALL, and ADD ALL, the program adds A, B, and C to the output of DELETE, DELETE ALL, and ADD ALL. Is there a way to fix this so that when the user hit A, B, or C and then hit DELETE, or DELETE ALL, or ADD ALL, it will only do the corresponding functions and forget about A, B, and C? I tried to do two event structures, one with the INSERT button and buttons A, B, C; and the other event structure with buttons DELETE, DELETE ALL, and ADD ALL, but this doesnt seem to work. Thanks.
0 Kudos
Message 11 of 16
(984 Views)
I figured it out :-P, just add another shift register to the while loop and let that shift register keep track of the A, B, and C buttons while the original shift register keep track of INSERT, DELETE, DELETE ALL, and ADD ALL 🙂
0 Kudos
Message 12 of 16
(984 Views)
just FYI, 2 event structures in the 1 while loop is not recommended....if
you wanted to trigger another event in sequence, then you can dynamically
call events....

Regis

"analog" wrote in message
news:506500000005000000D7350100-1066448259000@exchange.ni.com...
> I modified Dan's button listener program to have buttons DELETE,
> DELETE ALL, and ADD ALL. There is a bug in that if you hit buttons A,
> B, and C before you hit DELETE, DELETE ALL, and ADD ALL, the program
> adds A, B, and C to the output of DELETE, DELETE ALL, and ADD ALL. Is
> there a way to fix this so that when the user hit A, B, or C and then
> hit DELETE, or DELETE ALL, or ADD ALL, it will only do the
> corresponding f
unctions and forget about A, B, and C? I tried to do
> two event structures, one with the INSERT button and buttons A, B, C;
> and the other event structure with buttons DELETE, DELETE ALL, and ADD
> ALL, but this doesnt seem to work. Thanks.
0 Kudos
Message 13 of 16
(984 Views)
Excellent thread! Can somebody convert these vi's to 6.0.2 for me?
Richard






0 Kudos
Message 14 of 16
(984 Views)
These vi's utilize Event Structures which are only available in LV 6.1 and
above...

regis


"Broken Arrow" wrote in message
news:50650000000500000004360100-1066448259000@exchange.ni.com...
> Excellent thread! Can somebody convert these vi's to 6.0.2 for me?
0 Kudos
Message 15 of 16
(984 Views)
Doh!
Richard






0 Kudos
Message 16 of 16
(984 Views)