Mesa 7i95T - full closed loop with linear scales and delta asda A2 servos

More
08 Oct 2024 16:37 #311586 by vmihalca
Hi guys, 

When I had the old siemens drives, I bought a mesa 7i97 for analog control of the drives. In the meantime I replaced the servos with some new ones from delta that also have support for step-dir so I decided to replace the board with a 7i95T. 
I have the board wired, the axes do move in the right directions and the encoders are scaled. 
However even if I move the machine slowly, I get following errors and even with a huge FERROR set, it still errors out. 
Also its not clear to me how to properly set the values of STEPGEN_MAX_VEL and STEPGEN_MAX_ACCEL and other step/dir related parameters. 
After reading a few posts, I understood that I should try to make them work in open loop, then close the loop.
But if I don't link the encoder feedback, I need to set the scale to 40000 instead of 4000 to get 1mm of motion.
Its been over 5 years since I interacted with step dir and I can't say I properly understood them then. 
I don't know yet if I will connect the linear scale directly into the drives or if I will close the position loop in linuxcnc. 
I was thinking to let the drives close the position loop and just get the position feedback from the simulated encoder output of the drives. 

I generated a default configuration with a config tool, then I started modifying it.
I am attaching the files so that you can take a look over them.

Any suggestions would be appreciated.
Attachments:

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

More
08 Oct 2024 16:46 - 08 Oct 2024 16:46 #311587 by PCW
You do need to set both the stepgen scale and encoder scale so they
are commensurate (the steps/mm stepgen scale and counts/mm encoder scale
match the physical device scales). If not, you will get massive following errors.
 
Last edit: 08 Oct 2024 16:46 by PCW.

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

More
08 Oct 2024 16:51 #311588 by vmihalca
I have set both of them, but now they are set to the same value, if we just talk about the Z axis, its 4000

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

More
08 Oct 2024 16:55 #311589 by PCW
That will only work is the step/mm and encoder counts/mm = 4000
(and you get the directions right)

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

More
08 Oct 2024 17:08 #311590 by vmihalca
I am getting warnings that my stepgen.00.maxvel is too big for current step timing and position scale, clipping to max possible.
The same I get for stepgen.01

For now I unlinked the feedback from the encoders, so I get the position feedback from stepgen. The direction of movement is correct, but its slow and I get following errors

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

More
08 Oct 2024 17:22 #311592 by tommylight

I am getting warnings that my stepgen.00.maxvel is too big for current step timing and position scale, clipping to max possible.
The same I get for stepgen.01

Not important for now, we can deal with this later.

For now I unlinked the feedback from the encoders, so I get the position feedback from stepgen. The direction of movement is correct, but its slow and I get following errors

This means something is very wrong with your config, but do make sure you have stepgen feedback active for each axis/joint.
-
Did you check this:
forum.linuxcnc.org/10-advanced-configura...glass-scale-feedback
The following user(s) said Thank You: vmihalca

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

More
08 Oct 2024 17:53 #311595 by vmihalca
I think the problem is that the pulses per rev of the drive are too high. For my mill I have a ballscrew with 5mm pitch and the encoder scale is 400.
For the lathe, I have the same 5mm pitch but I need to set the scale to 40000 to make one turn. I am now trying to figure out how to reduce the number of steps per revolution on a delta asda a2, but chatgpt takes me offroad...

I have all the steps in your post, I am not yet connected to the real feedback, and what I can see is that when I spin the mpg, the axis is lagging, it takes some time to complete. I also increased the error to 10..

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

More
08 Oct 2024 18:12 - 08 Oct 2024 18:55 #311598 by PCW
One obvious issue in the ini file is the the joint velocity is higher than the stepgen maxvel
Stepgen maxvel should always be at least 25% greater than the maximum joint velocity.
If stepgen maxvel is lower than the joint velocity you will get a instant following error when
the joint velocity exceeds the stepgen maxvel.

Some thing goes for stepgen max_acc
Last edit: 08 Oct 2024 18:55 by PCW.
The following user(s) said Thank You: vmihalca

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

More
08 Oct 2024 19:56 #311606 by vmihalca
By using your guide, I was able to set up closed loop using the feedback from the simulated driver encoder. Now I have two scales:
step scale - how many steps do I need for 1 mm of travel
encoder scale - how many pulses do I get per 1mm of travel

The linear scales are not yet connected, I need to figure out if its better to link them into the drives or into mesa.

If you have any thoughts on this, please let me know.

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

Time to create page: 0.153 seconds
Powered by Kunena Forum