MesaCT 2.1.8: Scale vs Encoder Scale

More
02 Dec 2025 16:30 #339654 by speppino
MesaCT 2.1.8: Scale vs Encoder Scale was created by speppino
Dear all, I am new to Linuxcnc and trying to setup a bench test before connecting motors to my machine. I got Stepperonline A6 series 400W that allow analog control. I setup velocity mode on them and I setup a mesa 7i97T to control them with analog signal and get a feedback from the servo drive. I am sure I nailed all the wiring properly, but when I setup the MesaCT 2.1.8 to generate the configuration file I have doubts on what to put into the tool when it comes to selecting the axis Scale and then the encoder scale. My A6 drive have 17bit encoders that translate into 131072 pulse/rev. But I also see in the drive parameter that it is set by default 2500 lines ( that in quadrature should be 10000pulse/rev). my max velocity in the drive is set to 3000rpm.

My confusion is now to understand what parameters to input in the mesact config. for now I just want to test a motor (x axis) without any connection. Can someone expert chime in on the value to input in Max Velocity, Max acceleration, axis Scale, and encoder scale, to make this run and proceed to next step PID calibration? 
What I need is a clear explanation on what is SCALE vs Encoder Scale input field. I seem to be confused when I read the manual of the mesact. They seem to be the same thing. I understand that the scale should be calculated based on gear ration between encoder and motor etc etc. In my case the encoder is the motor encoder and the SCALE of the axis is for now not connected to anything. The plan is later to place this motor on a 1604 leadscrew (4 mm pitch).

Thanks in advance and apologies for this novice question, but could not find anywhere a clear explanation.

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

More
03 Dec 2025 17:19 #339691 by PCW
Replied by PCW on topic MesaCT 2.1.8: Scale vs Encoder Scale
The encoder scale with a 4mm pitch screw and 10000 counts per turn would be
2500 (counts per mm)

Not sure on MesaCT what the other scale refers to but possibly analog output scaling

LinuxCNCs maximum velocity should typically be about 80% of the drives maximum velocity
to allow control headroom. So with a 3000 RPM maximum drive speed, 160 mm/sec would
be a good maximum velocity (3000 RPM=50 RPS so 200 mm/s woudl be the velocity at 3000 RPM).
A good guess at maximum acceleration is 5X the maximum velocity
so 800 mm/s^2 (this means an axis will get to full speed in 1/5 of a second)

There are a number of tuning tutorials on the forum, assuming the drives are setup for velocity mode,
the most critical tuning parameter is FF1. If you set the analog scale to 200 (because at 10V the linear velocity
would be 200 mm/s) , FF1 will be 1.00
 
The following user(s) said Thank You: langdons

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

More
08 Dec 2025 20:44 #339881 by speppino
Replied by speppino on topic MesaCT 2.1.8: Scale vs Encoder Scale
Thanks a lot sir. I was able to make this work. Indeed the axis scale is in my case (direct motor connection to the leadscrew) equal to the screw pitch. For the max velocity I had to back it a bit, to avoid the motor to run away after the full acceleration was completed.

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

More
08 Dec 2025 20:53 #339882 by speppino
Replied by speppino on topic MesaCT 2.1.8: Scale vs Encoder Scale
I appreciate the time you spent to reply. You provide very good insight that made this work.
What I did was to put 4 in the axis scale and then I put 2500 in the encoder scale. For what I understood from your reply, Linuxcnc takes the 2500 counts and moltiply them by 4 (quadrature) then it divides it by the axis scale (4 again in this case). It was a bit confusing when reading the Mesact manual. I think that manual needs to be revised to explain this better for novice like me.

I tested this by changing a leadscrew with a 5mm pitch one. I had to place 5 in the axis scale and 2000 (2500 x 4 / 5) in the encoder scale. this worked also. I think this is such an important detail that should not be missed when setting up servos. So thank you all.

I was able to achieve a reasonable tuning as well following the servo tuning advice in this forum. I might have to tweak some small Ferror deviation at the very beginning and very end of the move. Lots to learn.

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

More
09 Dec 2025 17:58 #339922 by JT
Replied by JT on topic MesaCT 2.1.8: Scale vs Encoder Scale
In the ini file for a test I just did I see the following
JOINT_0
SCALE = 1000
ENCODER_SCALE = 10000

In the main.hal file
setp hm2_[MESA](BOARD).0.pwmgen.00.scale [JOINT_0]SCALE
setp hm2_[MESA](BOARD).0.encoder.00.scale [JOINT_0](ENCODER_SCALE)

JT

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

More
09 Dec 2025 22:08 #339928 by PCW
Replied by PCW on topic MesaCT 2.1.8: Scale vs Encoder Scale
That's what I expected, its the output scale.
(analog scale for analog out, stepgen scale for step/dir out)

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

Time to create page: 0.067 seconds
Powered by Kunena Forum