LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

emergency stop buttom

I'm a big trouble. my application run in a big while and a multiple
sequence, i'm try to create a emergency buttom to close all this
sequence and my while and execute a subroutine for close all.

excuse my bad anglish
please help my
0 Kudos
Message 1 of 4
(4,471 Views)
Frederic Michaud wrote:

> I'm a big trouble. my application run in a big while and a multiple
> sequence, i'm try to create a emergency buttom to close all this
> sequence and my while and execute a subroutine for close all.
>
> excuse my bad anglish
> please help my

You can not do this with a sequence unless you are willing to
let the entire sequence run BEFORE the stop occurs.

It sounds more like you need a state machine which is a case
structure inside a while loop.

Kevin Kent
0 Kudos
Message 2 of 4
(4,471 Views)
On Thu, 10 Aug 2000 17:09:35 GMT, Frederic Michaud
wrote:

>I'm a big trouble. my application run in a big while and a multiple
>sequence, i'm try to create a emergency buttom to close all this
>sequence and my while and execute a subroutine for close all.
>
>excuse my bad anglish
> please help my

If an emergency happens, you should *not* rely on *any* software to stop
bad things from happening.

Use a real mechanical emergency stop switch to disconnect electrical
power to the main circuit that could cause problems if it continued to run.

Send a signal back to the software when the stop button is pressed, but
*don't* rely on the software to do any really critical function such as an
emergency stop.

Jim
0 Kudos
Message 3 of 4
(4,471 Views)
Frederic Michaud wrote in message
news:3992E1B2.556E41ED@crm.gouv.qc.ca...
> I'm a big trouble. my application run in a big while and a multiple
> sequence, i'm try to create a emergency buttom to close all this
> sequence and my while and execute a subroutine for close all.

You have to rewrite your application- possibly quite trivially.

Sounds to me like you have a while loop with a sequence inside that performs
many steps and takes a considerable amount of time to execute. The only way
out of that loop, short of using a stop node (which means your cleanup code
doesn't run) is when the loop conditional is checked and found to be false.

A better way of writing it would be to use a state machine, in which case
the conditional is essen
tially checked after each frame of your present
sequence, rather than when the entire sequence has completed iterating. If
you want to increase the resolution, simply abstract some of your sequence
frames into more but simpler frames.

Have a look on dejanews and look for previous posts in this group on state
machines. If you're lucky, you can simply pop up over your sequence, select
"replace with" and replace it with a case structure, with a shift register
holding the number of the case to execute and that simply counts up 1 with
each loop iteration, looping back to zero at the correct value (i.e. the
value of your last frame).
0 Kudos
Message 4 of 4
(4,471 Views)