Driver NUM GEC MK2S
22 Aug 2024 16:29 - 22 Aug 2024 16:33 #308410
by greg23_78
Replied by greg23_78 on topic Driver NUM GEC MK2S
So I tried to adjust my drivers,
I started to set zero offset, I didn't feed the analog and I set the motor to slip as little as possible.
I powered the analog at 10V, set reference input at 10V and set tacho input at 1600 rpm. so 10V-1600 rpm.
as for the de I and epsilon settings, I have leave as it was either set to full.
as for speed stability, nothing happened when I moved it, except when I started to set it to full, a buzz appeared but nothing visible on the motor rotation.
I started to set zero offset, I didn't feed the analog and I set the motor to slip as little as possible.
I powered the analog at 10V, set reference input at 10V and set tacho input at 1600 rpm. so 10V-1600 rpm.
as for the de I and epsilon settings, I have leave as it was either set to full.
as for speed stability, nothing happened when I moved it, except when I started to set it to full, a buzz appeared but nothing visible on the motor rotation.
Last edit: 22 Aug 2024 16:33 by greg23_78.
Please Log in or Create an account to join the conversation.
22 Aug 2024 17:05 - 22 Aug 2024 17:10 #308416
by greg23_78
Replied by greg23_78 on topic Driver NUM GEC MK2S
My setup is as follows:
Motor 1600 rpm - 10V anlog
pulley ratio: 14/28 = 0.5
leadscreaw pitch = 10 mm/turn
Encoder : 2500 PPR
So,
My INI file should be
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 133.3 (1600 tr/min * 0.5 (14/28) *10) =) 8000 mm/min =) 133.3 mm/s
MAX_ACCELERATION = 300
[JOINT_1]
CARD = 0
TAB = 1
AXIS = Z
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 133.333
MAX_ACCELERATION = 300
TYPE = LINEAR
SCALE = ????????????????????
ANALOG_SCALE_MAX = 10
ANALOG_MIN_LIMIT = -10
ANALOG_MAX_LIMIT = 10
ENCODER_SCALE = 1000 (2500*4)/10
FERROR = 0.005
MIN_FERROR = 0.0025
DEADBAND = 0
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 10
HOME_OFFSET = 0
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 0.5
HOME_FINAL_VEL = 20
HOME_SEQUENCE = 1
HOME_USE_INDEX = True
WHAT should i put SCALE Value AND MAX OUTPUT ?
Motor 1600 rpm - 10V anlog
pulley ratio: 14/28 = 0.5
leadscreaw pitch = 10 mm/turn
Encoder : 2500 PPR
So,
My INI file should be
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 133.3 (1600 tr/min * 0.5 (14/28) *10) =) 8000 mm/min =) 133.3 mm/s
MAX_ACCELERATION = 300
[JOINT_1]
CARD = 0
TAB = 1
AXIS = Z
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 133.333
MAX_ACCELERATION = 300
TYPE = LINEAR
SCALE = ????????????????????
ANALOG_SCALE_MAX = 10
ANALOG_MIN_LIMIT = -10
ANALOG_MAX_LIMIT = 10
ENCODER_SCALE = 1000 (2500*4)/10
FERROR = 0.005
MIN_FERROR = 0.0025
DEADBAND = 0
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 10
HOME_OFFSET = 0
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 0.5
HOME_FINAL_VEL = 20
HOME_SEQUENCE = 1
HOME_USE_INDEX = True
WHAT should i put SCALE Value AND MAX OUTPUT ?
Attachments:
Last edit: 22 Aug 2024 17:10 by greg23_78.
Please Log in or Create an account to join the conversation.
22 Aug 2024 17:18 #308417
by PCW
Replied by PCW on topic Driver NUM GEC MK2S
Suggested changes in Blue:
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 120
MAX_ACCELERATION = 300
[JOINT_1]
CARD = 0
TAB = 1
AXIS = Z
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 120
MAX_ACCELERATION = 300
TYPE = LINEAR
SCALE = possible 133 but Not sure what this is without seeing its use in the hal file
ANALOG_SCALE_MAX = 133
ANALOG_MIN_LIMIT = -133
ANALOG_MAX_LIMIT = 133
ENCODER_SCALE = 1000 (2500*4)/10
FERROR = 10
MIN_FERROR = 1
DEADBAND = 0
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 10
HOME_OFFSET = 0
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 0.5
HOME_FINAL_VEL = 20
HOME_SEQUENCE = 1
HOME_USE_INDEX = True
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 120
MAX_ACCELERATION = 300
[JOINT_1]
CARD = 0
TAB = 1
AXIS = Z
MIN_LIMIT = 0
MAX_LIMIT = 1000
MAX_VELOCITY = 120
MAX_ACCELERATION = 300
TYPE = LINEAR
SCALE = possible 133 but Not sure what this is without seeing its use in the hal file
ANALOG_SCALE_MAX = 133
ANALOG_MIN_LIMIT = -133
ANALOG_MAX_LIMIT = 133
ENCODER_SCALE = 1000 (2500*4)/10
FERROR = 10
MIN_FERROR = 1
DEADBAND = 0
P = 1
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 10
HOME_OFFSET = 0
HOME_SEARCH_VEL = 5
HOME_LATCH_VEL = 0.5
HOME_FINAL_VEL = 20
HOME_SEQUENCE = 1
HOME_USE_INDEX = True
Please Log in or Create an account to join the conversation.
22 Aug 2024 17:25 #308418
by greg23_78
Replied by greg23_78 on topic Driver NUM GEC MK2S
# Axis: Z Joint: 1 Output: 1
# PID Setup
setp pid.z.Pgain [JOINT_1](P)
setp pid.z.Igain [JOINT_1](I)
setp pid.z.Dgain [JOINT_1](D)
setp pid.z.bias [JOINT_1](BIAS)
setp pid.z.FF0 [JOINT_1](FF0)
setp pid.z.FF1 [JOINT_1](FF1)
setp pid.z.FF2 [JOINT_1](FF2)
setp pid.z.deadband [JOINT_1](DEADBAND)
setp pid.z.maxoutput [JOINT_1](MAX_OUTPUT)
setp pid.z.error-previous-target True
# joint-1 enable chain
net joint-1-index-enable <=> pid.z.index-enable
net joint-1-index-enable <=> joint.1.index-enable
net joint-1-index-enable <=> hm2_[MESA](BOARD).0.encoder.01.index-enable
net joint-1-enable <= joint.1.amp-enable-out
net joint-1-enable => pid.z.enable
# PWM Generator setup
setp hm2_[MESA](BOARD).0.pwmgen.01.dither true
setp hm2_[MESA](BOARD).0.pwmgen.01.output-type 1 #PWM pin0
setp hm2_[MESA](BOARD).0.pwmgen.01.offset-mode 1 # offset mode so 50% = 0
setp hm2_[MESA](BOARD).0.pwmgen.01.scale [JOINT_1]SCALE
# ---Encoder feedback signals/setup---
setp hm2_[MESA](BOARD).0.encoder.01.counter-mode 0
setp hm2_[MESA](BOARD).0.encoder.01.filter 1
setp hm2_[MESA](BOARD).0.encoder.01.index-invert 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask-invert 0
setp hm2_[MESA](BOARD).0.encoder.01.scale [JOINT_1]ENCODER_SCALE
# position command and feedback
net joint-1-pos-cmd <= joint.1.motor-pos-cmd
net joint-1-pos-cmd => pid.z.command
net joint-1-pos-fb <= hm2_[MESA](BOARD).0.encoder.01.position
net joint-1-pos-fb => joint.1.motor-pos-fb
net joint-1-pos-fb => pid.z.feedback
net joint.1.output <= pid.z.output
# Encoder Setup
setp hm2_[MESA](BOARD).0.encoder.01.scale [JOINT_1](ENCODER_SCALE)
setp hm2_[MESA](BOARD).0.encoder.01.counter-mode 0
setp hm2_[MESA](BOARD).0.encoder.01.filter 1
setp hm2_[MESA](BOARD).0.encoder.01.index-invert 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask-invert 0
# PID Setup
setp pid.z.Pgain [JOINT_1](P)
setp pid.z.Igain [JOINT_1](I)
setp pid.z.Dgain [JOINT_1](D)
setp pid.z.bias [JOINT_1](BIAS)
setp pid.z.FF0 [JOINT_1](FF0)
setp pid.z.FF1 [JOINT_1](FF1)
setp pid.z.FF2 [JOINT_1](FF2)
setp pid.z.deadband [JOINT_1](DEADBAND)
setp pid.z.maxoutput [JOINT_1](MAX_OUTPUT)
setp pid.z.error-previous-target True
# joint-1 enable chain
net joint-1-index-enable <=> pid.z.index-enable
net joint-1-index-enable <=> joint.1.index-enable
net joint-1-index-enable <=> hm2_[MESA](BOARD).0.encoder.01.index-enable
net joint-1-enable <= joint.1.amp-enable-out
net joint-1-enable => pid.z.enable
# PWM Generator setup
setp hm2_[MESA](BOARD).0.pwmgen.01.dither true
setp hm2_[MESA](BOARD).0.pwmgen.01.output-type 1 #PWM pin0
setp hm2_[MESA](BOARD).0.pwmgen.01.offset-mode 1 # offset mode so 50% = 0
setp hm2_[MESA](BOARD).0.pwmgen.01.scale [JOINT_1]SCALE
# ---Encoder feedback signals/setup---
setp hm2_[MESA](BOARD).0.encoder.01.counter-mode 0
setp hm2_[MESA](BOARD).0.encoder.01.filter 1
setp hm2_[MESA](BOARD).0.encoder.01.index-invert 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask-invert 0
setp hm2_[MESA](BOARD).0.encoder.01.scale [JOINT_1]ENCODER_SCALE
# position command and feedback
net joint-1-pos-cmd <= joint.1.motor-pos-cmd
net joint-1-pos-cmd => pid.z.command
net joint-1-pos-fb <= hm2_[MESA](BOARD).0.encoder.01.position
net joint-1-pos-fb => joint.1.motor-pos-fb
net joint-1-pos-fb => pid.z.feedback
net joint.1.output <= pid.z.output
# Encoder Setup
setp hm2_[MESA](BOARD).0.encoder.01.scale [JOINT_1](ENCODER_SCALE)
setp hm2_[MESA](BOARD).0.encoder.01.counter-mode 0
setp hm2_[MESA](BOARD).0.encoder.01.filter 1
setp hm2_[MESA](BOARD).0.encoder.01.index-invert 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask 0
setp hm2_[MESA](BOARD).0.encoder.01.index-mask-invert 0
Please Log in or Create an account to join the conversation.
22 Aug 2024 17:44 #308419
by PCW
Replied by PCW on topic Driver NUM GEC MK2S
SCALE = 133
(or possibly -133) to get the feedback direction correct
(or possibly -133) to get the feedback direction correct
Please Log in or Create an account to join the conversation.
22 Aug 2024 17:59 #308420
by greg23_78
Replied by greg23_78 on topic Driver NUM GEC MK2S
ANALOG_SCALE_MAX = 133
ANALOG_MIN_LIMIT = -133
ANALOG_MAX_LIMIT = 133
Is correct ?
ANALOG_MIN_LIMIT = -133
ANALOG_MAX_LIMIT = 133
Is correct ?
Please Log in or Create an account to join the conversation.
22 Aug 2024 18:01 #308421
by PCW
Replied by PCW on topic Driver NUM GEC MK2S
Those seem to be unused so irrelevant
Please Log in or Create an account to join the conversation.
26 Aug 2024 18:22 - 26 Aug 2024 18:24 #308726
by greg23_78
Replied by greg23_78 on topic Driver NUM GEC MK2S
Thanks, the axes move perfectly!
I've just set the PID parameters for my axes.
i'd like to know if bounces are ok or should i have as few as possible?
because the procedure is very well written, except that it doesn't specify what scale to stop at.
At 50 mv/div, are bounces negligible?
the images are relative to my X axis (with the turret), which is why there are more bounces when drawing. Im actualy at P=125 and F1=1
Slow speed UP (134 mm/min)
Slow speed DOWN (134 mm/min)
High speed UP (7127mm/min)
High speed DOWN (7127 mm/min)
I've just set the PID parameters for my axes.
i'd like to know if bounces are ok or should i have as few as possible?
because the procedure is very well written, except that it doesn't specify what scale to stop at.
At 50 mv/div, are bounces negligible?
the images are relative to my X axis (with the turret), which is why there are more bounces when drawing. Im actualy at P=125 and F1=1
Slow speed UP (134 mm/min)
Slow speed DOWN (134 mm/min)
High speed UP (7127mm/min)
High speed DOWN (7127 mm/min)
Attachments:
Last edit: 26 Aug 2024 18:24 by greg23_78.
Please Log in or Create an account to join the conversation.
Time to create page: 0.232 seconds