From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

asynchronous call can not stop

Hello! 

 

When i start slave Vi by asynchronous call, slave Vi do not stop!  Slave Vi  is part of alarm system. I can not do any thing whith this problem (((

 

Thanks!

Download All
0 Kudos
Message 1 of 17
(3,835 Views)

Use a named queue to send a shutdown.

Do not spawn multiple instances if only one is required (read: spawn only when you press the button once, not repeatedly).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 17
(3,828 Views)

Why is your Slave VI in a loop?  Don't you want it to execute once, then exit?  Removing the While loop should fix this problem.  However, notice that your calling program also has a loop that calls it over and over again, as fast as it can.  Seems to me you are spawning multiple instances of the same VI, all of which could run multiple times.  Is this what you intended?

 

BS

0 Kudos
Message 3 of 17
(3,827 Views)

Capture.PNGIt's working just fine, but when the boolean is true you are calling the Speak Text777.vi as many times as fast as you can. Try an event structure instead of a case structure.

0 Kudos
Message 4 of 17
(3,820 Views)

Thanks for all for fast answer! 

 

I remove loop, and nathing happens.

I think that happens very quickly repeated call.
Can you give an example of how to solve it?

 

Thanks a lot!

 

 

p.s. i see , now try

0 Kudos
Message 5 of 17
(3,811 Views)

Ok, may be i do some thing wrong.

 

when boolean x > y is true alarm must go ON always , when boolean x>y falshe , alarm must shut down.

 

And clock must go on ))))

 

What i do wrong?

 

 

Thanks!!!

Download All
0 Kudos
Message 6 of 17
(3,798 Views)

At the bottom of this post, there is a very useful list of on-line tutorials that you should view.  It will teach you the basics that you need to avoid the problems you have been having (such as leaving the default timeout value of -1 = more than 7 weeks in your Event loop).

 

Bob Schor

0 Kudos
Message 7 of 17
(3,785 Views)

Thanks a lot!

0 Kudos
Message 8 of 17
(3,780 Views)

OK lets analize that code and explain what you did wrong.

 

In the caller Boolean is not latched and the loop is greedy So you queue up about a bajillion calls to the non reenterant vi.  they each must wait for the previous call to finish before they can run.

 

Don't do that! just latch the boolean.

 

[Edit} I should have read the rest of the responses firstSmiley Surprised


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 17
(3,752 Views)

Hello again! )

 

What now not right?

 

slave Vi do not start.

 

 

Thanks!!!

Download All
0 Kudos
Message 10 of 17
(3,736 Views)