- Posts: 19306
- Thank you received: 0
Low Speed for 3d Printing application
6 years 10 months ago #152172
by andypugh
Replied by andypugh on topic Low Speed for 3d Printing application
Swapping the letters in the G-code at the point that it is loaded is likely to be easier as LinuxCNC supports import filters.
linuxcnc.org/docs/2.7/html/config/ini-co...html#_filter_section
linuxcnc.org/docs/2.7/html/config/ini-co...html#_filter_section
Please Log in to join the conversation.
6 years 10 months ago #152173
by Muz94
Replied by Muz94 on topic Low Speed for 3d Printing application
Of course, I was just trying to avoid having Z and U swapped in the dro, in the manual commands etc.
Please Log in to join the conversation.
6 years 10 months ago #152174
by Hakan
Replied by Hakan on topic Low Speed for 3d Printing application
Give it a go at swapping Z and U.
If it changes things then...
If not then,...
If it changes things then...
If not then,...
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
6 years 10 months ago #152176
by Todd Zuercher
Replied by Todd Zuercher on topic Low Speed for 3d Printing application
There was an experimental branch that extends full blending capabilities to all linear axis XYZ and UVW. And it may even be possible that this has already been merged into Master.
github.com/LinuxCNC/linuxcnc/issues/611
Please Log in to join the conversation.
6 years 10 months ago #152187
by Muz94
Replied by Muz94 on topic Low Speed for 3d Printing application
Does this mean that i'd have that functionality simply by updating to a newer version of linuxcnc?
At the moment i'm creating a simulator version of my config (for now i've just loaded sim_parport and edited my scripts so that linuxcnc doesn't crash even without the external temperature controller connected). The only issue in that it runs VERY slow, the control reports normal speeds, but it's actually going in slomo.
Am i missing something?
At the moment i'm creating a simulator version of my config (for now i've just loaded sim_parport and edited my scripts so that linuxcnc doesn't crash even without the external temperature controller connected). The only issue in that it runs VERY slow, the control reports normal speeds, but it's actually going in slomo.
Am i missing something?
Please Log in to join the conversation.
6 years 10 months ago #152189
by andypugh
It isn't
Replied by andypugh on topic Low Speed for 3d Printing application
Todd Zuercher wrote: And it may even be possible that this has already been merged into Master.
It isn't
Please Log in to join the conversation.
6 years 10 months ago #152190
by Muz94
Now the simulator works, and i can see the tool slowing down on curves.
Tomorrow i'll swap Z with U and see how it goes
Replied by Muz94 on topic Low Speed for 3d Printing application
Setting base_period to 0 fixed thisMuz94 wrote: ...The only issue in that it runs VERY slow, the control reports normal speeds, but it's actually going in slomo.
Am i missing something?
Now the simulator works, and i can see the tool slowing down on curves.
Tomorrow i'll swap Z with U and see how it goes
Please Log in to join the conversation.
6 years 10 months ago #152197
by andypugh
Replied by andypugh on topic Low Speed for 3d Printing application
I have written a filter file for you (as awarm-up to writing a more complicated one for somebody else)
save this code as "swapZU" in your linuxcnc directory, then make it executable [1]
Then edit the [FILTER] section of your INI to look like this:
(Except using your home directory name, not "andypugh")
To keep it simple and obvious the regex will swap _every_ u and z, even in comments and variable names. Cleverer regexes could avoid this, but it shouldn't really matter.
Then all G-code files should have Z and U swapped.
[1] Either command line, or right click the file in the file manager, select "properties" select the "permissions" tab and tick "allow this file to run as a program"
save this code as "swapZU" in your linuxcnc directory, then make it executable [1]
Code:
#! /usr/bin/python
import re
import sys
import math
print '(Axes swapped, U to Z and Z to U)'
infile = sys.argv[1]
f = open(infile, 'r')
for line in f:
line = re.sub(r'Z','&',line)
line = re.sub(r'U','Z',line)
line = re.sub(r'&','U',line)
print line
Then edit the [FILTER] section of your INI to look like this:
Code:
[FILTER]
PROGRAM_EXTENSION = .ngc G-code
ngc = /home/andypugh/linuxcnc/swapZU
To keep it simple and obvious the regex will swap _every_ u and z, even in comments and variable names. Cleverer regexes could avoid this, but it shouldn't really matter.
Then all G-code files should have Z and U swapped.
[1] Either command line, or right click the file in the file manager, select "properties" select the "permissions" tab and tick "allow this file to run as a program"
Please Log in to join the conversation.
6 years 10 months ago #152244
by Muz94
Replied by Muz94 on topic Low Speed for 3d Printing application
---- deleted ---
Please Log in to join the conversation.
6 years 10 months ago #152245
by Muz94
Replied by Muz94 on topic Low Speed for 3d Printing application
Thank for the code!
I tryed (in the simulator) and it LOOKS like it definetly makes a difference, even tho it's not easy to see as swapping the axes messes up the preview pretty bad. I tryed setting GEOMETRY = X Y U hoping that the U axis would be rapresented as Z but it doesn't work.
I still think that fixing everything in linuxcnc would be better, having to jog the machine with swapped axes would be quite bad, i'd crash it every time xD
I'll have to look into the code and see if it's something feasible.
Is all this managed into tp.c?
ops: i quoted myself instead of editing
I tryed (in the simulator) and it LOOKS like it definetly makes a difference, even tho it's not easy to see as swapping the axes messes up the preview pretty bad. I tryed setting GEOMETRY = X Y U hoping that the U axis would be rapresented as Z but it doesn't work.
I still think that fixing everything in linuxcnc would be better, having to jog the machine with swapped axes would be quite bad, i'd crash it every time xD
I'll have to look into the code and see if it's something feasible.
Is all this managed into tp.c?
ops: i quoted myself instead of editing
Please Log in to join the conversation.
Time to create page: 0.113 seconds
