Hello Guest it is April 19, 2024, 10:10:03 AM

Author Topic: How to make a Macro Modal in Mach3  (Read 3223 times)

0 Members and 1 Guest are viewing this topic.

How to make a Macro Modal in Mach3
« on: June 17, 2015, 06:20:30 PM »
I want to make a custom tapping cycle (floating) Macro.

I have successfully done this with manual coding, but I would like to make a Macro but it should be MODAL...i.e I call the Macro and then after it follows a list of hole coordinates to tap.

S0 how does one make a Macro to act in a modal way similar to how G81 is MODAL

REALLY want to avoid having to have a line for  every coordinate and then the next line have to call the Macro again....and again...and again

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to make a Macro Modal in Mach3
« Reply #1 on: June 17, 2015, 06:29:47 PM »
That I am aware of you can't. Is there a reason the G84 does not work for you?

(;-) TP
Re: How to make a Macro Modal in Mach3
« Reply #2 on: June 17, 2015, 06:46:01 PM »
Thanks for fast reply :-)
-------------------

I need a P (pause) after M5 to allow for spindle coast to stop, before the spindle reverse. Hard on machine and trips breaker if I do a reverse spindle (m3 to m4) while still spinning fast.

This sequence works in the real world for one hole with a tension compression tapping head:
 
g0
z.2
m3
g1 z-.3 f2.25
m5
g4 p1.5
m4
g1 z.1
m5

I have hundreds of holes to tap, so I wanted something modal. If it was modal I can use lazycam etc to generate a list of x,y hole coordinates for a G81 and then just copy & paste that list for the tapping cycle......if it comes down to it i guess i can use some other utility/method (spreadsheet ?)  to generate the REPETITIVE code  in lieu of a MODAL solution.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to make a Macro Modal in Mach3
« Reply #3 on: June 17, 2015, 07:24:21 PM »
Try putting a spindown delay on your M3 (CW) function. It shoudl stop motion until it clears the Spindown time.

Also check the immediate relay off before spindown box

Just a thought, (;-) TP
« Last Edit: June 17, 2015, 07:27:45 PM by BR549 »
Re: How to make a Macro Modal in Mach3
« Reply #4 on: June 17, 2015, 08:37:55 PM »
Thanks, that works for my current needs, I realize it is a bit of a kludge and won't work for more complicated jobs.

However it will save me a lot of time on this current job.

You saved me a lot of time as I never realized there were  spindle delay settings.

I was worried because g4 requires the spindle to be moving CW before it runs g84 , but this TEST  code did ,indeed, work  MODALLY ;

n5 m3

n9 g84 x 2 y2 z7 r7.1   f2.25

n15 x3

n16 x4

m30


...AGAIN THANKS FOR THE VERY SPEEDY HELP!  ;D




« Last Edit: June 17, 2015, 08:52:08 PM by damo green »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: How to make a Macro Modal in Mach3
« Reply #5 on: June 17, 2015, 09:22:30 PM »
You are very welcome. Mach3 has features that MOST do not even know exists.   ;)

(;-) TP