Hi,
thank you for your answers!
How is the extruder "axis" set up?
A snippet of my .hal File:
net xdir => parport.0.pin-02-out
net xstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net ydir => parport.0.pin-04-out
net ystep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net zdir => parport.0.pin-06-out
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
net udir => parport.0.pin-08-out
setp parport.0.pin-08-out-invert 0
net ustep => parport.0.pin-09-out
setp parport.0.pin-09-out-reset 1
net charge-pump => parport.0.pin-16-out
net estop-ext <= parport.0.pin-11-in
net all-home <= parport.0.pin-13-in
setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net all-home => axis.0.home-sw-in
setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable
net all-home => axis.1.home-sw-in
setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable
net all-home => axis.2.home-sw-in
setp stepgen.6.position-scale [AXIS_6]SCALE
setp stepgen.6.steplen 1
setp stepgen.6.stepspace 0
setp stepgen.6.dirhold 35000
setp stepgen.6.dirsetup 35000
setp stepgen.6.maxaccel [AXIS_6]STEPGEN_MAXACCEL
net upos-cmd axis.6.motor-pos-cmd => stepgen.6.position-cmd
net upos-fb stepgen.6.position-fb => axis.6.motor-pos-fb
net ustep <= stepgen.6.step
net udir <= stepgen.6.dir
net uenable axis.6.amp-enable-out => stepgen.6.enable
net all-home => axis.6.home-sw-in
A snippet of my ini-file:
[TRAJ]
AXES = 8
COORDINATES = X Y Z U
MAX_ANGULAR_VELOCITY = 360.00
DEFAULT_ANGULAR_VELOCITY = 36.00
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 4.00
MAX_LINEAR_VELOCITY = 40.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[AXIS_0]
TYPE = LINEAR
HOME = 418.0
MAX_VELOCITY = 38.0
MAX_ACCELERATION = 240.0
STEPGEN_MAXACCEL = 260.0
SCALE = 400.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = 0.0
MAX_LIMIT = 420.0
HOME_OFFSET = 420.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = 1.000000
HOME_SEQUENCE = 1
[AXIS_1]
TYPE = LINEAR
HOME = 478.0
MAX_VELOCITY = 38.0
MAX_ACCELERATION = 240.0
STEPGEN_MAXACCEL = 260.0
SCALE = 400.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = 0.0
MAX_LIMIT = 480.0
HOME_OFFSET = 480.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = 1.000000
HOME_SEQUENCE = 2
[AXIS_2]
TYPE = LINEAR
HOME = 128.0
MAX_VELOCITY = 38.0
MAX_ACCELERATION = 240.0
STEPGEN_MAXACCEL = 260.0
SCALE = 400.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = 5.0
MAX_LIMIT = 130.0
HOME_OFFSET = 130.000000
HOME_SEARCH_VEL = -20.000000
HOME_LATCH_VEL = 1.000000
HOME_SEQUENCE = 0
[AXIS_6]
TYPE = LINEAR
HOME = 0
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 240.0
STEPGEN_MAXACCEL = 260.0
SCALE = 746.1
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -999999
MAX_LIMIT = 999999
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 1.000000
HOME_LATCH_VEL = 1.000000
HOME_SEQUENCE = 0
Can you paste a snippet of the G-code?
G17
G90
G54
G92 U0
G0 U0
G21
G64 P0.1 Q0.1
G92 U0
G0 U0
G21
G1 X-5.803 Y0.915 Z0.5 F1200.0
G1 F1200.0
G1 U1.05
G1 F1200.0
G1 X-5.601 Y21.154 Z0.5 F450.0 U2.3486
G1 X-2.404 Y24.74 Z0.5 F450.0 U2.6569
G1 X0.915 Y25.803 Z0.5 F450.0 U2.8805
G1 X21.347 Y25.6 Z0.5 F450.0 U4.1915
G1 X25.62 Y21.327 Z0.5 F450.0 U4.5792
G1 X25.654 Y-1.186 Z0.5 F450.0 U6.0237
G1 X21.417 Y-5.599 Z0.5 F450.0 U6.4161
G1 X0.915 Y-5.803 Z0.5 F450.0 U7.7316
G1 X-2.234 Y-4.794 Z0.5 F450.0 U7.9438
G1 X-4.794 Y-2.234 Z0.5 F450.0 U8.1761
G1 X-5.803 Y0.915 Z0.5 F450.0 U8.3882
What is required is for the extruder to extrude at a rate proportional to axis speed to give a constant volume-per-mm
The extruder should give a constant volume-per-mm.
But at acceleration, the extruder takes some time to increase its internal preasure. I would say, this takes about 100-400 milliseconds.
This time depends on the acceleration of the extruder. At very low speeds I don't see this behavior.
It might be worth tweaking the U-axis accelleration settings to see if you can make an improvement. Unfortunately I don't think you can do this live.
I just looked around the code --> and I AGREE
There are other possible approaches, you could pass X and Y velocities into the "hypot" HAL function to convert to a linear velocity, and then scale that and pass it as an extrusion rate to a velocity-mode stepgen connected to U.
How can I do this. Is there a documentation or a HOWTO somewhere?
Since it looks like the error is a phase lag in the extruder,
I would be tempted to delay the motion axis a fixed number
of servo cycles (fixed time) but leave the "U" calculation in
real time so the extruder rate is "ahead" of the mechanics
a hal comp with a circular buffer could generate a variable
(in servo thread increments) delay in the commanded positions
This sounds good. Could you give me an example - or a link to a documentation?
An "off-topic question":
Would it better to use the A-axis in stead of the U-axis?
--> If I use the U-axis, the 3D-graph is not correct. there is a displacement in the x-axis
I attached to screenshots...
This attachment is hidden for guests. Please log in or register to see it.
Thank you for your support!
Do you need further information?
Best Regards,
Andy