Hello Guest it is April 20, 2024, 07:37:57 AM

Author Topic: Mach3 macro homing  (Read 3055 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach3 macro homing
« Reply #20 on: July 02, 2021, 01:20:25 PM »
Hi TPS,

thanks for your reply, I will link this to Andrew at warp9.

Regards Morten

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: Mach3 macro homing
« Reply #21 on: July 02, 2021, 01:28:14 PM »
attached a macro i use on one of my machines.

and this is a typical Header for my g-code

Code: [Select]
N0001 %1 (Teutoburger GC01 +C01 Tür links)
N0002 G61                                 (Genauhalt)
N0003 G90                       (Absolute Maßangaben)
N0004 G90.1                             (I/J absolut)
N0005 M5                                (Spindel aus)
N0006 G17                             (X-Y Fräßebene)
N0007 G21                               (alles in mm)
N0008 G40                       (Radiuskorrektur aus)
N0009 G49                       (Längenkorrektur aus)
N0010 G50                         (Skallierungen aus)
N0011 G54                  (Werkstückkoordinaten ein)
N0012 G43 H0             (Werkzeughöhenkorrektur aus)
N0013 M1004               (alle Achsen referenzieren)

i run this macro in all my programs
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 #22 on: July 02, 2021, 01:31:32 PM »
Thanks TPS,

I have written to Andrew and asked him to check this topic and your post, I will update this topic when I know more, thanks again!

Regards Morten
Re: Mach3 macro homing
« Reply #23 on: February 23, 2022, 01:36:07 PM »
Hi,

just a followup, I have been frustrated that my macro with homing is working with other motions controllers, and more or less gave up and accepted that I had to press cyclestart when enabling my c-axis with homing macro, but yesterday evening I tried different things again, and the solution was quite easy, I put a sleep command before the homing command, and it also only worked with the refcombination command, not dooembutton. I could use the sleep down to around 100 and it still worked most of the time, so 500 was on the safe side, tested it around 30 times, so think it's working as it should.

Link to my questions at warp9 forum:
https://warp9td.com/index.php/kunena/8-requests-and-suggestions/8921-mach3-smoothstepper-homing-bug?limitstart=0

snip from my code:

ActivateSignal(OUTPUT4)
Sleep(300)
If GetOEMLED(845) Then
Code "G91 G0 C35"
While isMoving()
Wend
End If

sleep(500)

refcombination(32)
'DoOEMButton(1027)
'Call dobutton(27)