09-30-2009 07:32 AM
hi,
I have two buttons in a vi called as start and stop.
In start button, i have written code. so i want to call this code in stop button.
how can i do this in labview?
InAdvance Thanks
Regards
Soundarya
09-30-2009 07:43 AM
09-30-2009 07:47 AM
09-30-2009 07:49 AM
Hi Soundarya,
if you want to run the same code if you press the stop button, then you can use a property node of the start. Use the value(signaling) property to trigger the code from the start button.
Hope it helps.
Mike
09-30-2009 07:59 AM
09-30-2009 10:13 AM
Soundarya wrote:I have two buttons in a vi called as start and stop.
In start button, i have written code. so i want to call this code in stop button.
Buttons don't have code (unless you have an xcontrol).
Please clarify what you are trying to do, preferably with an example.
(If the same code should run in the start and the stop case, it simply belongs outside the case structure.)
09-30-2009 12:27 PM
10-01-2009 03:44 AM
I have used value(signalling) property. How should it get connected?
Thanks in Advance
Regards
Soundarya
10-01-2009 03:45 AM
10-01-2009 04:16 AM
Soundarya wrote:hi,
I have two buttons in a vi called as start and stop.
In start button, i have written code. so i want to call this code in stop button.
I assume that you have code inside a Case Structure connected to Start button.
If you want to call this code in Stop button also, just make it as a SubVI by selecting the piece of code inside the CS & using the menu option Edit >> Create SubVI... thats it.
But it is highly illogical & totally meaningless to have/call the same code in both the Start & Stop buttons, as their names suggest what is their respective purpose.