Hello Guest it is April 26, 2024, 06:29:25 PM

Author Topic: This is driving me nuts! *simple script check*  (Read 2435 times)

0 Members and 1 Guest are viewing this topic.

Offline DaOne

*
  •  236 236
    • View Profile
This is driving me nuts! *simple script check*
« on: September 01, 2011, 02:31:46 PM »
I am trying to auto regen the cycle screen when its selected because mach wont update the g-code nor the tool display. The issue is it isnt smart enough not to do it if its already running a program and really screws things up. To fix this I figured I would check the run, tool change and feed hold LEDS to see if they are active and if so bypass the regen. Well I can get everything but the run LED to work reliably. I am stumped because it works just fine if I test it with "edit button script" Maybe there is a better way? Here is my code... the commented out stuff I have tried as well.


Code: [Select]
'Change to page 6
DoOEMButton (6)

'Tool change LED
If GetLED (6) Then
Exit Sub
End If

'Check if its moving
'While IsMoving()
'Exit Sub
'Wend

'Old Run LED
'If GetLED (4) Then
'Exit Sub
'End If

'Run LED
If GetLED (804) Then
Exit Sub
End If

'Feed Hold LED
If GetOEMLED (111) Then
Exit Sub
End If

DoOEMButton (160)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: This is driving me nuts! *simple script check*
« Reply #1 on: September 01, 2011, 03:02:44 PM »
I think the RUn Led is an OemLED   Try

If GetOEMLED (804) Then

(;-) TP