Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives

More
4 years 7 months ago #236169 by decor82
Hello,

I have upgraded the Motors from my SK1006 from Closed Loop Steppers to Delta ASDA-B2 AC Servo Drives and after some EMV trouble the servos are working fine now. I have used the Autotune funktion to tune the servos with the Delta Software.

I have figured out a Linuxcnc config that is working, but there are some things i want to understand to eventually optimize my config. I use Step / Dir to drive the Servos.

Here are the config of one of the axis.
Code:
#================== #      X Axis #================== [AXIS_X] MAX_VELOCITY =          166.666666667 MAX_ACCELERATION =      1000 MIN_LIMIT = -610.0 MAX_LIMIT = 0.01 [JOINT_0] TYPE = LINEAR MAX_VELOCITY = 166.666666667 MAX_ACCELERATION = 1000 STEPGEN_MAXVEL = 180 STEPGEN_MAXACCEL = 1500 HOME = 0.0 FERROR = 10.0 MIN_FERROR = 1.0 MAX_OUTPUT = 0.0 DIRSETUP   = 1000 DIRHOLD    = 1000 STEPLEN    = 1000 STEPSPACE  = 1000 STEP_SCALE = -2000.0 MIN_LIMIT = -610 MAX_LIMIT = 0.01 HOME_OFFSET = 3.000000 HOME_SEARCH_VEL = 30.000000 HOME_LATCH_VEL = -1.000000 HOME_FINAL_VEL = 1.000000 HOME_USE_INDEX = NO HOME_IGNORE_LIMITS = YES HOME_SEQUENCE = -1 # PID tuning params P = 1000.0 I = 0.0 D = 0.0 FF0 = 0.0 FF1 = 1.0 FF2 = 0.0 BIAS = 0.0 DEADBAND = 0.0

For my understanding, the "PID tuning params" section is only really needed if i use 0-10v to drive the servo. But if i remove the section, i get following errors from Linuxcnc. Do i need these PID tuning parameters if i use Step / Dir for my servos?

The other part i dont really understand are these parameters.
Code:
FERROR = 10.0 MIN_FERROR = 1.0 MAX_OUTPUT = 0.0 DIRSETUP   = 1000 DIRHOLD    = 1000 STEPLEN    = 1000 STEPSPACE  = 1000

If i dont use the PID tuning parameters, i think i have to adjust these to get no following errors. But how can i find the best values for these parameters with my servo motors?

 

File Attachment:

File Name: SK1006.hal
File Size:11.07 KB


 

File Attachment:

File Name: SK1006.ini
File Size:5.4 KB

I have attached the compete ini and hal file.

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

More
4 years 7 months ago #236171 by tommylight
Q: Do i need these PID tuning parameters if i use Step / Dir for my servos?
A: Yes. And P has to be 1000 for a 1MS servo period, so do not change those.

Q:If i dont use the PID tuning parameters, i think i have to adjust these to get no following errors.
A:not really if everything is working properly. If you notice missed steps or random size changes, then change those values. A good starting point is:
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
Dir stuff does not play much role so even at 20000 it will be OK, but step stuff does so if you need more speed = lover the step values.

ASUS ROG Crosshair VIII Impact - AMD X570
The following user(s) said Thank You: decor82, Sadmeatball, abdulasis12

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

More
4 years 7 months ago #236180 by decor82

Q: Do i need these PID tuning parameters if i use Step / Dir for my servos?
A: Yes. And P has to be 1000 for a 1MS servo period, so do not change those.
 


Hi,

thanks for the fast answer. I have read the servo tuning tutorial and it says "P - Tune to maximum stiffness without oscillation." but you say P has to be 1000. Does this mean that the tune to maximum stiffness is only for 0-10v and with a Step / Dir config i dont tune these values and use only the Servo Drive with the Delta Software for tuning?

Best regards,
Jan
The following user(s) said Thank You: tommylight

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

More
4 years 7 months ago #236183 by tommylight
You are using step/dir control type, so there is no tuning in LinuxCNC as there is no feedback from encoders to LinuxCNC. Assuming this fro the 7i76E card as it has only encoder for spindle.
When using servo systems with step/dir control, IT IS a stepper system, not a servo, so analog tuning stuff does not apply. All the "position" tuning should be done and controlled by the drive.

ASUS ROG Crosshair VIII Impact - AMD X570

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

More
4 years 7 months ago #236197 by chris@cnc

Code:
[code]If i dont use the PID tuning parameters, i think i have to adjust these to get no following errors. But how can i find the best values for these parameters with my servo motors?
[/code]

 
The main challenge is that all axis play together. No matter to spend much time to find the best parameter for each axis if in circle or 3 axis mode you get eggs, corners or chamfers. The Delta Servos works well with the Step/Dir values
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 1000
STEPSPACE = 1000
For the PID as Tommy suggest.
P=1000 I=0 D=0 in case of open loop to lcnc.
For axis check, cut some circles in different diameter and check its round or not. A second test for Z-Axis could be a cut a wave.
The following user(s) said Thank You: tommylight, Sadmeatball

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

More
4 years 7 months ago #236231 by andypugh
There are two possible ways to run a stepper system with LinuxCNC.

You can go entirely open-loop. There is no PID loop and you simply send position commands straight to the stepgen, ie
Code:
net some-axis-pos-cmd joint.N.motor-pos-cmd => stepgen.N.position-cmd

(Note, I am too lazy at this time of night to check any actual HAL pin names. Consider this pseudo-code)

This works well, as there is a control loop built in to the step generator. But it does not work perefectly, specifically the internal loop assumes that the servo thread update rate is exact.

Somewhat better results are obtained for systems with some variability in thread timing (ie real ones) by running a PID loop in HAL that correlates the fed-back stepgen position and the commanded position. This comes at the expense of a more complex HAL config and a little bit of tuning (but not much, P-Gain should always be 1000 for a 1mS servo thread)

FWIW if I ever use steppers, I run the simple way. But then if I am using a stepper I don't care about performance :-)

I think that a decent closed-loop stepper system would probably handle thread latency internally quite well. I think I would start with the simple structure. But given that you are probably using the PnCConf tool, you probably should stick with what that gives you.
The following user(s) said Thank You: abdulasis12

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

Time to create page: 0.512 seconds
Powered by Kunena Forum