Hello Guest it is April 12, 2024, 08:37:09 AM

Author Topic: Need to interupt while loop  (Read 3665 times)

0 Members and 1 Guest are viewing this topic.

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Need to interupt while loop
« on: February 15, 2008, 04:49:38 PM »
I am using a system key in Mach3 to interupt a while loop by monitoring a led state. The OEM buttons and OEMled's has a low priority in a macro while loop it seems. I have worked around it, but can't locate info on buttons that has a higher priority and is not assigned to Mach3 system. Is there available buttons for such an interupt?
I am monitoring a button/led while in a timer loop as to terminate the loop via external interupt premature to the timeout.

Whacko
Nothing's impossible

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Need to interupt while loop
« Reply #1 on: February 15, 2008, 10:04:10 PM »
Redo your While conditon Put and "OR" in your while and the other part is your escape conditon

While (what I am waitin on here) OR (IsActive(INPUT2)) (INPUT2 your escape clause, or button, or led here)
fun times

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Need to interupt while loop
« Reply #2 on: February 16, 2008, 03:18:48 PM »
Hi Scott, thanks for the input, but that won't work. I'm in a timer loop. Whilst in the timer loop, OEM buttons don't trigger an interupt in the kernell. I think I got the answer though. I didn't think of it but it has something to do with the button group.

Whacko
Nothing's impossible