Write M code

More
5 years 3 months ago #213950 by chen1234
Write M code was created by chen1234
Hi!
I want to customize an M code, I read linuxcnc.org/docs/2.8/html/gcode/m-code.html#mcode:m70 , but I still don’t know how to write it.

Thanks in advance,
Chen1234

Please Log in to join the conversation.

More
5 years 3 months ago #213953 by andypugh
Replied by andypugh on topic Write M code
I don't really understand the question.

Do you want to customise M70? Or do you want to write a new M-code that uses M70?

Can we start at a higher level: What do you want the customised M-code to do?

Please Log in to join the conversation.

More
5 years 3 months ago #213955 by chen1234
Replied by chen1234 on topic 编写 M 代码
I want to define a new M code through M100-M199 to realize the function of controlling the laser, but I don’t know how to write the M code

Please Log in to join the conversation.

More
5 years 3 months ago #213956 by Aciera
Replied by Aciera on topic 编写 M 代码
Please don't double post. You already opened a thread here:

forum.linuxcnc.org/20-g-code/42992-how-t...cognized-by-linuxcnc

Please Log in to join the conversation.

More
5 years 3 months ago #214226 by chen1234
Replied by chen1234 on topic Write M code
I want to define a new M code through M100-M199 to realize the function of controlling the laser, but I don’t know how to write the M code

Please Log in to join the conversation.

More
5 years 3 months ago #214340 by andypugh
Replied by andypugh on topic Write M code
What does the M-code need to do? You keep asking the same question, but you are not giving us enough information to give an answer.

linuxcnc.org/docs/2.8/html/gcode/m-code.html#mcode:m100-m199

(Sorry, but only parts of the LinuxCNC documentation have been translated to Chinese. If you want to submit a translation of the G-code pages, that would be excellent)

Please Log in to join the conversation.

More
5 years 3 months ago #214345 by chen1234
Replied by chen1234 on topic Write M code
I need to add M code to control the turning on or off of the laser. I have not contacted linuxcnc before and want to know how to write or run a correct M code

Please Log in to join the conversation.

More
5 years 3 months ago #214371 by andypugh
Replied by andypugh on topic Write M code
The collet-closer M-code in the examples linked above should work if all you need to do is turn a GPIO pin on and off.

Or, you could use the existing coolant output pins (I doubt that a laser uses "mist coolant") and then use M7 / M9.

Please Log in to join the conversation.

More
5 years 1 month ago #220668 by plewis
Replied by plewis on topic Write M code
Hi, I'm very new to linuxcnc and this forum, so forgive me if this is easy to answer from the documentation. I'm working to build a hybrid 3D printer for metals (DED+CNC) and I'm trying to better understand what custom M code can do. Our printer will have a CNC spindle as well as a laser head mounted together. The laser is controlled using a simple ethernet interface. The laser will be plugged into a router with the desktop and MESA hardware. Is it possible to create an M-code that can be called from LinuxCNC that will allow for ethernet communications with the laser controller? As far as I can tell I can assign an unused M code to run a python function and have two parameters that can be passed. Are there any limitations on this that would prevent me from using ethernet to talk to the laser?
Thank you in advance.

Please Log in to join the conversation.

Time to create page: 0.398 seconds
Powered by Kunena Forum