691
Brains Development / Re: Terminate a brain with "run macro M650.m1s" ???????
« on: February 28, 2008, 07:44:47 AM »
Scott
I got it to work. Had to go with "IsActive(INPUT4)" as the "GetOEMLed(824)" would not work for some reason.
I tried to use "Ismoving()" instead of "GetOEMled (999)" to check for system movement but could not figure how to get it to work.
Any ideas?
Greg
'Macropump to activate Auto Tool Zero (M615) from an external switch via input #4
A = IsActive (INPUT4) ' Is switch pushed
B = GetOEMled (164) ' Spindle is Rotating LED
C = GetOEMled (999) ' System movement LED
D = GetUserDRO (1140)
If A And (B = 0) And (C = 0) And (D = 0) Then
Code "M615"
SetUserDRO(1140,1)
End If
If (A = 0) And (D > 0) Then
SetUserDRO(1140,0)
End If
I got it to work. Had to go with "IsActive(INPUT4)" as the "GetOEMLed(824)" would not work for some reason.
I tried to use "Ismoving()" instead of "GetOEMled (999)" to check for system movement but could not figure how to get it to work.
Any ideas?
Greg
'Macropump to activate Auto Tool Zero (M615) from an external switch via input #4
A = IsActive (INPUT4) ' Is switch pushed
B = GetOEMled (164) ' Spindle is Rotating LED
C = GetOEMled (999) ' System movement LED
D = GetUserDRO (1140)
If A And (B = 0) And (C = 0) And (D = 0) Then
Code "M615"
SetUserDRO(1140,1)
End If
If (A = 0) And (D > 0) Then
SetUserDRO(1140,0)
End If