Hello Guest it is March 28, 2024, 02:01:16 PM

Author Topic: How to make the machine not operate unless it is homed first...  (Read 7618 times)

0 Members and 1 Guest are viewing this topic.

Offline zealous

*
  •  489 489
  • HI!
    • View Profile
    • Artsoft Solutions
Re: How to make the machine not operate unless it is homed first...
« Reply #10 on: April 17, 2007, 09:48:25 AM »
Strange....I'll have to try out Brains cool code,I'll have alook at it but I do Action script  ;D any VB master this will be easy for them

Offline Tarak

*
  •  229 229
    • View Profile
Re: How to make the machine not operate unless it is homed first...
« Reply #11 on: April 17, 2007, 05:24:33 PM »
Sorry for the false alarm guys, I figured out what was causing the problem, it's a piece of code that times how long for a particular axis movement.
see here.... http://www.artsoftcontrols.com/forum/index.php?topic=2951.0
I'll talk to poppabear about it, see if he can let me know what's happening.
I'll remove the code that was giving me grief and retry this script.
« Last Edit: April 17, 2007, 05:30:37 PM by Darc »

Offline Tarak

*
  •  229 229
    • View Profile
Re: How to make the machine not operate unless it is homed first...
« Reply #12 on: April 17, 2007, 06:05:34 PM »
Well I tried to get this routine to work, but it keeps giving me a syntax error,so obviously I haven't entered it in correctly, if possible could you guys have a look at it and let me know where I'm going wrong? Thanks

‘This is the code from one of my buttons
Sub Main()
If (GetUserLED (1100)= true) Then  ‘Can I use the light for the Referenced Y axis (808)
CODE "G90 G54"
CODE "G00 Y1.0"
CODE "M03"
CODE "G01 Y20.0 F70"
CODE "G90 G00 Y5.0"
CODE "M05"
CODE "M30"
Exit Sub
End If
Main



‘This is the code in my Macropump.m1s
If GetLed (808)=1 Then 'Std Y axis home LED
DoOEMButton (251) 'Stop Jog Y
CODE "(HOME MACHINE BEFORE USE)"

Else
DoOEMButton (291) 'Allow  Jog Y
CODE "(Ready to go)"

End If

End Sub

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: How to make the machine not operate unless it is homed first...
« Reply #13 on: April 18, 2007, 03:16:55 AM »
Try it like this

If GetLED (808)= 1 Then
  CODE "G90 G54"
  CODE "G00 Y1.0"
  CODE "M03"
  CODE "G01 Y20.0 F70"
  CODE "G90 G00 Y5.0"
  CODE "M05"
  CODE "M30"
  While IsMoving()
  Wend
End If

Graham.
Without engineers the world stops