LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

push button labview program

hi every body

i need help in my attachement program

the question is to

 

Modify the logic so that the program is executed using the ‘RUN’ button only

in the beginning and then the STOP button from the program should be used

for flow control. This means that once the program has been started using

‘RUN’ button, the push button should be able to make the execution stop.

Now if the same push button is pressed again the program should resume

without having to use the ‘RUN’ button again.

 

please i need help

my labVIEW is 8.2 and i can't open 8.5

thank you very much

0 Kudos
Message 1 of 7
(4,713 Views)

The VI you posted is in 8.2.1 which you can open in 8.2.

 

As for the question ... seems awfully like a homework problem to me.  What exactly is your question?

0 Kudos
Message 2 of 7
(4,706 Views)
yes i can open this file it is the first part of my homework and the second part i can't solve it and i need help in it
0 Kudos
Message 3 of 7
(4,686 Views)

sara1986 wrote:
yes i can open this file it is the first part of my homework and the second part i can't solve it and i need help in it

If you want help and not to be simply ignored (no one here is about to do your homework for you) please tell us what exactly you are having trouble with and what you have tried to do to solve the problem. I am sure we will be more than happy to help you by answering specific questions.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 7
(4,683 Views)

i didinot say solve my homework

i just want some idea if you have

 

my question is how to make the same button act as start and stop

 

 

 

0 Kudos
Message 5 of 7
(4,649 Views)

By the 'run button' do you mean the white arrow at the top left?

 

If so, you cannot do what you are asking, as the push button will stop your program. 

 

For getting a start and stop algorithm, I would suggest looking into an events structure. 

Message Edited by yenknip on 03-03-2010 11:07 AM
_____________________________
- Cheers, Ed
0 Kudos
Message 6 of 7
(4,643 Views)

sara1986 wrote:

i didinot say solve my homework

i just want some idea if you have

 

my question is how to make the same button act as start and stop


By "the same button" I'm assuming you're referring to the button that's currently on the front panel. Let's examine what you have. There are two different run conditions. The run button in the toolbar starts the overall VI. The VI executes whatever code is in the block diagram. If there's a loop then it continues to run the loop until the condition to stop the loop is met. Whatever is inside the loop runs each time the loop iterates. What's happening now? Well, each time the loop runs it:

  1. generates a random number,
  2. does some calculations,
  3. waits a set amount of time,
  4. and checks to see if the button's value is True.

The one button that's on there now is used to control whether the loop should stop. So, how would you control whether to perform steps 1-3?

 

I think that's a big enough hint for you, don't you? Smiley Wink

0 Kudos
Message 7 of 7
(4,616 Views)