Write M code

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 or Create an account 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.
The following user(s) said Thank You: chen1234

Please Log in or Create an account 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 or Create an account to join the conversation.

Time to create page: 0.512 seconds
Powered by Kunena Forum