Controlling Laser with 5th axis?
18 Jun 2017 03:33 #94673
by nplayle
Controlling Laser with 5th axis? was created by nplayle
Hi,
I'm trying to move to LinuxCNC from Mach3. In Mach3, I had 5 axes setup on a CNC router, standard XYZA and then a 5th 'axis' that was used to control a diode laser.
The laser was used as any other axis and there is a module inline that reads the step/dir pulses from the controller to control the laser driver. The control was then sent as 8 bit PWM values. The commands were encoded as standard G code, e.g.:
G01 Xnn.nnnn Ynn.nnnn Znn.nnnn Ann.nnnn B0.0ppp
Where ppp is a number from 0-255, corresponding to laser power. The steps per mm was set to 0.0001, so each value output one step to the laser controller.
I set it up this way because I couldn't come up with a better solution. I originally used spindle commands, but those are processed asynchronously and caused Mach to stutter, because each line will have a different laser power. Additionally, the Async processing of the M codes caused timing issues where the laser power wouldn't be in sync with the move. The router also has a spindle on it, and I'd prefer not to have 2 different configuration files to move between the 2 tools.
So I'm moving to LinuxCNC and have to go through the teething of setting it up again. LinuxCNC seems to support 5 axis tooling but needs a special config file and kinematics. I'm guessing I really won't have to care about kinematics here since there aren't really 5DoF to control, so standard XYZA should be OK.
Would setting up a 5th axis with generic kinematics be a good solution or is there a better way? Can anyone provide a quick start guide to 5 axis setup? It seems that the ini files need to be edited but I'm not sure of the ramifications of throwing another linear axis or rotary axis in there when it doesn't actually exist.
Thanks,
Nick
I'm trying to move to LinuxCNC from Mach3. In Mach3, I had 5 axes setup on a CNC router, standard XYZA and then a 5th 'axis' that was used to control a diode laser.
The laser was used as any other axis and there is a module inline that reads the step/dir pulses from the controller to control the laser driver. The control was then sent as 8 bit PWM values. The commands were encoded as standard G code, e.g.:
G01 Xnn.nnnn Ynn.nnnn Znn.nnnn Ann.nnnn B0.0ppp
Where ppp is a number from 0-255, corresponding to laser power. The steps per mm was set to 0.0001, so each value output one step to the laser controller.
I set it up this way because I couldn't come up with a better solution. I originally used spindle commands, but those are processed asynchronously and caused Mach to stutter, because each line will have a different laser power. Additionally, the Async processing of the M codes caused timing issues where the laser power wouldn't be in sync with the move. The router also has a spindle on it, and I'd prefer not to have 2 different configuration files to move between the 2 tools.
So I'm moving to LinuxCNC and have to go through the teething of setting it up again. LinuxCNC seems to support 5 axis tooling but needs a special config file and kinematics. I'm guessing I really won't have to care about kinematics here since there aren't really 5DoF to control, so standard XYZA should be OK.
Would setting up a 5th axis with generic kinematics be a good solution or is there a better way? Can anyone provide a quick start guide to 5 axis setup? It seems that the ini files need to be edited but I'm not sure of the ramifications of throwing another linear axis or rotary axis in there when it doesn't actually exist.
Thanks,
Nick
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
18 Jun 2017 19:57 #94681
by Todd Zuercher
Replied by Todd Zuercher on topic Controlling Laser with 5th axis?
I don't thing you will need to concern yourself with kinematics at all. Kinematics for 5 axis machines is really only a concern if you need to use 3-d tool offsets.
On to what I think is the real meat of your inquiry. Controlling a.laser in real time with LInuxcnc. Are you wanting to use the laser to do rastering, turning the laser on/off while scanning? This can be a little problematic with LInuxcnc. A number of possibilities have been discussed but I don't think many good solutions were worked out. I think the best solutions used a custom component to control the laser outside of Linuxcnc while Linuxcnc merely controled the scanning motion. The problem with controlling it in Linuxcnc has been that the commands to the laser usually broke the motion que causing unwanted deceleration.
There are also problems with the "new" trajectory planner when commanding movements with axis beyond the basic 3 XYZ axis. When a move uses axis A, B, C, U, V,or W the trajectory planner reverts back to the old 1-line look-ahead stratagy.and will slow significantly for short segmented moves.
Perhaps M67 or M62-M63 could be useful for controlling your laser's output. (but I'm afraid others have not had much success with it)
On to what I think is the real meat of your inquiry. Controlling a.laser in real time with LInuxcnc. Are you wanting to use the laser to do rastering, turning the laser on/off while scanning? This can be a little problematic with LInuxcnc. A number of possibilities have been discussed but I don't think many good solutions were worked out. I think the best solutions used a custom component to control the laser outside of Linuxcnc while Linuxcnc merely controled the scanning motion. The problem with controlling it in Linuxcnc has been that the commands to the laser usually broke the motion que causing unwanted deceleration.
There are also problems with the "new" trajectory planner when commanding movements with axis beyond the basic 3 XYZ axis. When a move uses axis A, B, C, U, V,or W the trajectory planner reverts back to the old 1-line look-ahead stratagy.and will slow significantly for short segmented moves.
Perhaps M67 or M62-M63 could be useful for controlling your laser's output. (but I'm afraid others have not had much success with it)
Please Log in or Create an account to join the conversation.
19 Jun 2017 00:27 #94685
by PCW
Replied by PCW on topic Controlling Laser with 5th axis?
There is a (fairly old) example of laser rastering here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Rastering_With_A_Laser
wiki.linuxcnc.org/cgi-bin/wiki.pl?Rastering_With_A_Laser
Please Log in or Create an account to join the conversation.
20 Jun 2017 16:59 - 20 Jun 2017 17:00 #94733
by andypugh
Replied by andypugh on topic Controlling Laser with 5th axis?
What does the Z axis do on your laser? It isn't generally necessary to move the head up and down on laser cutters.
Some people have used Z for intensity, I don't know how well it worked for them. You could still use W for vertical moves.
M67 _should_ be the right answer.
Some people have used Z for intensity, I don't know how well it worked for them. You could still use W for vertical moves.
M67 _should_ be the right answer.
Last edit: 20 Jun 2017 17:00 by andypugh.
Please Log in or Create an account to join the conversation.
- Stunning_Rob
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 1
01 Jul 2017 16:02 #95266
by Stunning_Rob
Replied by Stunning_Rob on topic Controlling Laser with 5th axis?
Nick,
I recently did the same thing you are trying to setup. Andy, Todd, and several others on these forums helped me and now it works flawlessly.
I will get back to you about this tomorrow, but if you have a bit of time we can get it working for you!
I recently did the same thing you are trying to setup. Andy, Todd, and several others on these forums helped me and now it works flawlessly.
I will get back to you about this tomorrow, but if you have a bit of time we can get it working for you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.091 seconds