Hello Guest it is January 27, 2020, 07:57:32 AM

Author Topic: RefAllHome with G28.1 for plasma IHS  (Read 3275 times)

0 Members and 1 Guest are viewing this topic.

Offline stirling

  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
RefAllHome with G28.1 for plasma IHS
« on: June 23, 2010, 06:02:15 AM »
Here's my attempt at making RefAllHome work "conventionally" i.e. home Z north and then home X and Y whilst still being able to use G28.1 to home south for IHS. This is as discussed in http://www.machsupport.com/forum/index.php/topic,15058.0.html

It works for me but as we've seen elsewhere, that doesn't guarantee it'll work for you - VB - what can I say? ;D

Code: [Select]
'This macro should replace the standard script in the refAllHome
'button. It homes Z north whilst allowing G28.1 To be used
'to home south for plasma IHS. It should ONLY be used if
'the A and B axis are NOT used in your setup.
'To use it, the A axis should be set identically to Z in
'ports n pins and motor tuning. A should also be setup as you
'want Z to behave in Config/Homing Limits. The B axis should be
'disabled in ports n pins. A and B should also be "non angular"
'in Config/General Config.
'CAUTION: If this macro is interrupted for any reason, you
'should check your ports n pins setup.

'home A
While isMoving()
  sleep 100

'select machine coords
While isMoving()
  sleep 10

'set Z work offset to machine coord
setOEMDRO(802, getOEMDRO(802))

'dummy move Z to A
While isMoving()
  sleep 10
Code "G0 Z" & getOEMDRO(803)
While isMoving()
  sleep 100

'home X and Y