LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupt on Digital Input

I have a case structure which is operated by either a button OR a digital in, the stuff done in the case structure is the main priority in the program. When outside the case structure, there are other things that can be done but with less priority than the case structure loop.

Is there a way to interrupt whenever you are doing a low priority job when a high priority job is triggered (when a digital input is received).

The example I have included shows this, if you press the 'waste time' button it prints stuff to a string box, while this is happening if you press 'go' it doesn't go into the case structure UNTIL the waste time routine is finished. What I want is that as soon as I press go, it immediately ends the waste time routine and enters the case structure.

I hope I make some sense??? Any help would be appreciated

Nice
0 Kudos
Message 1 of 4
(3,145 Views)
Hello,

Look at the changes I made in your code. This way you have two loops running in parallel and there is no risk to loose the events while the other process is running.
You can change the priorities by changeing the amount of time in the wait of each loop.

Hope this helps,
Paulo
0 Kudos
Message 2 of 4
(3,139 Views)
Cheers!!

Would it be possible to save it as version 7
0 Kudos
Message 3 of 4
(3,134 Views)
Sure,

Here it is:
0 Kudos
Message 4 of 4
(3,131 Views)