Mesa 7i95T PID tuning for velocity mode

More
2 years 5 months ago #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:
 

Attachment not found



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

Attachment not found



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

Please Log in to join the conversation.

More
2 years 5 months ago #300832 by PCW
Did you try turning off the encoder filter?
 

Please Log in to join the conversation.

More
2 years 5 months ago #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 to join the conversation.

More
2 years 5 months ago #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

Please Log in to join the conversation.

More
2 years 5 months ago #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.

Please Log in to join the conversation.

More
2 years 5 months ago #301444 by PCW
A description of the controlled hardware and the hal/ini
files would help diagnose homing issues.

Please Log in to join the conversation.

More
2 years 5 months ago #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

Please Log in to join the conversation.

More
2 years 5 months ago #301461 by zmrdko

Please Log in to join the conversation.

More
2 years 5 months ago #301481 by PCW
You must use encoder index enable with encoder feedback
 (and use stepgen index enable if you use stepgen feedback)

Please Log in to join the conversation.

More
2 years 5 months ago #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 to join the conversation.

Time to create page: 0.103 seconds
Powered by Kunena Forum