Hello Guest it is April 24, 2024, 02:15:51 AM

Author Topic: which m code to which output pin  (Read 6922 times)

0 Members and 1 Guest are viewing this topic.

which m code to which output pin
« on: May 19, 2009, 04:01:20 PM »
ok apart from m3 m4 m5 and m7 m8 m9
what m codes relate to what outputs?
i cannot find anywhere a listing of the generic m codes, maybe it is because they do not do what i want
i have a pacer mill and it has a good inbuilt system but i have changed to mach3 and fitted all new drivers but still use the main guts and control board relays.
i need to
switch on the machine main power
switch on the drivers (want to do it seperatly as i also have vacuum beds and swarf control)
switch on spindle
switch on vacuum table
switch on swarf extraction

currently i use this strin to start
m3 (turns on machine)
m7 (turns on cards and spindle wires joined together)
m8 turns on vac table
then i can m9 or m30 depending on what i want to turn off but i cannot turn off spindle and still manually jog machine

these m codes can be set to the output pin easily in the standard set up tabs


so to do what i want do i need to write a macro and if so is this correct

rem m code to turn on spindle
activate signal (output14)


then save this as m103.m1s

and to turn it off
rem mcode to switch spindle off
deactivate signal (output14)

and save that as m104.m1s

then if i use a m103 i turn on my spindle and m104 turns it off and if i connect a relay to pin 14 i have control, i can then set active high or active low to correct any wiring on the relay to make it switch the on with m103 (the relay is allready there and wired in so i do not know if i need to pull it down to 0 or lift it to 5v


is this correct?
and why is ther no listing of a mach commands to output table or am i just not searching it out
thanks

vmax549

*
Re: which m code to which output pin
« Reply #1 on: May 19, 2009, 05:29:09 PM »
NOT really a good idea to use mainstrem Mcodes to do odd things. ANY CAM programs would have difficulty writing programs unless you modified the post to suit the odd functions

M3 turns on the spindle CW
M4 turns on spindle CCW
M5 turns the spindle off

M7 M8 turns on coolant or vacume or dust collector
M9 turns them off

It would be best to create user Mcodes to do the odd things.
M100-M200 would be a good place to start.

There are seperate functions for things like enable drives,enable machine,etc



Just a thought, (;-) TP
Re: which m code to which output pin
« Reply #2 on: May 19, 2009, 05:37:35 PM »
yes thats what we did using edgecam we just did a set up sheet and then disabled all the m codes from outputting to prevent any clashes between cam and us
but thats the thing we did to get it working whilst we tried to find the table of m codes to mach3 outputs, other than the ones you set in the config diaglog

thanks

vmax549

*
Re: which m code to which output pin
« Reply #3 on: May 19, 2009, 06:18:47 PM »
There are no special function machine MCODEs other than what is listed. You will have to create them yourselves.

You can have MACH enable your dirves and turn on your machine using the built in function ENABLE it is setup in ports and pins config.

Select the enable function and assign the port and pins to it. Then when mach starts up it will enable that ouput for you

Just a thought  (;-) TP
« Last Edit: May 19, 2009, 06:23:47 PM by vmax549 »