- Posts: 297
- Thank you received: 4
Gantry machine progress
9 years 3 months ago #96810
by Yannis
Replied by Yannis on topic Gantry machine progres
Please Log in or Create an account to join the conversation.
9 years 3 months ago #96816
by andypugh
It sounds like you have confused the mapping between joints and axes.
Maybe make a table of which joint is which axis, and which encoder and pwm/analog corresponds to each joint.
(It is entirely valid to have joint 0 control the Z axis using encoder 2 and PWM 1. Though somewhat confusing).
Replied by andypugh on topic Gantry machine progres
Yannis wrote: I rotate the joint 1 motor and the joint 0 motor 1 rotation and the values at the display was completely different even tho the settings for the encoder is the same
It sounds like you have confused the mapping between joints and axes.
Maybe make a table of which joint is which axis, and which encoder and pwm/analog corresponds to each joint.
(It is entirely valid to have joint 0 control the Z axis using encoder 2 and PWM 1. Though somewhat confusing).
Please Log in or Create an account to join the conversation.
9 years 3 months ago #96826
by Yannis
Replied by Yannis on topic Gantry machine progres
i have the same encoder scale for the 2 motors(800encoder scale)
they sud count the same value per rotation
after one rotation of motor axis the one count 10mm(witch is the right value) and the other one is count 26885-19587=7298mm
they sud count the same value per rotation
after one rotation of motor axis the one count 10mm(witch is the right value) and the other one is count 26885-19587=7298mm
Please Log in or Create an account to join the conversation.
9 years 3 months ago #96830
by andypugh
Replied by andypugh on topic Gantry machine progres
But which encoder counter is connected to which axis?
Please Log in or Create an account to join the conversation.
9 years 3 months ago #96840
by Yannis
Replied by Yannis on topic Gantry machine progres
join0 to tune0 to x one rotation of the motor axis 10mm correct(encoder scale 800)
joint1,joint2 to tune1,tune2 to y1,y2 one rotation of the motor axis 7298mm (encoder scale 800)common P>I>D>settings
joint1,joint2 to tune1,tune2 to y1,y2 one rotation of the motor axis 7298mm (encoder scale 800)common P>I>D>settings
Please Log in or Create an account to join the conversation.
9 years 3 months ago #96851
by andypugh
For Y1 ou seem to be choosing the PID gains from the [JOINT_2] section (and I wouldn't) and the encoder scale from the [JOINT_1] section (and I wouldn't
But the main error is that you are setting the scale of encoder.01 in the joint.02 section.
Replied by andypugh on topic Gantry machine progres
Code:
setp pid.y1.Pgain [JOINT_2]P
setp pid.y1.Igain [JOINT_2]I
setp pid.y1.Dgain [JOINT_2]D
setp pid.y1.bias [JOINT_2]BIAS
setp pid.y1.FF0 [JOINT_2]FF0
setp pid.y1.FF1 [JOINT_2]FF1
setp pid.y1.FF2 [JOINT_2]FF2
setp pid.y1.deadband [JOINT_2]DEADBAND
setp pid.y1.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.y1.error-previous-target true
net y1-index-enable <=> pid.y1.index-enable
net y1-enable => pid.y1.enable
net y1-pos-cmd => pid.y1.command
net y1-vel-cmd => pid.y1.command-deriv
net y1-pos-fb => pid.y1.feedback
net y1-output => pid.y1.output
# ---PWM Generator signals/setup---
setp hm2_5i25.0.7i77.0.1.analogout2-scalemax [JOINT_1]OUTPUT_SCALE
setp hm2_5i25.0.7i77.0.1.analogout2-minlim [JOINT_1]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i77.0.1.analogout2-maxlim [JOINT_1]OUTPUT_MAX_LIMIT
net y1-output => hm2_5i25.0.7i77.0.1.analogout2
net y1-pos-cmd joint.2.motor-pos-cmd
net y1-enable joint.2.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 y1-pos-fb <= hm2_5i25.0.encoder.02.position
net y1-vel-fb <= hm2_5i25.0.encoder.02.velocity
net y1-pos-fb => joint.2.motor-pos-fb
net y1-index-enable joint.2.index-enable <=> hm2_5i25.0.encoder.02.index-enable
net y1-pos-rawcounts <= hm2_5i25.0.encoder.02.rawcounts
# ---setup home / limit switch signals---
net y1-home-sw => joint.2.home-sw-in
net y1-neg-limit => joint.2.neg-lim-sw-in
net y1-pos-limit => joint.2.pos-lim-sw-in
For Y1 ou seem to be choosing the PID gains from the [JOINT_2] section (and I wouldn't) and the encoder scale from the [JOINT_1] section (and I wouldn't
But the main error is that you are setting the scale of encoder.01 in the joint.02 section.
Please Log in or Create an account to join the conversation.
Time to create page: 0.312 seconds