M codes

More
25 Apr 2011 15:36 - 25 Apr 2011 22:07 #9308 by andradela
M codes was created by andradela
Hello guys, how do I create a new M codes to use with a classic ladder like a M10,M12...
Last edit: 25 Apr 2011 22:07 by andradela.

Please Log in or Create an account to join the conversation.

More
25 Apr 2011 22:43 #9316 by BigJohnT
Replied by BigJohnT on topic Re:M codes
You have to change the EMC program.

John

Please Log in or Create an account to join the conversation.

More
26 Apr 2011 10:51 #9327 by andypugh
Replied by andypugh on topic Re:M codes
Redefining G and M codes is an experimental feature in the 2.6 branch.

Can you run the G-code through a text editor to replace M10 with M110? (the M100 to M199 codes are already user-definable)

Please Log in or Create an account to join the conversation.

More
26 Apr 2011 20:53 #9349 by andradela
Replied by andradela on topic Re:M codes
Ok i can do it, but I need to associate M110 to output 7 to use with a automatic tool change.

Please Log in or Create an account to join the conversation.

More
26 Apr 2011 21:06 - 26 Apr 2011 21:07 #9351 by andypugh
Replied by andypugh on topic Re:M codes
andradela wrote:

Ok i can do it, but I need to associate M110 to output 7 to use with a automatic tool change.


That's relatively easy.

You need to file called M110 in your program_prefix directory (ie the one referenced in the INI file) and that file needs to contain the
#!bin/bash
halcmd setp parport.0.pin-07-out TRUE
exit 0
And that should do it (assuming a parallel port)
Last edit: 26 Apr 2011 21:07 by andypugh.

Please Log in or Create an account to join the conversation.

More
26 Apr 2011 21:12 #9352 by andradela
Replied by andradela on topic Re:M codes
I'm using 7i43 mesa card i can do this way?

Please Log in or Create an account to join the conversation.

More
26 Apr 2011 21:47 #9353 by andypugh
Replied by andypugh on topic Re:M codes
andradela wrote:

I'm using 7i43 mesa card i can do this way?

Yes, no problem.
Assuming that the pin in question has been set as an output gpio…
#!bin/bash
halcmd setp hm2_7i43.0.gpio.009.out  TRUE
exit 0

Please Log in or Create an account to join the conversation.

More
27 Apr 2011 05:41 #9360 by andradela
Replied by andradela on topic Re:M codes
ok, I need to creat a new file and write this inside is correct?
What kind of extension I need to use when i'll create a new file, doc, txt, py?

Please Log in or Create an account to join the conversation.

More
27 Apr 2011 09:50 #9366 by andypugh
Replied by andypugh on topic Re:M codes
No extension. it needs to be made executable though. (it is run as a shell command).

When you have created the file then in the terminal window type
chmod 775 M110

Please Log in or Create an account to join the conversation.

More
27 Apr 2011 10:54 #9371 by BigJohnT
Replied by BigJohnT on topic Re:M codes
If your not familiar with using the terminal you might want to just right click on the file in the file browser and set the permission to allow it to be an executable file.

If you want to use the terminal and don't know much about it then have a short read here:

www.linuxcnc.org/docview/html/common_Lin...ec:Terminal-Commands

John

Please Log in or Create an account to join the conversation.

Time to create page: 0.157 seconds
Powered by Kunena Forum