71
VB and the development of wizards / Code to check spindle and cycle start ON
« on: January 19, 2009, 08:43:38 AM »
I am not sure I am using the right code to check that the spindle is on or that cycle start (gcode running) is correct. When I test on my computer it works but when I test on my CNC machiine the spindle works but the cycle start allows the macro to run. Am I using the wrong code or what might be happening or is there a better way to do this. What I am trying to accomplish is that if the spindle is running or gcode is running, I do not want to allow a macro to run.
Code:
' Check to see if Cycle Start or Spindle is active
' If active then exit macro.
If GetOEMLED(11) Or GetOEMLED(804) Then
If GetOEMLED(11) Then
Code "(Spindle Active - Zero Touch Plate Macro Aborted)"
End If
If GetOEMLED(804) Then
Code "(Cycle Start Active - Zero Touch Plate Macro Aborted)"
End If
Else
Thanks for input
Code:
' Check to see if Cycle Start or Spindle is active
' If active then exit macro.
If GetOEMLED(11) Or GetOEMLED(804) Then
If GetOEMLED(11) Then
Code "(Spindle Active - Zero Touch Plate Macro Aborted)"
End If
If GetOEMLED(804) Then
Code "(Cycle Start Active - Zero Touch Plate Macro Aborted)"
End If
Else
Thanks for input