Mesa 7i95T PID tuning for velocity mode

More
17 May 2024 10:50 - 27 May 2024 08:40 #300817 by zmrdko
Hello,

according to JT the correct way to configure Mesa 7i95t (step/dir) is using velocity mode with feedback from servos. This involves tuning PID loop for velocity mode. I am using Delta B3L 400W servos with step/dir interface.
I succeeded in tuning PID to sufficient error with peaks at ~0.005mm at 12000mm/min and 1000mm/s^2 accels. This was done at 1000steps/mm stepping rate and the encoder scaled to same 1000pulses/rev. I decided to increase the stepping rate and encoder to 10000steps(pulses)/mm.

This is where I get issues: At maximum velocity 3000mm/min everyhing looks fine:
 

however if I increased jog velocity to 3300mm/min this happened:
 

I am suspicious, that this has to do with encoder read rate of Mesa 7i95t.
in manual they state:

MAXIMUM ENCODER COUNT RATE
The 7I95 uses multiplexed encoder signals to save FPGA pins. The multiplexing
rate will determine the maximum encoder count rate. Default multiplexing rate with
HostMot2 firmware is ClockLow /16,or approximately 6 MHz giving a resolvable count rate
of 3 MHz.
But according to my calculations I should be fine with speeds up to 300mm/s (10000*300=3 000 000).
I also noticed, that at rate 3300mm/min the 10mm jog resulted into ~17mm jog on the machine.
at 3000mm/min the 10mm jog was perfectly accurate.

Thanks

Attachments:
Last edit: 27 May 2024 08:40 by zmrdko.

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

More
17 May 2024 13:55 #300832 by PCW
Did you try turning off the encoder filter?
 
The following user(s) said Thank You: zmrdko

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

More
17 May 2024 19:17 #300855 by zmrdko
I don’t know how, but it worked.
I have learned from manual, that encoder filter = 1 requires 15 encoders counts to start counting. 0 makes it 3 encoder counts. But I don’t see how that impacts my issue.

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

More
17 May 2024 19:28 #300858 by PCW
Those are not encoder counts but rather sample clock counts of the encoder digital input filter
on the A,B,IDX pins. If the time (15*sample_clock_period if filter is true and 3*sample_clock_period
if filter is false) is greater than  the width of the A or B signals, the inputs will not be recognized
The following user(s) said Thank You: zmrdko

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

More
25 May 2024 18:38 - 25 May 2024 18:42 #301431 by zmrdko
It’s working fine now.
But the homing does not work properly.
Homing starts fine, all axes move towards home/limit switch and back off to index, but after that all axes quickly moves back to initial position, but now machine is homed. The initial position is servo feedback postion 0 (as where the servo driver was booted)

Did anyone come across similar behavior?
is there anything misconfigured? It looks like all axis get command to go to 0 position after homing, which is derived from servo drive encoder position..

I can record a video for reference.
Last edit: 25 May 2024 18:42 by zmrdko.

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

More
25 May 2024 20:58 #301444 by PCW
A description of the controlled hardware and the hal/ini
files would help diagnose homing issues.

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

More
26 May 2024 06:28 - 26 May 2024 06:40 #301459 by zmrdko
I'm sorry.
Hardware is
Delta B3-0421-L servos with step/dir control
LJ12A3-4-Z/AY proximity switch (PNP NC 4mm 6-36VDC)

and you can find the hal and ini files in attachment

Full config: github.com/zmrdko/mesa_7i95t_config_PID
Attachments:
Last edit: 26 May 2024 06:40 by zmrdko.

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

More
26 May 2024 06:46 #301461 by zmrdko

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

More
26 May 2024 14:09 #301481 by PCW
You must use encoder index enable with encoder feedback
 (and use stepgen index enable if you use stepgen feedback)
The following user(s) said Thank You: zmrdko

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

More
26 May 2024 15:37 #301487 by zmrdko
Awesome. It works flawlessly now. And I have what I always wanted. I have to home only once after starting LinuxCNC and now when I push power button, the servos are disabled, but LinuxCNC keeps the position of all the axes. So when I press power again, I don’t have to re-home!!

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

Time to create page: 0.112 seconds
Powered by Kunena Forum