Hello Guest it is April 26, 2024, 04:44:47 AM

Author Topic: help!! How to make and use M6start(and other ) macros?  (Read 5609 times)

0 Members and 1 Guest are viewing this topic.

help!! How to make and use M6start(and other ) macros?
« on: June 13, 2007, 04:53:38 AM »
I purchased a copy of mach3. I have several questions now.

for example: How to use M6start.m1s, which is under directory
C:\mach3\macros\mach3mill\
I have write M6start in G-code program instead of M6. The running stopped at the line
 of M6start, and showed there's error.

Can anyone provide a demonstration, or tell me how to make a macro program that
when G-code program go to M6 ( or any other M command) function as below will be done:
1.spindle motor move to reference point?coordinates +110mm
2.set output#1 to 1
3. read input#3, if it's 0,wait; if it's 1, go next
4. set output#1 to 0
         output#2 to 1
5.z-axis move to reference point?coordinates +210mm
6.set output#2 to 0
7.end
 then G-code program goto the next line.
« Last Edit: June 13, 2007, 05:11:35 AM by glacier »

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: help!! How to make and use M6start(and other ) macros?
« Reply #1 on: June 13, 2007, 06:40:21 PM »
this is not complete but it give you some idea as to how it needs to be :-

M6.m1s

G53 Z110. M5
Activatesignal(output1)
if isactive(input2) then
   'do something
else
   ' do something else
end if
deactivatesignal(output1)
G53 Z210.

Graham.
Without engineers the world stops

vmax549

*
Re: help!! How to make and use M6start(and other ) macros?
« Reply #2 on: June 14, 2007, 11:13:22 AM »
I believe the M6  is an internal Mcode that Mach uses to CALL the M6start macro. THe M6start macro is used to build a script to do a function such as run the Auto tool changer,ETC.  "IF" you need the function, then"You" have to complete the M6start macro to YOUR specification.

(;-) TP
Re: help!! How to make and use M6start(and other ) macros?
« Reply #3 on: June 21, 2007, 09:53:33 PM »
Ya know i was all happy with my tool change macro.  Then i ran a G21 program and ka boom.  Some days it just doesn't pay.
I give up and i'm going to get my boat and hope it doesn't know any g, m, or vb codes.

When i get back i'll start working on a if then statement

Wes
Have a nice Day