11-14-2009 11:15 AM
In VB, a button can be able to exucute a task or command once when pressed, in other words, we can NOT hold down this button as in the following case:
Command1_Click()
text3 = text1 + text2
Note,that if the form is still running and yo add new numbers to text1 and text2, text3 isn't updated unless Command button is pressed once again.
Unfortunately in LabVIEW, the only buttons I know are boolean, they seem to be held down when pressed or latched, sothat when new numbers are inserted in the numeric controls, and mouse is pressed anywhere on the front panel (when vi runs) the indicator is automatically updated.
So is there any execute once buttons??
Solved! Go to Solution.
11-14-2009 11:23 AM
It is a bit difficult to understand the problem, maybe you can post some LV code that does not work as desired.
I guess that you do the following mistake: you do not read the terminal of the button. If a button (mechanical action) is set to 'Latch when released' (default), as soon as you read the terminal it snaps back.
Felix
11-14-2009 11:30 AM
11-14-2009 01:41 PM
Well the VB code you post is a Event Triggered code, you can use the same in LabVIEW with the event structure.
The concatenation of strings can be put inside the event case and will only execute when the button is pressed.
Ton