LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

global stop

Solved!
Go to solution
Solution
Accepted by topic author stefvg

Here is the event structure example..

 

Have a look at the code.  It may be easier for me to answer any questions that you may have instead of providing detailed explanations about how it was done.

 

To get you started however, the way to create a reference is to right click the boolean indicator and select create reference.  The reason for using a boolean indicator instead of a button control reference is because the mechanical latch selection may cause headaches and code complication as well as potential race condition.

 

Run the example and let me know if this is the type of behavior (stopping a sub-vi with the main vi button) that you were looking for.

 

R

 

Message 11 of 23
(2,730 Views)

Hi there, thanx for all the information and help you guys offered me. The program now works exactly like i wanted it to work.

 

Best Regards

 

Stefvg

0 Kudos
Message 12 of 23
(2,705 Views)
Glad that it helped
0 Kudos
Message 13 of 23
(2,686 Views)

Hi Ray.R,

 

I'm having the same problem but since I'm working with LabVIEW 8.0, I'm not able to open the attached solution. Could you please convert them to 8.0?

It would be great help!!

 

Thanks a lot!

 

hazibuli

0 Kudos
Message 14 of 23
(2,385 Views)

Hey,

 

Normally this should work for you.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
Message 15 of 23
(2,358 Views)

Many thanks Thierry,

 

it works fine.

 

Bye,

 

hazibuli

0 Kudos
Message 16 of 23
(2,350 Views)

Hello,

 

I am trying to do a global on/off button for my Vi and subvi's too but i got some problems understanding what's going on. The objective is to stop and run the program when i want when i make the executable application. can u guys see why it doesnt work... im using global and local variables to stop every cicle but someway must have missed me something. the subvi's are not complete so dont bother trying to understand all. And im kinda new to labview so ma coding should not be the most correct.

Download All
0 Kudos
Message 17 of 23
(1,875 Views)

Hello,

 

I am trying to do a global on/off button for my Vi and subvi's too but i got some problems understanding what's going on. The objective is to stop and run the program when i want for the executable application. can u guys see why it doesnt work... im using global and local variables to stop every cicle but someway must have missed me something. the subvi's are not complete so dont bother trying to understand all. And im kinda new to labview so ma coding should not be the most correct.

 

PS: the local variable im using returns false when the button is T?? i dunno why it changes. the not should invert the boolean and keep the program runing.

Download All
0 Kudos
Message 18 of 23
(1,875 Views)

Hello asnaev,

 

The problem is the loops you have in your subVIs.

Those subVIs will never return because they wait for the global variable to be updated, which is done in the main VI... which is waiting for the subVIs to return to update the global variable!

 

You have different possibilities to solve your issue:

 - remove the loop you have in your subVIs.

 - find a proper way to exit the loops in your subVIs. But you have to know that while your subVIs are running, the main loop cannot iterate.

 - put the subVIs outside of the main loop if you need those subVIs running in parallel. But you will have to be sure to have a proper mechanism to control the execution of those loops. As you said that your are new to LabVIEW, be sure to understand what you are doing if you choose this option which require more advanced knowledge.

 

That being said, I am not sure you need here a complex architecture. Maybe you can explain what you want to achieve to see if we can help you to find the suited design for your application?

 

Regards,

Cédric | NI Belgium
0 Kudos
Message 19 of 23
(1,827 Views)

Well my objective is to make a program that controls  a wind tunnel rpm's and regulates those by some standard velocities that i must input. The final objective of the program is to calibrate wind sensors( anemometers).i gonna give u some detailed information:

 

-The program must adquire the zero values for pressure inside the tunel and outside, 2 temperature,2 humidity.

-the program must then set to 4 m/s and hold 5 min to get uniformity of wind flux and reduce the errors because of temperature changes.

-after must verify if the flux is stable by getting 2 samples in 30s and compare if the diference is acceptable.This step must be made everytime the velocity changes.The velocity values are 4,6,8,10,12,14,16,15,13,11,9,7,5 m/s.

-More then control the uniformity of the flux i must control the real velocity to the standard one with pitot tubes and if the real value is far from the +-0,15 m/s i must control the tunnel to alter the velocity, and i must do this process everytime that velocity changes.

-then the calibration of the anemometer starts.

-after that i must w8 for tunnel to stop to 0 m/s and adquire again the zeros of the pressure.

 

well summing up its this. maybe im complicating but if u see anything i can simplify plz say 😄

 

THX for reading this in advance.

 

0 Kudos
Message 20 of 23
(1,814 Views)