Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: HimyKabibble on April 13, 2009, 05:59:09 PM

Title: M01 Optional Stop
Post by: HimyKabibble on April 13, 2009, 05:59:09 PM
Obviously, I don't understand this....  If I have an M01 in my code, and I turn *off* M1 Optional Stop, I expect the M01 line to be skipped, but it's not.  What's the trick?

Also, if I have the following macros:

M991.m1s:

If GetOEMLED(65) = 0 Then
    DoOEMButton(177)
End If

M992.m1s:

If GetOEMLED(65) = 1 Then
    DoOEMButton(177)
End If


I expect the sequence:

M991
M992
M991
M992

To toggle M1 Optional Stop mode, and toggle OEM LED 65.  However, M991 will SET M1 Optional Stop mode, but M992 will NOT clear it!

Regards,
Ray L.
Title: Re: M01 Optional Stop
Post by: jimpinder on April 14, 2009, 03:44:12 AM
Ray -

You could try -

If Not GetOEM(65) Then DoOEMButton(177)

and

If GetOEM(65) Then DoOEMButton(177)

I think the led's are bolean - and the "on" is not necessarily a "1", but it is a non-zero value
Title: Re: M01 Optional Stop
Post by: HimyKabibble on April 14, 2009, 10:42:43 AM
Thanks.  I did figure that out eventually.  Apparently the M1 toggle not working was some random Mach wierdness.  I re-started Mach, and it's now working OK.

Regards,
Ray L.
Title: Re: M01 Optional Stop
Post by: frogblender on February 16, 2010, 04:22:59 PM
Thanks.  I did figure that out eventually.  Apparently the M1 toggle not working was some random Mach wierdness.  I re-started Mach, and it's now working OK.

Regards,
Ray L.

Hey HK - did you every figger out this "random weirdness"?  I sometimes have the same problem.  See post:

http://www.machsupport.com/forum/index.php/topic,14172.0.html