Low Speed for 3d Printing application
06 Dec 2019 20:26 #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 or Create an account to join the conversation.
06 Dec 2019 20:30 #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 or Create an account to join the conversation.
06 Dec 2019 20:50 - 06 Dec 2019 20:52 #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,...
Last edit: 06 Dec 2019 20:52 by Hakan. Reason: An s where needed. But my grammar suck big time anyways.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
06 Dec 2019 20:57 #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 or Create an account to join the conversation.
06 Dec 2019 21:54 #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 or Create an account to join the conversation.
06 Dec 2019 22:10 #152189
by andypugh
It isn't
Replied by andypugh on topic Low Speed for 3d Printing application
And it may even be possible that this has already been merged into Master.
It isn't
Please Log in or Create an account to join the conversation.
06 Dec 2019 22:15 - 06 Dec 2019 22:23 #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 this...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
Last edit: 06 Dec 2019 22:23 by Muz94.
Please Log in or Create an account to join the conversation.
06 Dec 2019 23:51 - 06 Dec 2019 23:52 #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]
#! /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:
[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"
Last edit: 06 Dec 2019 23:52 by andypugh.
The following user(s) said Thank You: tommylight, Muz94
Please Log in or Create an account to join the conversation.
07 Dec 2019 13:19 - 07 Dec 2019 13:21 #152244
by Muz94
Replied by Muz94 on topic Low Speed for 3d Printing application
---- deleted ---
Last edit: 07 Dec 2019 13:21 by Muz94.
Please Log in or Create an account to join the conversation.
07 Dec 2019 13:20 - 07 Dec 2019 13:21 #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
Last edit: 07 Dec 2019 13:21 by Muz94.
Please Log in or Create an account to join the conversation.
Time to create page: 0.090 seconds