Setting Laser to be Triggered by M67 and M68
- AntimatterAnimals
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
12 Dec 2020 19:19 #191768
by AntimatterAnimals
Setting Laser to be Triggered by M67 and M68 was created by AntimatterAnimals
Hey,
I have a laser connected to my machine for vector engraving and have been trying to set it up for raster engraving. I am able to control the laser power output using the PWM spindle speed control. I've spent about 15 hours now reading every forum post I can find to try to set up raster engraving one way or another. I tried to set up Graster but had issues with installing it and read that it is dated, and due to the popularity of other techniques decided to move on. My machine doesnt have an internet connection so every time I want to download something to install I have to take the whole PC into the house and connect it via ethernet. I attempted using the bjj config but I faced some issues and then read it is dated, and I am on 2.8.0. So then I tried jv4779's config and was unable to run the command "sudo halcompile --install laserraster.comp". It kept reporting that the temporary folder it was compiling it from was not an existing path. I spent about 2 hours trying to find a way to get this to work before giving up. I have now set my mind to getting it working using the method described here by tommylight forum.linuxcnc.org/10-advanced-configura...mposing-a-pic?start=
I decided to try this as most of the forum posts about it get linked to this page and figured it might be easier than any other way. I am now struggling with this too. I have edited my hal file many times and got various different results but the only version of the setup where I am still able to control the laser PWM is the basic version of the setup I get when I run stepperconfig. I have copied other people who's config's seem to be garnering some sort of sucess (M67/M68 is actually turning the laser on and off) just to try and get a step further but I still havent succesfully controlled it with these commands yet. I have done almost everything I can make sense of but a lot of what I see in the forums either doesn't work for my machine, is dated, or simply makes it seem like I have the worst IQ in the world.
I'm an engineer and work frequently with different coding languages, and have in the past used linux based systems to set up some basic things but the way people talk on these forums makes me think there's a place to go to make sense of all of this that I am not able to find. I'm still, after all the hours of research unsure if I will be able to control the z axis on this mill or if it will be dedicated to the on off control of the laser for rastering. How should I go about setting up spindle speed based on z position? What should my stepperconfig look like in order to achieve this? How do I get even a step closer to controling the laser with M67 and M68? I have tried this forum.linuxcnc.org/24-hal-components/396...e-to-utilize-m67-m68 one line at a time, as well as copying from other people's config files, who are having issues but seem further along, one line at a time, then going back and ammending any issues from the debug window. Will I be able to add this function to the configuration I have currently where this machine is used as a CNC router or will I have to have 2 seperate configs in order to get this to work? I have so many questions but if I could get any of the methods of raster engraving working that would be great. At this point I fully expect it to be something ridiculously simple I have overcomplicated. That seems to have been the case a few times with this machine in the past. If i can get it working at all I'll experiment and ask further questions later. I NEED HELP PLEASE!
Config files attached. Bare in mind this is the basic config that I end up with out of stepperconfig. I have edited it many times but have never gotten any closer to a positive result than this gives.
Standard Chinese 5 axis BOB being used with a blue 5.5w laser module
I have a laser connected to my machine for vector engraving and have been trying to set it up for raster engraving. I am able to control the laser power output using the PWM spindle speed control. I've spent about 15 hours now reading every forum post I can find to try to set up raster engraving one way or another. I tried to set up Graster but had issues with installing it and read that it is dated, and due to the popularity of other techniques decided to move on. My machine doesnt have an internet connection so every time I want to download something to install I have to take the whole PC into the house and connect it via ethernet. I attempted using the bjj config but I faced some issues and then read it is dated, and I am on 2.8.0. So then I tried jv4779's config and was unable to run the command "sudo halcompile --install laserraster.comp". It kept reporting that the temporary folder it was compiling it from was not an existing path. I spent about 2 hours trying to find a way to get this to work before giving up. I have now set my mind to getting it working using the method described here by tommylight forum.linuxcnc.org/10-advanced-configura...mposing-a-pic?start=
I decided to try this as most of the forum posts about it get linked to this page and figured it might be easier than any other way. I am now struggling with this too. I have edited my hal file many times and got various different results but the only version of the setup where I am still able to control the laser PWM is the basic version of the setup I get when I run stepperconfig. I have copied other people who's config's seem to be garnering some sort of sucess (M67/M68 is actually turning the laser on and off) just to try and get a step further but I still havent succesfully controlled it with these commands yet. I have done almost everything I can make sense of but a lot of what I see in the forums either doesn't work for my machine, is dated, or simply makes it seem like I have the worst IQ in the world.
I'm an engineer and work frequently with different coding languages, and have in the past used linux based systems to set up some basic things but the way people talk on these forums makes me think there's a place to go to make sense of all of this that I am not able to find. I'm still, after all the hours of research unsure if I will be able to control the z axis on this mill or if it will be dedicated to the on off control of the laser for rastering. How should I go about setting up spindle speed based on z position? What should my stepperconfig look like in order to achieve this? How do I get even a step closer to controling the laser with M67 and M68? I have tried this forum.linuxcnc.org/24-hal-components/396...e-to-utilize-m67-m68 one line at a time, as well as copying from other people's config files, who are having issues but seem further along, one line at a time, then going back and ammending any issues from the debug window. Will I be able to add this function to the configuration I have currently where this machine is used as a CNC router or will I have to have 2 seperate configs in order to get this to work? I have so many questions but if I could get any of the methods of raster engraving working that would be great. At this point I fully expect it to be something ridiculously simple I have overcomplicated. That seems to have been the case a few times with this machine in the past. If i can get it working at all I'll experiment and ask further questions later. I NEED HELP PLEASE!
Config files attached. Bare in mind this is the basic config that I end up with out of stepperconfig. I have edited it many times but have never gotten any closer to a positive result than this gives.
Standard Chinese 5 axis BOB being used with a blue 5.5w laser module
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19203
- Thank you received: 6437
12 Dec 2020 21:18 #191779
by tommylight
Replied by tommylight on topic Setting Laser to be Triggered by M67 and M68
Download the last file i uploaded there, or just edit your own, but it does need to have acceleration at a minimum of 3000mm/s/s, last i remember i had it at 5000 for it to work smoothly.
Otherwise it jerks a lot while working, like a lot.
Otherwise it jerks a lot while working, like a lot.
The following user(s) said Thank You: AntimatterAnimals
Please Log in or Create an account to join the conversation.
- AntimatterAnimals
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
13 Dec 2020 20:57 #191904
by AntimatterAnimals
Replied by AntimatterAnimals on topic Setting Laser to be Triggered by M67 and M68
I have used the whole config as to not get anything wrong when copying it. When I run it in LinuxCNC I get the following error;
"./core_stepper.hal:22 Pin 'joint.0.motor-pos-cmd' does not exist
3644
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components"
"./core_stepper.hal:22 Pin 'joint.0.motor-pos-cmd' does not exist
3644
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components"
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19203
- Thank you received: 6437
13 Dec 2020 21:38 #191910
by tommylight
Replied by tommylight on topic Setting Laser to be Triggered by M67 and M68
Using 2.8 or master 2.9 ?
Please Log in or Create an account to join the conversation.
- AntimatterAnimals
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
13 Dec 2020 22:06 #191914
by AntimatterAnimals
Replied by AntimatterAnimals on topic Setting Laser to be Triggered by M67 and M68
I just checked and it's 2.7.14. I'm sure I installed 2.8... Oops.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19203
- Thank you received: 6437
13 Dec 2020 22:52 #191921
by tommylight
Replied by tommylight on topic Setting Laser to be Triggered by M67 and M68
Yup, 2.7 uses axis, 2.8 and master use joints and axis.
The following user(s) said Thank You: AntimatterAnimals
Please Log in or Create an account to join the conversation.
- AntimatterAnimals
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
13 Dec 2020 22:59 #191922
by AntimatterAnimals
Replied by AntimatterAnimals on topic Setting Laser to be Triggered by M67 and M68
I'll update tomorrow and see how I get on. Thanks!
Please Log in or Create an account to join the conversation.
- AntimatterAnimals
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
16 Dec 2020 20:21 #192176
by AntimatterAnimals
Replied by AntimatterAnimals on topic Setting Laser to be Triggered by M67 and M68
So I’m having more luck after updating and adjusting the backend settings and values is making more sense now I’m getting my desired results. One issue I’m struggling to resolve is that everything the laser does is inverted from the original image I generated the gcode from. Is there a pin I need to invert? I tried inverting pwm and both the z pins but it didn’t change it.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19203
- Thank you received: 6437
16 Dec 2020 20:36 #192185
by tommylight
Replied by tommylight on topic Setting Laser to be Triggered by M67 and M68
Inverting the PWM will not work if the gcode is produced to do the negative of the picture.
Inverting the PWM is never a good idea for lasers as when set in gcode to minimum the laser will be at full power.
What are you using for gcode generation ?
If using dmap2gcode, there is a selection on the left side for choosing the whites or blacks, try that.
Inverting the PWM is never a good idea for lasers as when set in gcode to minimum the laser will be at full power.
What are you using for gcode generation ?
If using dmap2gcode, there is a selection on the left side for choosing the whites or blacks, try that.
Please Log in or Create an account to join the conversation.
- AntimatterAnimals
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
16 Dec 2020 21:07 #192193
by AntimatterAnimals
Replied by AntimatterAnimals on topic Setting Laser to be Triggered by M67 and M68
It seems like that’s what’s happening. The light areas of the image are really burning the wood no matter what I change the scale to (pwm scale and joint 2 scale) and the areas where it is supposed to be darker are producing a varied output as you’d want, just inverted (this does seem to be effected by the adjusted scale figures). I’m using lightburn to generate the gcode for marlin and then replacing all M106 S0 with M68 E0 Q0 and all M106 S with M67 E0 Q and changing the file extension to .ngc.
I couldn’t figure out how to set up dmap2gcode. I set all of the settings from your config and it ended up actually jogging the z up instead of changing the pwm and my z kept ending up crashing.
I’m also having trouble with the laser coming on at what seems like full power when homing at startup if this is any further indication of the problem.
I couldn’t figure out how to set up dmap2gcode. I set all of the settings from your config and it ended up actually jogging the z up instead of changing the pwm and my z kept ending up crashing.
I’m also having trouble with the laser coming on at what seems like full power when homing at startup if this is any further indication of the problem.
Please Log in or Create an account to join the conversation.
Time to create page: 0.157 seconds