Arcs max speed

More
30 Dec 2014 04:14 #54381 by jazial
Arcs max speed was created by jazial
Hello everyone,

I'm french (so please excuse my english), and use to make and retrofit machines based on Linuxcnc and Mach3.

I've started a Lathe conversion to Linuxcnc based on Mesa 5i25+7i76 boards. First time with Mesa products.

I'm facing an odd thing :

G2 G3 feed rate won't go beyond 60mm/min.

At first time i thought that it was a parameter like MAX_LINEAR_VELOCITY in .ini file for G2/G3 moves, but i didn't found anything on this subject.

The hal and ini files have been made with pncConf with some tweaks as PncConf have some limitations (Max velocity limited to 60 units, 7i76 mode 2 unavailable, spindle enable connected to and some other things that i don't figure out now).

If anyone have an idea about this problem, it will be welcome. I'm waiting for this problem to be solved to go with HMI and finish this lathe.

INI an HAL are below

Thank you

INI :
# Généré par PNCconf le Fri Dec 26 18:17:17 2014
# Si vous modifiez ce fichier, il sera
# écrasé quand vous relancerez PNCconf

[EMC]
MACHINE = som2
DEBUG = 0

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/somab/linuxcnc/nc_files
PYVCP = pyvcp-panel.xml
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
LATHE = 1
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 5.000000
MAX_VELOCITY = 41.67
#MAX_LINEAR_VELOCITY = 41.666667
MIN_LINEAR_VELOCITY = 0.010000
DEFAULT_ANGULAR_VELOCITY = 0.250000
MAX_ANGULAR_VELOCITY = 42.000000
MIN_ANGULAR_VELOCITY = 0.010000
EDITOR = mousepad
GEOMETRY = xz

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[RS274NGC]
PARAMETER_FILE = linuxcnc.var

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
SERVO_PERIOD = 1000000

[HOSTMOT2]
# **** This is for info only ****
# DRIVER0=hm2_pci
# BOARD0=5i25

[HAL]
HALUI = halui
HALFILE = som2.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal

[HALUI]

[TRAJ]
AXES = 3
COORDINATES = X Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 4.17
MAX_VELOCITY = 41.67
#MAX_LINEAR_VELOCITY = 41.67

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 125.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 41.6666666667
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 52.1
STEPGEN_MAXACCEL = 312.5
P = 50.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 52.0833333334
# these are in nanoseconds
DIRSETUP   = 200
DIRHOLD    = 200
STEPLEN    = 3500
STEPSPACE  = 500
STEP_SCALE = -900.0
MIN_LIMIT = -0.0
MAX_LIMIT = 125.01
HOME_OFFSET = 120.000000
HOME_SEARCH_VEL = 15.000000
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 0

#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 50.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 41.6666666667
MAX_ACCELERATION = 250.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 52.1
STEPGEN_MAXACCEL = 312.5
P = 50.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 52.0833333334
# these are in nanoseconds
DIRSETUP   = 200
DIRHOLD    = 200
STEPLEN    = 3500
STEPSPACE  = 500
STEP_SCALE = 900.0
MIN_LIMIT = -15.0
MAX_LIMIT = 282.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -15.000000
HOME_LATCH_VEL = 0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1

#********************
# Spindle 
#********************
[SPINDLE_9]
P = 0.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 6250.0
ENCODER_SCALE = 4096.0
OUTPUT_SCALE = 6250.0
OUTPUT_MIN_LIMIT = 0.0
OUTPUT_MAX_LIMIT = 6250.0

HAL :
# Généré par PNCconf le Fri Dec 26 18:17:17 2014
# Si vous modifiez ce fichier, il sera
# écrasé quand vous relancerez PNCconf

loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_pwmgens=0 num_stepgens=2 sserial_port_0=00xxxx" 
setp    hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.z,pid.s
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
loadrt scale names=scale.spindle
loadrt near

addf hm2_5i25.0.read          servo-thread
addf motion-command-handler   servo-thread
addf motion-controller        servo-thread
addf pid.x.do-pid-calcs       servo-thread
addf pid.z.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf abs.spindle                 servo-thread
addf scale.spindle                 servo-thread
addf lowpass.spindle             servo-thread
addf near.0                   servo-thread
addf hm2_5i25.0.write         servo-thread

# external output signals


# external input signals


# --- HOME-X ---
net home-x     <=  hm2_5i25.0.7i76.0.0.input-00-not

# --- BOTH-X ---
net both-x     <=  hm2_5i25.0.7i76.0.0.input-01-not

# --- HOME-Z ---
net home-z     <=  hm2_5i25.0.7i76.0.0.input-02-not

# --- BOTH-Z ---
net both-z     <=  hm2_5i25.0.7i76.0.0.input-03-not

#*******************
#  AXIS X
#*******************

setp   pid.x.Pgain     [AXIS_0]P
setp   pid.x.Igain     [AXIS_0]I
setp   pid.x.Dgain     [AXIS_0]D
setp   pid.x.bias      [AXIS_0]BIAS
setp   pid.x.FF0       [AXIS_0]FF0
setp   pid.x.FF1       [AXIS_0]FF1
setp   pid.x.FF2       [AXIS_0]FF2
setp   pid.x.deadband  [AXIS_0]DEADBAND
setp   pid.x.maxoutput [AXIS_0]MAX_OUTPUT
setp   pid.x.error-previous-target true
setp   pid.x.maxerror .0005

net x-index-enable  <=> pid.x.index-enable
net x-enable        =>  pid.x.enable
net x-output        =>  pid.x.output
net x-pos-cmd       =>  pid.x.command
net x-vel-cmd       =>  pid.x.command-deriv
net x-pos-fb        =>  pid.x.feedback

# Step Gen signals/setup

setp   hm2_5i25.0.stepgen.00.dirsetup        [AXIS_0]DIRSETUP
setp   hm2_5i25.0.stepgen.00.dirhold         [AXIS_0]DIRHOLD
setp   hm2_5i25.0.stepgen.00.steplen         [AXIS_0]STEPLEN
setp   hm2_5i25.0.stepgen.00.stepspace       [AXIS_0]STEPSPACE
setp   hm2_5i25.0.stepgen.00.position-scale  [AXIS_0]STEP_SCALE
setp   hm2_5i25.0.stepgen.00.step_type        0
setp   hm2_5i25.0.stepgen.00.control-type     1
setp   hm2_5i25.0.stepgen.00.maxaccel         [AXIS_0]STEPGEN_MAXACCEL
setp   hm2_5i25.0.stepgen.00.maxvel           [AXIS_0]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net x-pos-cmd    <= axis.0.motor-pos-cmd
net x-vel-cmd    <= axis.0.joint-vel-cmd
net x-output     <= hm2_5i25.0.stepgen.00.velocity-cmd
net x-pos-fb     <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-fb     => axis.0.motor-pos-fb
net x-enable     <= axis.0.amp-enable-out
net x-enable     => hm2_5i25.0.stepgen.00.enable

# ---setup home / limit switch signals---

net home-x     =>  axis.0.home-sw-in
net both-x     =>  axis.0.neg-lim-sw-in
net both-x     =>  axis.0.pos-lim-sw-in

#*******************
#  AXIS Z
#*******************

setp   pid.z.Pgain     [AXIS_2]P
setp   pid.z.Igain     [AXIS_2]I
setp   pid.z.Dgain     [AXIS_2]D
setp   pid.z.bias      [AXIS_2]BIAS
setp   pid.z.FF0       [AXIS_2]FF0
setp   pid.z.FF1       [AXIS_2]FF1
setp   pid.z.FF2       [AXIS_2]FF2
setp   pid.z.deadband  [AXIS_2]DEADBAND
setp   pid.z.maxoutput [AXIS_2]MAX_OUTPUT
setp   pid.z.error-previous-target true
setp   pid.z.maxerror .0005

net z-index-enable  <=> pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-output        =>  pid.z.output
net z-pos-cmd       =>  pid.z.command
net z-vel-cmd       =>  pid.z.command-deriv
net z-pos-fb        =>  pid.z.feedback

# Step Gen signals/setup

setp   hm2_5i25.0.stepgen.01.dirsetup        [AXIS_2]DIRSETUP
setp   hm2_5i25.0.stepgen.01.dirhold         [AXIS_2]DIRHOLD
setp   hm2_5i25.0.stepgen.01.steplen         [AXIS_2]STEPLEN
setp   hm2_5i25.0.stepgen.01.stepspace       [AXIS_2]STEPSPACE
setp   hm2_5i25.0.stepgen.01.position-scale  [AXIS_2]STEP_SCALE
setp   hm2_5i25.0.stepgen.01.step_type        0
setp   hm2_5i25.0.stepgen.01.control-type     1
setp   hm2_5i25.0.stepgen.01.maxaccel         [AXIS_2]STEPGEN_MAXACCEL
setp   hm2_5i25.0.stepgen.01.maxvel           [AXIS_2]STEPGEN_MAXVEL

# ---closedloop stepper signals---

net z-pos-cmd    <= axis.2.motor-pos-cmd
net z-vel-cmd    <= axis.2.joint-vel-cmd
net z-output     <= hm2_5i25.0.stepgen.01.velocity-cmd
net z-pos-fb     <= hm2_5i25.0.stepgen.01.position-fb
net z-pos-fb     => axis.2.motor-pos-fb
net z-enable     <= axis.2.amp-enable-out
net z-enable     => hm2_5i25.0.stepgen.01.enable

# ---setup home / limit switch signals---

net home-z     =>  axis.2.home-sw-in
net both-z     =>  axis.2.neg-lim-sw-in
net both-z     =>  axis.2.pos-lim-sw-in

#*******************
#  SPINDLE S
#*******************

setp   pid.s.Pgain     [SPINDLE_9]P
setp   pid.s.Igain     [SPINDLE_9]I
setp   pid.s.Dgain     [SPINDLE_9]D
setp   pid.s.bias      [SPINDLE_9]BIAS
setp   pid.s.FF0       [SPINDLE_9]FF0
setp   pid.s.FF1       [SPINDLE_9]FF1
setp   pid.s.FF2       [SPINDLE_9]FF2
setp   pid.s.deadband  [SPINDLE_9]DEADBAND
setp   pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   pid.s.error-previous-target true
setp   pid.s.maxerror .0005

net spindle-index-enable  <=> pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-output        =>  pid.s.output
net spindle-vel-cmd     => pid.s.command
net spindle-vel-fb      => pid.s.feedback

# ---digital potentionmeter output signals/setup---

setp   hm2_5i25.0.7i76.0.0.spinout-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i76.0.0.spinout-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT
setp   hm2_5i25.0.7i76.0.0.spinout-scalemax  [SPINDLE_9]OUTPUT_SCALE

net spindle-vel-cmd     => hm2_5i25.0.7i76.0.0.spinout
net spindle-on      => hm2_5i25.0.7i76.0.0.spinena
net spindle-ccw         => hm2_5i25.0.7i76.0.0.spindir

# ---Encoder feedback signals/setup---

setp    hm2_5i25.0.encoder.00.counter-mode 0
setp    hm2_5i25.0.encoder.00.filter 1
setp    hm2_5i25.0.encoder.00.index-invert 0
setp    hm2_5i25.0.encoder.00.index-mask 0
setp    hm2_5i25.0.encoder.00.index-mask-invert 0
setp    hm2_5i25.0.encoder.00.scale  [SPINDLE_9]ENCODER_SCALE

net spindle-revs              <=  hm2_5i25.0.encoder.00.position
net spindle-vel-fb            <=  hm2_5i25.0.encoder.00.velocity
net spindle-index-enable     <=>  hm2_5i25.0.encoder.00.index-enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps        <=  motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs    <=  motion.spindle-speed-out-rps-abs
net spindle-vel-cmd            <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
net spindle-on                 <=  motion.spindle-on
net spindle-cw                 <=  motion.spindle-forward
net spindle-ccw                <=  motion.spindle-reverse
net spindle-brake              <=  motion.spindle-brake
net spindle-revs               =>  motion.spindle-revs
net spindle-at-speed           =>  motion.spindle-at-speed
net spindle-vel-fb             =>  motion.spindle-speed-in
net spindle-index-enable      <=>  motion.spindle-index-enable

# ---Setup spindle at speed signals---

net spindle-vel-cmd-rps    =>  near.0.in1
net spindle-fb-filtered-abs-rps  =>  near.0.in2
#net spindle-vel-fb         =>  near.0.in2
net spindle-at-speed       <=  near.0.out
setp near.0.scale 1.020000

#  Utiliser la vitesse de broche actuelle depuis le codeur de broche
#  les variations parasites de la vitesse de broche seront filtrées par un filtre passe-bas
#  le signe de la vitesse de broche sera enlevé par un composant absolu
#  La vitesse ACTUELLE est en tr/s et non en tr/mn elle doit être mise à l'échelle.

setp     scale.spindle.gain 60
setp     lowpass.spindle.gain 1.000000
net spindle-vel-fb        =>   lowpass.spindle.in
net spindle-fb-filtered-rps    lowpass.spindle.out      =>   abs.spindle.in
net spindle-fb-filtered-abs-rps    abs.spindle.out      =>   scale.spindle.in
net spindle-fb-filtered-abs-rpm    scale.spindle.out

#******************************
#connections de signaux divers
#******************************

#  ---signaux HALUI---

net joint-select-a        halui.joint.0.select
net x-is-homed            halui.joint.0.is-homed
net jog-x-pos             halui.jog.0.plus
net jog-x-neg             halui.jog.0.minus
net jog-x-analog          halui.jog.0.analog
net joint-select-c        halui.joint.2.select
net z-is-homed            halui.joint.2.is-homed
net jog-z-pos             halui.jog.2.plus
net jog-z-neg             halui.jog.2.minus
net jog-z-analog          halui.jog.2.analog
net jog-selected-pos      halui.jog.selected.plus
net jog-selected-neg      halui.jog.selected.minus
net spindle-manual-cw     halui.spindle.forward
net spindle-manual-ccw    halui.spindle.reverse
net spindle-manual-stop   halui.spindle.stop
net machine-is-on         halui.machine.is-on
net jog-speed             halui.jog-speed 
net MDI-mode              halui.mode.is-mdi

#  ---signaux d'arrosage---

net coolant-mist      <=  iocontrol.0.coolant-mist
net coolant-flood     <=  iocontrol.0.coolant-flood

#  ---signal de sonde---

net probe-in     =>  motion.probe-input

#  ---signaux contrôle mouvement---

net in-position               <=  motion.in-position
net machine-is-enabled        <=  motion.motion-enabled

#  ---signaux entrée / sortie numérique---

#  ---signaux d'A/U---

net estop-out     <=  iocontrol.0.user-enable-out
net estop-out     =>  iocontrol.0.emc-enable-in

#  ---signaux changeur manuel d'outil---

loadusr -W hal_manualtoolchange
net tool-change-request     iocontrol.0.tool-change       =>  hal_manualtoolchange.change
net tool-change-confirmed   iocontrol.0.tool-changed      <=  hal_manualtoolchange.changed
net tool-number             iocontrol.0.tool-prep-number  =>  hal_manualtoolchange.number
net tool-prepare-loopback   iocontrol.0.tool-prepare      =>  iocontrol.0.tool-prepared

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 04:29 #54383 by PCW
Replied by PCW on topic Arcs max speed
Just a guess but MAX_ACCELERATION is not specified in the .INI file and may have a low default value

(see the linuxcnc integrators manual : www.linuxcnc.org/docs/2.6/pdf/LinuxCNC_Integrator_Manual_fr.pdf )

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 04:41 #54384 by jazial
Replied by jazial on topic Arcs max speed
Thank you,

the files I have posted are not the very last ones, I'm not at the workshop for now.

I've made some tries after backing up the files, and adding the MAX_ACCELERATION parameter was made but without success.

G01 moves works well, only G2/G3 moves are limited to 60mm/min.

I think that a global parameter like MAX_ACCELERATION being not specified would have effect on every moves, don't you ?

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 04:48 #54385 by PCW
Replied by PCW on topic Arcs max speed

I think that a global parameter like MAX_ACCELERATION being not specified would have effect on every moves, don't you ?


Sure but arcs are different since a G1 move can get to any speed eventually but a G2 or G3 moves maximum speed depends on allowed acceleration

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 05:05 #54386 by jazial
Replied by jazial on topic Arcs max speed
Good point !

I'll try to modify X and Z accel to see if it change something.

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 05:16 #54387 by jazial
Replied by jazial on topic Arcs max speed
Maybe I've found something...

I didn't added DEFAULT_ACCELERATION parameter

I'll add this :

DEFAULT_ACCELERATION = 250.0 (Motor max accel)
MAX_ACCELERATION = 312.5 (StepGen max accel)

Make sense ?

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 09:17 #54397 by PCW
Replied by PCW on topic Arcs max speed
The trajectory MAX_ACCELERATION should be SQRT(X_MaxAccel^2+Y_MaxAccel^2+Z_MaxAccel^2)
assuming this doesn't cause power supply or mechanical issues

Its the maximum acceleration of multi-axis moves so can be greater than the individual axis limits

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 11:09 #54399 by cmorley
Replied by cmorley on topic Arcs max speed
I believe default acceleration is not used with trivial kinematics. - according to the manual.

If you run linuxcnc and start linuxcnc status from Axis then you may be able to pin point the setting not right.

Peter might have it with max_acceleration,

Chris M

Please Log in or Create an account to join the conversation.

More
30 Dec 2014 11:15 #54400 by cmorley
Replied by cmorley on topic Arcs max speed
As an aside:
What version of linuxcnc are you using?
I see no limit of 60 units on pncconf's latest 2.6.5. was that axis limit or AXIS GUI limit?
Thanks
Chris M

Please Log in or Create an account to join the conversation.

More
06 Jan 2015 06:26 - 06 Jan 2015 06:27 #54622 by jazial
Replied by jazial on topic Arcs max speed
Hello,

I was running 2.8.0 pre (something), and I don't know why... maybe I had play with something in updates :blush:

I say "I was" cause today the computer didn't want to boot. I took another computer with a fresh install of 2.6.4

everything is good with this one, no problem with arcs speed, no limitations in PncConf.

I hesitate to make auto update using APT, cause i think this is why i get a 2.8.0 version.
WShich method is OK to upgrade to 2.6.5 ?

Thanks everybody for help, and apologize for wasting your time

Edit : Happy new year to all...
Last edit: 06 Jan 2015 06:27 by jazial. Reason: Missed wishes

Please Log in or Create an account to join the conversation.

Time to create page: 0.174 seconds
Powered by Kunena Forum