LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

my start/stopp- button doesn't work

Hello,
in the attached "stimulation.vi" I've a start/stopp-button on the front panel. The problem is that the button is indeed able to stopp the run but it isn't able to start it again.I hope anybody can help me. I don't understand why the loop don't starts when I press the button.
Thank you!!!
0 Kudos
Message 1 of 4
(2,922 Views)

The button will stop the loop only. Once a loop has been stopped the only way to restart it is to re-enter it from outside the loop. You might accomplish this by putting it inside a larger loop, inside a case statement that defaults to another non-running state until your "start button" causes the state with the loop to run. Make sure that you have "wait" timers in them as a loop without a timer will try and execute at the max rate taking ~100% CPU.

 

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(2,915 Views)
Well... how shall I put it...

First your VI is not esaly readable, I recommand you should try to "clean it a bit.
If you do so, it will be a lot easier to find out what the problem is.
The first rule I learnt when I started using LabVIEW is "the size of the diagram must not to exceed the size a the monitor"

Second, your stop button is read only once and the last while loop (the one inside of the for loop) won't be stopped by the button, that's why you think it is not running.
Then, if you eventualy get out of that while loop (this can happen on the first condition : reslut less than zero), after you click your button stop button once, the main while loop "stops" and the only thing that keeps running is the clock, so you think your button is ignored, but in fact it is just that the loop is off and won't restart unless you restart the VI.

I really don't want to offend you, but this VI proves that you are beginning in G-programming.
If you need that program to work, ask for some help to somebody who knows a bit about LabVIEW programming.

"Tell me what you want this VI to do, I'll give you some advice on how to develop it"

Best regards,

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 3 of 4
(2,906 Views)

Maybe it would help if you attended a LabVIEW training at NI. Here you can find the course descriptions and dates for NI trainings courses in Germany. Please don't take this advise as an offence but as a well-meant suggestion.

Best regards,

Jochen Klier
National Instruments Germany

Message 4 of 4
(2,870 Views)