mesa7i76e + 7i85s stepper motor + encoder feedback

More
2 years 7 months ago #295622 by meister
Hi Raban,
not realy, i can show you my related part of the .hal
but don't know how to do this with mesa and how to do the real PID-tuning

```
setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.0.maxoutput [JOINT_0]MAXOUTPUT
setp rio.stepdir15.velocity-scale [JOINT_0]SCALE_OUT
setp rio.stepdir15.position-scale [JOINT_0]SCALE_IN
net j0vel-cmd <= pid.0.output => rio.stepdir15.velocity
net j0pos-cmd <= joint.0.motor-pos-cmd => pid.0.command
net j0pos-fb <= rio.stepdir15.position => joint.0.motor-pos-fb
net j0pos-fb => pid.0.feedback
net j0enable <= joint.0.amp-enable-out => rio.stepdir15.enable
net j0enable => pid.0.enable

```

```
[JOINT_0]
# stepdir15
P = 50.0
I = 0.0
D = 0.0
BIAS = 0.0
FF0 = 0.0
FF1 = 0.0
FF2 = 0.0
DEADBAND = 0.01
MAXOUTPUT = 300
```

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

More
2 years 7 months ago #295645 by PCW

thank you meister ,
That's exactly the idea, but how is it configured?
Can you direct me to some specific document?
 
If you use pncconf to create the original hal/ini files, a PID loop will already be setup for each joint.
Changing the joint feedback source and tuning parameters are needed for encoder feedback.
(along with getting the encoder feedback in the correct direction and scaled properly)

Tuning can be done live using the calibrate menu.

_BUT_ as others have mentioned, simple adding encoders to a step/dir system will not solve a
missed step issue (though it can halt the system if this occurs) This is because when a missed
step occurs, the drive had insufficient torque and skipped one or more pole positions (1/50th of a turn)
Having the controller simply add more steps will not fix this (and least not without slowing the motion
significantly so the torque becomes higher)
The following user(s) said Thank You: meister

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

More
2 years 7 months ago #295724 by Raban
Thanks PCW, it's very clear.
the goal is for the milling machine to stop if for some reason the z axis stalls.
otherwise, a rapid crossing with the z in the wrong position can cause a disaster

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

Moderators: PCW, jmelson
Time to create page: 0.111 seconds
Powered by Kunena Forum