Hello Guest it is December 03, 2021, 09:39:53 PM

Author Topic: Mach3 macro homing  (Read 605 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach3 macro homing
« Reply #10 on: June 25, 2021, 01:41:59 AM »
Hi,

I am using a ethernet smooth stepper from warp9.

Regards Morten

Online Graham Waterworth

*
  • *
  •  2,421 2,421
  • Yorkshire Dales, England
    • View Profile
Re: Mach3 macro homing
« Reply #11 on: June 25, 2021, 10:21:03 PM »
When you are trying the macro do you have single block enabled?

Without engineers the world stops
Re: Mach3 macro homing
« Reply #12 on: June 26, 2021, 01:04:35 AM »
Hi,

No single step enabled, just runs the macro. Mach must have a stop function after doing a homing sequence?

Offline TPS

*
  •  2,210 2,210
    • View Profile
Re: Mach3 macro homing
« Reply #13 on: June 26, 2021, 03:09:16 AM »
here is a piece of code that i am using on one of my machines:

Code: [Select]
Sub Main()
' -------------------------------------------------------------------------------
' TPS 26.06.2021 
' do a referece 
' new version with OEM Led's
' -------------------------------------------------------------------------------
'quit if file is loaded
If IsLoading() Then
    GoTo Ende
End If

Message ("automatic reference started")

'reference Z
Message ("Z-axis reference")
DoOemButton(1024) 'Ref Z
Sleep(500)
While GetOemLed(809) = true
    Sleep(200)
    If GetOemLed(800) Then
        Sleep(500)
        Message"error while referencing"
        End
    End If
Wend

Sleep(500) 'wait
Message (" ") 'clear status line
Sleep(200) 'wait
Exit Sub
 '--------------------------------------------------------------------------------

Ende:   
End Sub     

it is for z-axis because i have no c-axis.
it runs from VB-Editor and also due g-code call.

in your case it would be oembutton(1027) and oemled(812) for c-axis.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Online Graham Waterworth

*
  • *
  •  2,421 2,421
  • Yorkshire Dales, England
    • View Profile
Re: Mach3 macro homing
« Reply #14 on: June 26, 2021, 12:56:11 PM »
If you run a normal .tap file with the following lines what happens

%
O0001 (TEST C HOMING)
G91 G28 C0
M30
%
Without engineers the world stops
Re: Mach3 macro homing
« Reply #15 on: June 28, 2021, 01:25:47 PM »
Thanks for all the answers.

I must have done something wrong when testing G91 G28 C0, because I can make that work, but it uses Mach3 homing setting and not the more precise smoothstepper homing - backing off the sensor at another speed.

When playing with the above, I found out that it homed at another speed and did not back of the sensor, and then it hit me, could it be a smoothstepper homing bug? Yes it is, if I disable the smoothstepper homing settings it works as expected.

I will contact warp9 and tell them about the bug.

Once again, thanks for all your solutions and help, this is a fantastic place.

Regards Morten.
Re: Mach3 macro homing
« Reply #16 on: July 01, 2021, 03:38:39 PM »
Hi again,

It is not a ESS bug, but a mach3 thing - Andrew from warp9 explained to me...

But the G91 G28 C0 does not work - it just moves the C-axis to machine C0 position, but when the clutch for the caxis have been disengaged for normal turning it does not know where it is, I did not see this when playing with it the last time...

I have asked warp9 if they have a suggestion, and if possible to use ESS for homing only some axis and other use mach3 homing.

I am still open to any input you might have.

Regards Morten

Offline TPS

*
  •  2,210 2,210
    • View Profile
Re: Mach3 macro homing
« Reply #17 on: July 02, 2021, 03:37:24 AM »
have you tryed to use G28.1 insteed of G28

G28 is a Return to home Position
G28.1 is a Reference Axis
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach3 macro homing
« Reply #18 on: July 02, 2021, 09:20:40 AM »
Hi,

Tried G28.1 and it works from the MDI, but if macro called from gcode, the smoothstepper takes over the homing and wait for cycle start :(

Regards Morten

Offline TPS

*
  •  2,210 2,210
    • View Profile
Re: Mach3 macro homing
« Reply #19 on: July 02, 2021, 01:10:01 PM »
this with the cycle start must be smoothstepper specific.

i use Buttons 22-24 on my machines (CSLAB controller) within macros and do not have to press cycle start.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.