LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Button behavior in LV 7

I am using LV 7 to run vi's created in LV 6. On these vi's I have buttons configured as normally open momentary. When I run the vis in LV 7 and the buttons are clicked, their behavior is changed to normally closed momentary. I have to exit the vi and manually change the button behavior back. I replace the buttons with LV 7 buttons, but the behavior is the same. Any ideas?

Bill F
0 Kudos
Message 1 of 6
(3,216 Views)
Normally opened, normally closed...do you mean that the button has a default value...? If so then just set the default value you want (true/false / open/closed), and then right click on the button and select data operations -> make current value default...and save the VI.

If you mean that the buttons are fixed in one position that is the mechanical action property...right click on the button and select the mechanical behaviour you want...switch (will stay in position until clicked again) or latch (will pop back to the default value as soon as it has been read).
0 Kudos
Message 2 of 6
(3,216 Views)
The buttons are set to "Switch until released" - mouse down - changes to true, mouse up - changes back to false. The buttons have a default value of false (not switched). What happens is, when the buttons are clicked, their default value changes to true ie they stay in the switched state even after they are released. After closing the vi, I change the default value back to false, and make the current value the default, and save the vi. When I run the vi again and click the button, it changes to a default value of true (ie the button stays in its switched state even after I release it). So basically, the buttons reverse their normal logic when they are clicked. I hope this is clear 🙂

Bill F
0 Kudos
Message 3 of 6
(3,216 Views)
"bfarley" wrote in message
news:50650000000800000092980000-1042324653000@exchange.ni.com...
> I am using LV 7 to run vi's created in LV 6. On these vi's I have
> buttons configured as normally open momentary. When I run the vis in
> LV 7 and the buttons are clicked, their behavior is changed to
> normally closed momentary. I have to exit the vi and manually change
> the button behavior back. I replace the buttons with LV 7 buttons,
> but the behavior is the same. Any ideas?

I've had the same behavior on a VI created in LV 6.1. I thought it was
because the buttons were monitored with an event structure.

Are yours using any of the event functions also by any chance? I never
tracked down this problem yet; I've been busy with other problems, and
d
idn't want to go bug-chasing just yet.

-joey
0 Kudos
Message 4 of 6
(3,216 Views)
I'm not using an event structure. The code is straight out of LV 6

Bill F
0 Kudos
Message 5 of 6
(3,216 Views)
Could you post it here? I'll have a look and see if there's anything I can find out...
0 Kudos
Message 6 of 6
(3,216 Views)