scaling for machine units per second at 10V
- bentiggin
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 4
03 Jul 2025 02:28 #331141
by bentiggin
scaling for machine units per second at 10V was created by bentiggin
While attempting to tune some servo motors, I see pcw often recommends setting the ouput_scale in machine units per second at 10v.
I like this idea, but am having trouble implementing it on my retrofit.
Machine units are inch.
These are old servos being controlled by a mesa 7i97t using analog 10v.
I can't find any info on the motors, but they say 3,000 rpm on top.
Can I assume that 10v will spin the motor at 3,000 rpm?
Regardless, I am struggling with the gear reduction math.
The motors have a 16 tooth pulley going to a 60 tooth pulley.
the 60 tooth pulley spins a 25 tooth gear that has a dp 20 pa 20.
I come out with 1 rev = 1.047".
(3000x1.047..)/60=52.35..ips.
Would this mean i set output_scale to 52.35 in the ini file?
Should max_output be 0?
Can I set ff1 to 1?(This seems like the best reason to scale volts in this way)
And just tune p for vibration?
Or should i just stick with jt and tommy's tuning tutorials?
Thanks in advance.
I like this idea, but am having trouble implementing it on my retrofit.
Machine units are inch.
These are old servos being controlled by a mesa 7i97t using analog 10v.
I can't find any info on the motors, but they say 3,000 rpm on top.
Can I assume that 10v will spin the motor at 3,000 rpm?
Regardless, I am struggling with the gear reduction math.
The motors have a 16 tooth pulley going to a 60 tooth pulley.
the 60 tooth pulley spins a 25 tooth gear that has a dp 20 pa 20.
I come out with 1 rev = 1.047".
(3000x1.047..)/60=52.35..ips.
Would this mean i set output_scale to 52.35 in the ini file?
Should max_output be 0?
Can I set ff1 to 1?(This seems like the best reason to scale volts in this way)
And just tune p for vibration?
Or should i just stick with jt and tommy's tuning tutorials?
Thanks in advance.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18833
- Thank you received: 5200
03 Jul 2025 18:13 #331174
by PCW
Replied by PCW on topic scaling for machine units per second at 10V
52 IPS sounds really fast, what kind of machine is this?
Please Log in or Create an account to join the conversation.
- bentiggin
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 4
03 Jul 2025 19:01 #331179
by bentiggin
Replied by bentiggin on topic scaling for machine units per second at 10V
It is a rack and pinion plasma cutter.
I am just trying to tune the x and y servos.
I have no intention of running it at 52 ips and know it can't possibly go that fast.
I can set rpm at 10v on the servo drive, it's set to 3000 currently.
I am just trying to tune the x and y servos.
I have no intention of running it at 52 ips and know it can't possibly go that fast.
I can set rpm at 10v on the servo drive, it's set to 3000 currently.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18833
- Thank you received: 5200
03 Jul 2025 19:31 #331183
by PCW
Replied by PCW on topic scaling for machine units per second at 10V
OK that makes more sense on a plasma machine
If you are uncertain with your gear ratios, can you
rotate the motor shaft say 10 turns and measure
the linear position change? getting this right is needed
for the encoder scaling as well.
If you are uncertain with your gear ratios, can you
rotate the motor shaft say 10 turns and measure
the linear position change? getting this right is needed
for the encoder scaling as well.
Please Log in or Create an account to join the conversation.
- bentiggin
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 4
03 Jul 2025 19:41 #331184
by bentiggin
Replied by bentiggin on topic scaling for machine units per second at 10V
10 turns is about 10.4~" and my calculated is 10.47".
Encoder scale set to 960 is perfect.
Encoder scale set to 960 is perfect.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18833
- Thank you received: 5200
03 Jul 2025 19:45 #331185
by PCW
Replied by PCW on topic scaling for machine units per second at 10V
Yes, so as a starting value, your ~52 analog scale setting and
FF1=1.0 is at least a reasonable starting point.
FF1=1.0 is at least a reasonable starting point.
Please Log in or Create an account to join the conversation.
- bentiggin
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 4
03 Jul 2025 20:11 #331192
by bentiggin
Replied by bentiggin on topic scaling for machine units per second at 10V
If I set output_scale to 52, I immediately get following errors even with a ferror of .5.
The motor wants to drift.
I had it working, but not great with the output_scale at 10.
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 5
MAX_ACCELERATION = 10.0
P = 0.1
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0.003
MAX_OUTPUT = 0
ENCODER_SCALE = 960
OUTPUT_SCALE = -52.35
MIN_LIMIT = -3.0
MAX_LIMIT = 300.0
HOME_OFFSET = 0.0
HOME_SEQUENCE = 3
The motor wants to drift.
I had it working, but not great with the output_scale at 10.
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 5
MAX_ACCELERATION = 10.0
P = 0.1
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
DEADBAND = 0.003
MAX_OUTPUT = 0
ENCODER_SCALE = 960
OUTPUT_SCALE = -52.35
MIN_LIMIT = -3.0
MAX_LIMIT = 300.0
HOME_OFFSET = 0.0
HOME_SEQUENCE = 3
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18833
- Thank you received: 5200
03 Jul 2025 20:34 - 03 Jul 2025 20:43 #331194
by PCW
Replied by PCW on topic scaling for machine units per second at 10V
Set ferror and min ferror to 5 or so and then tune FF1 then P.
Note that if previous PWM scale was 10 (so the output would be scaled in volts)
changing it to ~50 makes the P term need to be 5 times higher for the same effect
For tuning, use halscope and plot joint.n.ferror and joint.n-vel-cmd
if FF1 is too low, the following error during a constant speed jog
will be in the same direction as the velocity, if FF1 is too high, the
following error will be in the opposite direction of the velocity.
For P, I would just increase until you get oscillations, then back off about 50%
Note that if previous PWM scale was 10 (so the output would be scaled in volts)
changing it to ~50 makes the P term need to be 5 times higher for the same effect
For tuning, use halscope and plot joint.n.ferror and joint.n-vel-cmd
if FF1 is too low, the following error during a constant speed jog
will be in the same direction as the velocity, if FF1 is too high, the
following error will be in the opposite direction of the velocity.
For P, I would just increase until you get oscillations, then back off about 50%
Last edit: 03 Jul 2025 20:43 by PCW. Reason: punctuation
Please Log in or Create an account to join the conversation.
- bentiggin
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 4
03 Jul 2025 20:39 #331195
by bentiggin
Replied by bentiggin on topic scaling for machine units per second at 10V
Ok,I will give it another shot.
I appreciate the help.
I appreciate the help.
Please Log in or Create an account to join the conversation.
- bentiggin
- Offline
- Senior Member
-
Less
More
- Posts: 54
- Thank you received: 4
03 Jul 2025 21:16 #331198
by bentiggin
Replied by bentiggin on topic scaling for machine units per second at 10V
Alright, it seems to running ok now and the tuning worked exactly how you described.
FF1 is just right at 1 and the p ended up about 5x what it was before.
Thank you
FF1 is just right at 1 and the p ended up about 5x what it was before.
Thank you
Please Log in or Create an account to join the conversation.
Time to create page: 0.087 seconds