7i40hv pid

More
27 Apr 2018 13:22 - 27 Apr 2018 13:29 #109708 by billykid
Replied by billykid on topic 7i40hv pid
Scale are all positive, I put the part ini so you can see the values.

#********************
# Axis Z
#********************
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 0.5
MAX_VELOCITY = 130
MAX_ACCELERATION = 1000.0
P = 10
I = 0
D = 0.022
FF0 = 0
FF1 = 0.046
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 0
ENCODER_SCALE = 5040
OUTPUT_SCALE = 1
MIN_LIMIT = -140
MAX_LIMIT = 0.01
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 10
HOME_LATCH_VEL = 1.0
HOME_USE_INDEX = yes
HOME_SEQUENCE = 0
VOLATILE_HOME = 0
Last edit: 27 Apr 2018 13:29 by billykid.

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

More
27 Apr 2018 14:36 #109715 by andypugh
Replied by andypugh on topic 7i40hv pid
Look in the HAL to make sure that encoder.N.velocity scale is actually being set, there isn't an INI entry for it.

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

More
27 Apr 2018 14:58 #109717 by billykid
Replied by billykid on topic 7i40hv pid
then I miss something ... this is the whole part z.


#*******************
# 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

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

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

setp hm2_7i80.0.pwmgen.03.output-type 1
setp hm2_7i80.0.pwmgen.03.scale [AXIS_2]OUTPUT_SCALE

net z-output => hm2_7i80.0.pwmgen.03.value
net z-pos-cmd axis.2.motor-pos-cmd
net z-enable axis.2.amp-enable-out => hm2_7i80.0.pwmgen.03.enable

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

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

net z-pos-fb <= hm2_7i80.0.encoder.03.position
net z-vel-fb <= hm2_7i80.0.encoder.03.velocity
net z-pos-fb => axis.2.motor-pos-fb
net z-index-enable axis.2.index-enable <=> hm2_7i80.0.encoder.03.index-enable
net z-pos-rawcounts <= hm2_7i80.0.encoder.03.rawcounts

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

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

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

More
27 Apr 2018 15:11 #109719 by andypugh
Replied by andypugh on topic 7i40hv pid
Sorry, I looked and there doesn't seem to be a separate parameter in the encoder function (it is a separate param for Resolver)
So ignore me :-)
The following user(s) said Thank You: billykid

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

More
27 Apr 2018 15:23 #109720 by billykid
Replied by billykid on topic 7i40hv pid
thanks Andy
so I can leave everything so that's fine :-)

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

Moderators: PCWjmelson
Time to create page: 0.193 seconds
Powered by Kunena Forum