Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
02 Mar 2022 13:45 #236169
by decor82
Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives was created 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.
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.
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?
I have attached the compete ini and hal file.
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.
#==================
# 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.
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?
I have attached the compete ini and hal file.
Attachments:
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
02 Mar 2022 13:55 #236171
by tommylight
Replied by tommylight on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
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.
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.
The following user(s) said Thank You: decor82, abdulasis12
Please Log in or Create an account to join the conversation.
02 Mar 2022 14:31 #236180
by decor82
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
Replied by decor82 on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
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.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
02 Mar 2022 14:40 #236183
by tommylight
Replied by tommylight on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
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.
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.
Please Log in or Create an account to join the conversation.
02 Mar 2022 16:53 #236197
by chris@cnc
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.
Replied by chris@cnc on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
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
[/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?
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
Please Log in or Create an account to join the conversation.
02 Mar 2022 23:53 #236231
by andypugh
Replied by andypugh on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
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
(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.
You can go entirely open-loop. There is no PID loop and you simply send position commands straight to the stepgen, ie
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.
03 Mar 2022 23:33 - 03 Mar 2022 23:55 #236292
by H2B
Replied by H2B on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
I am currently commissioning my first CNC setup with the same 7i76e and 4x Delta B2 drives, (dual driven Y gantry router), and from my tests so far to get everything running, I don't touch the default PID values in LinuxCNC, as they're designed to be used with analog servo drives that feed the encoder signal back into the controller to "close the loop."
Modern servos, like the Delta B2 drives, close the loop at the drive and as far as LinuxCNC is concerned, are simply stepper drivers. You can feed back the ALRM pin from the B2 drive into LinuxCNC to trigger an estop condition if the servos lag behind for any reason, and you can control how granular this encoder feedback threshold using the parameters of the drive itself.
I've personally ended up using the following pins from the 30+ pins offered by the B2 drives (plus the 4 pins for STEP+DIR, of course!).
Drive outputs, which are digital inputs to the Mesa board:
SRDY (servo is powered on, no alarm)
ALRM (servo has tripped an alarm, machine must stop)
BRKR (brake control output from the drive, used to drive a relay controlling the servo break on my Z axis)
Drive inputs, which are digital outputs from the Mesa board:
SON (switch servo on - basically an enable signal to the axis, and not the enable signal from the stepgen commands)
ARST (alarm reset, when estop is lifted, to clear any alarm flags on the drive)
EMGS (send the servo an estop command, which should be common to all axes simultaneously)
NL (reverse inhibit limit - for axes hard limit at min position)
PL (forward inhibit limit - for axes hard limit at max position)
I've also set up my estop using an estop latch, which takes care of lifting the AL-013 when I disable the estop in LinuxCNC (pressing F1), and then lifts the AL-014/015 (for the NL and PL flags) when I enable the machine power (pressing F2). Found this works nicely. Had to invert logic the ALRM output pin from the Mesa card (going to the ALRM input on the drives) such that the drives remain in AL-013 (estop) state if the boards and drives are powered up, but the LinuxCNC software is not loaded yet. That way everything cannot move until control is established on the PC and you're off to the races.
You can also come up with a use for the overload signal (OLW) from the drives to trigger a warning light of some sorts on a custom panel if you'd like, something I would be exploring in the future.
And for the stepper timing diagrams, see page 6-4 of the manual (Section 6.2.1: Position Command in PT Mode) for a breakdown of minimum step sizes. This is configurable based on parameter P1-00 and can go down as low as 150ns for minimum pulse width, but this will depend if you're using the hi speed pulse input (which can run at 500KHz, but most likely you're using the differential input that's capped at 200KHz). I've set mine as low as 800 in LinuxCNC for all 4 relevant values (DIRSETUP, DIRHOLD, STEPLEN, STEPSPACE), but leaving them at 1000-2000 works just fine. This will just set your maximum speed based on your machine.
Modern servos, like the Delta B2 drives, close the loop at the drive and as far as LinuxCNC is concerned, are simply stepper drivers. You can feed back the ALRM pin from the B2 drive into LinuxCNC to trigger an estop condition if the servos lag behind for any reason, and you can control how granular this encoder feedback threshold using the parameters of the drive itself.
I've personally ended up using the following pins from the 30+ pins offered by the B2 drives (plus the 4 pins for STEP+DIR, of course!).
Drive outputs, which are digital inputs to the Mesa board:
SRDY (servo is powered on, no alarm)
ALRM (servo has tripped an alarm, machine must stop)
BRKR (brake control output from the drive, used to drive a relay controlling the servo break on my Z axis)
Drive inputs, which are digital outputs from the Mesa board:
SON (switch servo on - basically an enable signal to the axis, and not the enable signal from the stepgen commands)
ARST (alarm reset, when estop is lifted, to clear any alarm flags on the drive)
EMGS (send the servo an estop command, which should be common to all axes simultaneously)
NL (reverse inhibit limit - for axes hard limit at min position)
PL (forward inhibit limit - for axes hard limit at max position)
I've also set up my estop using an estop latch, which takes care of lifting the AL-013 when I disable the estop in LinuxCNC (pressing F1), and then lifts the AL-014/015 (for the NL and PL flags) when I enable the machine power (pressing F2). Found this works nicely. Had to invert logic the ALRM output pin from the Mesa card (going to the ALRM input on the drives) such that the drives remain in AL-013 (estop) state if the boards and drives are powered up, but the LinuxCNC software is not loaded yet. That way everything cannot move until control is established on the PC and you're off to the races.
You can also come up with a use for the overload signal (OLW) from the drives to trigger a warning light of some sorts on a custom panel if you'd like, something I would be exploring in the future.
And for the stepper timing diagrams, see page 6-4 of the manual (Section 6.2.1: Position Command in PT Mode) for a breakdown of minimum step sizes. This is configurable based on parameter P1-00 and can go down as low as 150ns for minimum pulse width, but this will depend if you're using the hi speed pulse input (which can run at 500KHz, but most likely you're using the differential input that's capped at 200KHz). I've set mine as low as 800 in LinuxCNC for all 4 relevant values (DIRSETUP, DIRHOLD, STEPLEN, STEPSPACE), but leaving them at 1000-2000 works just fine. This will just set your maximum speed based on your machine.
Last edit: 03 Mar 2022 23:55 by H2B.
The following user(s) said Thank You: tommylight, Unlogic
Please Log in or Create an account to join the conversation.
- P1-Engineering
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 8
05 Mar 2022 22:25 #236458
by P1-Engineering
Replied by P1-Engineering on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
SK1006 like the the German Kohler CNC routers?.
If so I would be very interested in your experiences and which servos you went with.
I'm currently upgrading my SK0704 coming from the JMC servos and Eding CNC.
For more performance I'm going to Linux and Delta servos but also considering the Clearpath's for the ease of tuning from what I can read.
If so I would be very interested in your experiences and which servos you went with.
I'm currently upgrading my SK0704 coming from the JMC servos and Eding CNC.
For more performance I'm going to Linux and Delta servos but also considering the Clearpath's for the ease of tuning from what I can read.
Please Log in or Create an account to join the conversation.
05 Mar 2022 22:32 #236460
by H2B
Replied by H2B on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
I just finished using the ASDA Soft tuning for a dry run. Its quite easy to set up, but until everything is mounted and I break out the gauge blocks and DTI, we'll never know.
I found the Delta's to be great value for money, and I'd recommend looking into the A2 series instead of the B2 series. Slight increase in cost per drive (about 50EUR per drive), but you get a lot of advanced functionality (like the capacity to integrate linear encoders down the line, gantry control, etc.).
I found the Delta's to be great value for money, and I'd recommend looking into the A2 series instead of the B2 series. Slight increase in cost per drive (about 50EUR per drive), but you get a lot of advanced functionality (like the capacity to integrate linear encoders down the line, gantry control, etc.).
The following user(s) said Thank You: P1-Engineering
Please Log in or Create an account to join the conversation.
- P1-Engineering
- Offline
- Junior Member
Less
More
- Posts: 30
- Thank you received: 8
07 Mar 2022 22:51 #236611
by P1-Engineering
Replied by P1-Engineering on topic Linuxcnc with Mesa 7i76e and Delta ASDA-B2 Servo Drives
Thanks for the tip!.
Didn't know that option existed. The difference is a bit more though, around €150 per 400 watt drive set. You need the A2-L drive which seems to add a bit more compared to the standard A2.
Best pricing I could find was €500 per set including cables and such.
Didn't know that option existed. The difference is a bit more though, around €150 per 400 watt drive set. You need the A2-L drive which seems to add a bit more compared to the standard A2.
Best pricing I could find was €500 per set including cables and such.
Please Log in or Create an account to join the conversation.
Time to create page: 0.106 seconds