Mesa 5i25 + 7i77D can't cofig

More
29 Apr 2021 13:49 #207375 by tommylight
OK that seems good, for Z set it to 1 or 2 and try again.
Then set the jog velocity to very slow and try to jog very shortly in both directions for each axis. If any of them "jump" the direction for the output or the encoder has to be reversed in hal.

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

More
29 Apr 2021 15:03 #207380 by PCW
Replied by PCW on topic Mesa 5i25 + 7i77D can't cofig
Jerks/overshoots when jogging can be caused by incorrect (too high) FF1
The following user(s) said Thank You: tommylight

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

More
29 Apr 2021 20:18 #207394 by Taichi
Can you explain me what means that all parameters in servo tune?

I read your instructions maybe hundred times.
In English can't fully understand what you mean. Google translate bad working with technical words. Excuse me if i make stupid question.

I understood what you said about different direction of encoder and motor. Motor drift to positive side and encoder counting to negative side. Linuxcnc think that need to compensate in analogoutN. Encoder counting faster to same direction, close loop and we have rise amplitude vibration.

jog.n.f-error its that parameter who show bad fluctuations when PID controller try to move servo?
Minimum fluctuations = maximum performance

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

More
29 Apr 2021 21:01 #207401 by tommylight
I think wee need to do this step by step since a lot of info gets lost in translation.
Do the drives disable and enable with F2 ?
This is the first thing to have working.

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

More
29 Apr 2021 21:05 #207403 by PCW
Replied by PCW on topic Mesa 5i25 + 7i77D can't cofig
To avoid jerks/oscillations set all P terms to say 2
and _all_ other PID terms to 0 to start

Then you need to look at one of the tuning tutorials,
open the calibrate menus and tune one parameter
on one axis at a time.

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

More
30 Apr 2021 18:58 - 30 Apr 2021 19:02 #207474 by Taichi
Today i worked with one axes X.
I set P value to 20 and FF1 to 0
Then stepped by instructions i got:
P value: 40
FF1:0.22
Motor on 60mm/m run smooth and silent.
But in stop position, DRO make little jumps and in f-error line was some little amplitude noise. I heard vibration.
I decided to grounded computer directly to ground line.
And know what, noise disappeared. I got nice horizontal line in f-error signal. Motor stand still, DRO not moved.

In calibration menu i corrected FF1 to 0.24 and line f-error stand at center. On start/stop ware splash line. So i changed FF2 value to 0.0008.

What i have:
P = 40
FF1 = 0.24
FF2 = 0.0008

From 1 to 240mm/m motor move without hits and f-error signal so little change. But in 250mm/m amplitude f-error rise over 20 times and motor start/stop with hits.

In manual written thar servo/joint can move with 10000/5000 mm/m (reduction ratio 2/1)

Need to tune more?
Photo after tune.

# Generated by PNCconf at Wed Feb 17 18:23:45 2021
# Using LinuxCNC version:  2.8
# Все изменения в этом файле будут перезаписаны
# overwritten when you run PNCconf again

[EMC]
MACHINE = Strausak
DEBUG = 0
VERSION = 1.1

[DISPLAY]
DISPLAY = gmoccapy
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/taichi/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 6.000000
MAX_LINEAR_VELOCITY = 25.000000
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyzab
#EMBED_TAB_NAME = left_side_panel
#EMBED_TAB_LOCATION = box_left
#EMBED_TAB_COMMAND = gladevcp -g 64x697+997+10 -H v_buttonlist.hal v_buttonlist.glade

#EMBED_TAB_NAME = right_side_panel
#EMBED_TAB_LOCATION = box_right
#EMBED_TAB_COMMAND = gladevcp -g 995x64+0+805 -H h_buttonlist.hal h_buttonlist.glade

[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
SERVO_PERIOD = 1000000

[HMOT]
# **** This is for info only ****
CARD0=hm2_5i25.0

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

[HALUI]

[KINS]
JOINTS = 5
KINEMATICS = trivkins coordinates=XYZAB

[TRAJ]
COORDINATES =  XYZAB
MAX_ANGULAR_VELOCITY = 33.33
DEFAULT_ANGULAR_VELOCITY = 3.33
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 5.00
MAX_LINEAR_VELOCITY = 50.00
NO_FORCE_HOMING = 1

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

#******************************************
[AXIS_X]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -0.01
MAX_LIMIT = 350.0

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
P = 40
I = 0
D = 0
FF0 = 0
FF1 = 0.238
FF2 = 0.0011
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 1
ENCODER_SCALE = -20000
OUTPUT_SCALE = -10
OUTPUT_MIN_LIMIT = -10
OUTPUT_MAX_LIMIT = 10
MIN_LIMIT = -0.01
MAX_LIMIT = 350.0
HOME_OFFSET = 0.0
#******************************************

#******************************************
[AXIS_Y]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -0.01
MAX_LIMIT = 2350000.0

[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
P = 30
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = 20000
OUTPUT_SCALE = 10
OUTPUT_MIN_LIMIT = -10
OUTPUT_MAX_LIMIT = 10
MIN_LIMIT = -0.01
MAX_LIMIT = 2350000.0
HOME_OFFSET = 0.0
#******************************************

#******************************************
[AXIS_Z]
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
MIN_LIMIT = -350.0
MAX_LIMIT = 0.01

[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 200.0
P = 30
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = -20000
OUTPUT_SCALE = -10
OUTPUT_MIN_LIMIT = -10
OUTPUT_MAX_LIMIT = 10
MIN_LIMIT = -350.0
MAX_LIMIT = 0.01
HOME_OFFSET = 0.0
#******************************************

#******************************************
[AXIS_A]
MAX_VELOCITY = 33.3333333333
MAX_ACCELERATION = 100.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0

[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 33.3333333333
MAX_ACCELERATION = 100.0
P = 30
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = 4166.667
OUTPUT_SCALE = 10
OUTPUT_MIN_LIMIT = -10
OUTPUT_MAX_LIMIT = 10
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
HOME_OFFSET = 0.0
#******************************************

#******************************************
[AXIS_B]
MAX_VELOCITY = 33.3333333333
MAX_ACCELERATION = 100.0
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0

[JOINT_4]
TYPE = ANGULAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 33.3333333333
MAX_ACCELERATION = 100.0
P = 30
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = 4166.667
OUTPUT_SCALE = 10
OUTPUT_MIN_LIMIT = -10
OUTPUT_MAX_LIMIT = 10
MIN_LIMIT = -9999.0
MAX_LIMIT = 9999.0
HOME_OFFSET = 0.0
#******************************************


[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000
# Generated by PNCconf at Wed Feb 17 18:23:45 2021
# Using LinuxCNC version:  2.8
# Все изменения в этом файле будут перезаписаны
# overwritten when you run PNCconf again

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=6 num_pwmgens=0 num_stepgens=0 sserial_port_0=000xxx" 
setp    hm2_5i25.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.b,pid.s

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.y.do-pid-calcs       servo-thread
addf pid.z.do-pid-calcs       servo-thread
addf pid.a.do-pid-calcs       servo-thread
addf pid.b.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf hm2_5i25.0.write         servo-thread

# external output signals


# --- MACHINE-IS-ENABLED ---
net machine-is-enabled  =>     hm2_5i25.0.7i77.0.0.output-00

# external input signals


#*******************
#  AXIS X JOINT 0
#*******************

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

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

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout0-scalemax  [JOINT_0]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout0-minlim    [JOINT_0]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout0-maxlim    [JOINT_0]OUTPUT_MAX_LIMIT

net x-output     => hm2_5i25.0.7i77.0.1.analogout0
net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-enable     <= joint.0.amp-enable-out
# enable _all_ sserial pwmgens
net x-enable   => hm2_5i25.0.7i77.0.1.analogena

# ---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  [JOINT_0]ENCODER_SCALE

net x-pos-fb               <=  hm2_5i25.0.encoder.00.position
net x-vel-fb               <=  hm2_5i25.0.encoder.00.velocity
net x-pos-fb               =>  joint.0.motor-pos-fb
net x-index-enable    joint.0.index-enable  <=>  hm2_5i25.0.encoder.00.index-enable
net x-pos-rawcounts        <=  hm2_5i25.0.encoder.00.rawcounts

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

net x-home-sw     =>  joint.0.home-sw-in
net x-neg-limit     =>  joint.0.neg-lim-sw-in
net x-pos-limit     =>  joint.0.pos-lim-sw-in

#*******************
#  AXIS Y JOINT 1
#*******************

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

net y-index-enable  <=> pid.y.index-enable
net y-enable        =>  pid.y.enable
net y-pos-cmd       =>  pid.y.command
net y-pos-fb        =>  pid.y.feedback
net y-output        <=  pid.y.output

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout1-scalemax  [JOINT_1]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout1-minlim    [JOINT_1]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout1-maxlim    [JOINT_1]OUTPUT_MAX_LIMIT

net y-output     => hm2_5i25.0.7i77.0.1.analogout1
net y-pos-cmd    <= joint.1.motor-pos-cmd
net y-enable     <= joint.1.amp-enable-out

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

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

net y-pos-fb               <=  hm2_5i25.0.encoder.01.position
net y-vel-fb               <=  hm2_5i25.0.encoder.01.velocity
net y-pos-fb               =>  joint.1.motor-pos-fb
net y-index-enable    joint.1.index-enable  <=>  hm2_5i25.0.encoder.01.index-enable
net y-pos-rawcounts        <=  hm2_5i25.0.encoder.01.rawcounts

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

net y-home-sw     =>  joint.1.home-sw-in
net y-neg-limit     =>  joint.1.neg-lim-sw-in
net y-pos-limit     =>  joint.1.pos-lim-sw-in

#*******************
#  AXIS Z JOINT 2
#*******************

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

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

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout2-scalemax  [JOINT_2]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout2-minlim    [JOINT_2]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout2-maxlim    [JOINT_2]OUTPUT_MAX_LIMIT

net z-output     => hm2_5i25.0.7i77.0.1.analogout2
net z-pos-cmd    <= joint.2.motor-pos-cmd
net z-enable     <= joint.2.amp-enable-out

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

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

net z-pos-fb               <=  hm2_5i25.0.encoder.02.position
net z-vel-fb               <=  hm2_5i25.0.encoder.02.velocity
net z-pos-fb               =>  joint.2.motor-pos-fb
net z-index-enable    joint.2.index-enable  <=>  hm2_5i25.0.encoder.02.index-enable
net z-pos-rawcounts        <=  hm2_5i25.0.encoder.02.rawcounts

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

net z-home-sw     =>  joint.2.home-sw-in
net z-neg-limit     =>  joint.2.neg-lim-sw-in
net z-pos-limit     =>  joint.2.pos-lim-sw-in

#*******************
#  AXIS A JOINT 3
#*******************

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

net a-index-enable  <=> pid.a.index-enable
net a-enable        =>  pid.a.enable
net a-pos-cmd       =>  pid.a.command
net a-pos-fb        =>  pid.a.feedback
net a-output        <=  pid.a.output

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout3-scalemax  [JOINT_3]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout3-minlim    [JOINT_3]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout3-maxlim    [JOINT_3]OUTPUT_MAX_LIMIT

net a-output     => hm2_5i25.0.7i77.0.1.analogout3
net a-pos-cmd    <= joint.3.motor-pos-cmd
net a-enable     <= joint.3.amp-enable-out

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

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

net a-pos-fb               <=  hm2_5i25.0.encoder.03.position
net a-vel-fb               <=  hm2_5i25.0.encoder.03.velocity
net a-pos-fb               =>  joint.3.motor-pos-fb
net a-index-enable    joint.3.index-enable  <=>  hm2_5i25.0.encoder.03.index-enable
net a-pos-rawcounts        <=  hm2_5i25.0.encoder.03.rawcounts

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

net a-home-sw     =>  joint.3.home-sw-in
net a-neg-limit     =>  joint.3.neg-lim-sw-in
net a-pos-limit     =>  joint.3.pos-lim-sw-in

#*******************
#  AXIS B JOINT 4
#*******************

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

net b-index-enable  <=> pid.b.index-enable
net b-enable        =>  pid.b.enable
net b-pos-cmd       =>  pid.b.command
net b-pos-fb        =>  pid.b.feedback
net b-output        <=  pid.b.output

# ---PWM Generator signals/setup---

setp   hm2_5i25.0.7i77.0.1.analogout4-scalemax  [JOINT_4]OUTPUT_SCALE
setp   hm2_5i25.0.7i77.0.1.analogout4-minlim    [JOINT_4]OUTPUT_MIN_LIMIT
setp   hm2_5i25.0.7i77.0.1.analogout4-maxlim    [JOINT_4]OUTPUT_MAX_LIMIT

net b-output     => hm2_5i25.0.7i77.0.1.analogout4
net b-pos-cmd    <= joint.4.motor-pos-cmd
net b-enable     <= joint.4.amp-enable-out

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

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

net b-pos-fb               <=  hm2_5i25.0.encoder.04.position
net b-vel-fb               <=  hm2_5i25.0.encoder.04.velocity
net b-pos-fb               =>  joint.4.motor-pos-fb
net b-index-enable    joint.4.index-enable  <=>  hm2_5i25.0.encoder.04.index-enable
net b-pos-rawcounts        <=  hm2_5i25.0.encoder.04.rawcounts

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

net b-home-sw     =>  joint.4.home-sw-in
net b-neg-limit     =>  joint.4.neg-lim-sw-in
net b-pos-limit     =>  joint.4.pos-lim-sw-in

#*******************
#  SPINDLE
#*******************

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

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

# ---setup spindle control signals---

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

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

sets spindle-at-speed true


#******************************
# connect miscellaneous signals
#******************************

#  ---HALUI signals---

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

#  ---coolant signals---

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

#  ---probe signal---

net probe-in     =>  motion.probe-input

#  ---motion control signals---

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

#  ---digital in / out signals---

#  ---estop signals---

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

#  ---toolchange signals for custom tool changer---

net tool-number             <=  iocontrol.0.tool-prep-number
net tool-change-request     <=  iocontrol.0.tool-change
net tool-change-confirmed   =>  iocontrol.0.tool-changed
net tool-prepare-request    <=  iocontrol.0.tool-prepare
net tool-prepare-confirmed  =>  iocontrol.0.tool-prepared
Attachments:
Last edit: 30 Apr 2021 19:02 by Taichi.

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

More
30 Apr 2021 19:07 - 30 Apr 2021 19:11 #207475 by PCW
Replied by PCW on topic Mesa 5i25 + 7i77D can't cofig
1. Can you post your current hal and ini files?

Edit I see you added these, I don't see anything wrong at first glance

2. A screen shot of the halscope plot would be a lot more legible

3. Plotting the following error versus velocity rather than position is easier to interpret
Last edit: 30 Apr 2021 19:11 by PCW.

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

More
30 Apr 2021 19:37 - 30 Apr 2021 19:38 #207476 by PCW
Replied by PCW on topic Mesa 5i25 + 7i77D can't cofig

[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
.................................
MAX_OUTPUT = 1
^^^^^^^^^^^^^^^^^^^^^


This statement will limit the maximum output voltage to +-1V
or 1/10th of full velocity. This is likely the reason you get a following error
when attempting to move at higher speeds. it should be set to 0 or 10
Last edit: 30 Apr 2021 19:38 by PCW.

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

More
30 Apr 2021 20:24 #207481 by Taichi
I set max_output = 1 on first start pncconfig.
And successfully forgot about it.

Ok, weekend will end, i will try to make graphics f-error vs velocity.

You know, I don't know what the end result should look like. I have no experience in this.
Do I have to achieve a perfectly smooth graph or should the graph not go beyond of max_error in all operating modes?

Also, the time zone prevents us from communicating normally. Anyway, thanks you for the help.

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

More
30 Apr 2021 20:58 #207488 by PCW
Replied by PCW on topic Mesa 5i25 + 7i77D can't cofig
The errors will always be there depending on how much you magnify them...

Your plot currently shows a peak error of 5 microns
and a error during (slow) motion of less than 1 micron.
I would say that is quite good for a standard mill,
If you can maintain that accuracy up to higher speeds.

Your current following error limits are huge (1 to 10 MM!)
If you have errors of this size it means a setup error or
hardware fault. These large following error limits are good
for tuning but should be reduced once tuning is complete

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

Moderators: cmorley
Time to create page: 0.142 seconds
Powered by Kunena Forum