NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Configuring LinuxCNC Advanced Configuration Acceleration of U-Axis asynchronous to XYZ

Welcome, Guest
Username: Password: Remember me

TOPIC: Acceleration of U-Axis asynchronous to XYZ

Acceleration of U-Axis asynchronous to XYZ 25 Jun 2012 07:35 #21303

Hi @all,
I am trying to get my 3D-Printer running with LinuxCNC 2.5.0
I am using a wades extruder (http://reprap.org/wiki/Wade's_Geared_Extruder) on my CNC.

As a matter of principle it is running fine BUT:
The extruder is NOT generating the correct amount of PLA during acceleration/deceleration of the axis.
Please note the attached picture of the result:


The higher I set the Axis-speed, the higher I get bad printing results.
For the left print I reduced the XYZ-speed to 10mm/s --> this ist too slow for bigger prints (they would take more than 10 hours...) :dry:
For the right print I used 30mm/s and got this bad result...

Question:
Is there a way to get the U-Axis moving (accelerating) BEFORE the XYZ-Axis are moving for each G1-command?
Of course I would have to configure the time or something else for this asynchronous moves.

I already downloaded the source code on LinuxCNC - and tried to find the section for acceleration - but it does not look as simple as meant... :unsure:
Do you need further information?


Could someone help me? Thanks!

Best Regards,

poolspieler
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Last Edit: 25 Jun 2012 07:40 by poolspieler. Reason: added the image as "attached file"
The administrator has disabled public write access.

Re:Acceleration of U-Axis asynchronous to XYZ 25 Jun 2012 07:41 #21304

Here is the picture:


... its a little bit complicated to attach a picture to a post... :S
The administrator has disabled public write access.

Re:Acceleration of U-Axis asynchronous to XYZ 25 Jun 2012 08:16 #21305

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4090
  • Thank you received: 139
  • Karma: 129
How is the extruder "axis" set up?

What is required is for the extruder to extrude at a rate proportional to axis speed to give a constant volume-per-mm
If U is being moved as a coordinated motion with the XY axes, then that ought to be what happens.
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.

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.

Can you paste a snippet of the G-code?
The administrator has disabled public write access.

Re:Acceleration of U-Axis asynchronous to XYZ 25 Jun 2012 08:24 #21306

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1644
  • Thank you received: 86
  • Karma: 116
Is "U" calculated from velocity?

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
Last Edit: 25 Jun 2012 08:25 by PCW. Reason: sp
The administrator has disabled public write access.

Re:Acceleration of U-Axis asynchronous to XYZ 25 Jun 2012 08:27 #21307

  • PCW
  • PCW's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1644
  • Thank you received: 86
  • Karma: 116
Or as Andy is suggesting is the U value not set to the axis velocity?
Last Edit: 25 Jun 2012 08:28 by PCW.
The administrator has disabled public write access.

Re:Acceleration of U-Axis asynchronous to XYZ 25 Jun 2012 09:17 #21308

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 :laugh:
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
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.
Time to create page: 2.025 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.