LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to End a VI Sequence

Solved!
Go to solution

Hi. I am fairly new with Labview and I need help regarding my sequence. As you can see from the attachment, i was able to ramp up the voltage from an initial value to a target value using a predetermined step rate. What I am unable to do was to make this sequence run one time only. The program keeps repeating itself every time the ramp sequence is completed. 

 

I know this is possible with a "while" or a "for" loop structure but i am not yet sure how to implement this in my VI.

 

Ramp Voltage.pngScope.png

Download All
0 Kudos
Message 1 of 4
(3,164 Views)
Solution
Accepted by topic author ronermendoza

The program runs continuously, are you pressing the 'run continuously' button or the 'run' button to the left of it?

Its best to check the simple things first! The way the program is written I don't see how it would cycle unless you have a larger loop around the code in the snippet or are pressing run continuously.

CLA - Kudos is how we show our appreciation for comments that helped us!
0 Kudos
Message 2 of 4
(3,159 Views)

Yes, you are correct about the run continuously button. Thanks!

0 Kudos
Message 3 of 4
(3,142 Views)

Did you press continuous run (arrows in a circle)? That would run the VI until you stop it. Press the normal run (single arrow) and the VI will run once.

 

A while loop would actually implement this behaviour (loop until stopped). This would be a better way to do it (over continuous run), since stopping the while loop would be a controlled stop. Pressing stop will stop immediately, and might leave communication in an undefined state.

 

If you want to stop in the middle of the sequence, you need a slightly fancier solution, but I don't think that's what your asking (Occam's razor, the simplest solution is most likely right) .

0 Kudos
Message 4 of 4
(3,132 Views)