Advantage of closing the position loop in LinuxCNC
- Ausschuss-Manufaktur
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 10
19 Oct 2022 09:40 #254502
by Ausschuss-Manufaktur
Hello Everyone,
Im retrofitting a Schaublin 125 CNC like the one RotarySMP has.
I have been thinking about how I want to set up the control loop of both of the linear axis, which got me wondering.
What’s the advantage of using LinuxCNC to close the position loop instead of having the whole pid in the Servo driver?
Of course, when retrofitting a machine by using the original Motors and drivers (analog control) and linear encoders, closing the position loop in LinuxCNC makes perfekt sense.
But with new motors and drives I don’t see a real advantage.
The Digital PID Controller in modern Servo Systems should be much faster and precise than using a mesa card and analog + encoder signals to close the positon loop right?
At least on modern Heidenhein control systems the PID is completely done by the Servo controller as much as I know.
Modern Servo drives like the Delta A2 can also directly take the TTL signal of a linear scale to close the position loop with a linear scale.
I don’t have to much experience with tuning, but tuning the whole system with one Programm should also be nicer than having to tune the position loop and the velocity/ current loop separate.
When using the cheapest Chinese Servos this is probably not the case, but it should when using Deltas or industrial grade ones right?
So in my opinion:
Pros:
Step/Dir instead of Analog + Encoder Inputs
-> less Hardware (Mesa cards)
-> less wiring
faster/ better PID control
easier to Tune
cons:
maybe more expensive Servo drives
One thing that I’m not to sure about is how to connect the index Signal from the Servo controller to the Mesa Card without a encoder input. (Precise Homing)
Maybe there is a specific electrical component to convert a 5v index signal to a 24v signal so a normal IO could be used?
maybe I forgot something important or lack some understanding
Lorenz
Im retrofitting a Schaublin 125 CNC like the one RotarySMP has.
I have been thinking about how I want to set up the control loop of both of the linear axis, which got me wondering.
What’s the advantage of using LinuxCNC to close the position loop instead of having the whole pid in the Servo driver?
Of course, when retrofitting a machine by using the original Motors and drivers (analog control) and linear encoders, closing the position loop in LinuxCNC makes perfekt sense.
But with new motors and drives I don’t see a real advantage.
The Digital PID Controller in modern Servo Systems should be much faster and precise than using a mesa card and analog + encoder signals to close the positon loop right?
At least on modern Heidenhein control systems the PID is completely done by the Servo controller as much as I know.
Modern Servo drives like the Delta A2 can also directly take the TTL signal of a linear scale to close the position loop with a linear scale.
I don’t have to much experience with tuning, but tuning the whole system with one Programm should also be nicer than having to tune the position loop and the velocity/ current loop separate.
When using the cheapest Chinese Servos this is probably not the case, but it should when using Deltas or industrial grade ones right?
So in my opinion:
Pros:
Step/Dir instead of Analog + Encoder Inputs
-> less Hardware (Mesa cards)
-> less wiring
faster/ better PID control
easier to Tune
cons:
maybe more expensive Servo drives
One thing that I’m not to sure about is how to connect the index Signal from the Servo controller to the Mesa Card without a encoder input. (Precise Homing)
Maybe there is a specific electrical component to convert a 5v index signal to a 24v signal so a normal IO could be used?
maybe I forgot something important or lack some understanding
Lorenz
Please Log in or Create an account to join the conversation.
- Ausschuss-Manufaktur
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 10
19 Oct 2022 09:45 #254503
by Ausschuss-Manufaktur
Replied by Ausschuss-Manufaktur on topic Advantage of closing the position loop in LinuxCNC
About my last point:
A simple optocoupler board should do the trick to connect the index signal to an 24v IO as i have just read.
A simple optocoupler board should do the trick to connect the index signal to an 24v IO as i have just read.
Please Log in or Create an account to join the conversation.
19 Oct 2022 11:46 #254512
by arvidb
Replied by arvidb on topic Advantage of closing the position loop in LinuxCNC
First: I am no expert on tuning CNC machines.
That said, I think you are right in that there are no real performance benefits of closing the loops in LinuxCNC as compared to the drives - and that there are, indeed, benefits of better dynamic range if you let the drives close the loops.
You can still benefit from feedback of torque, speed and position to LinuxCNC though, for analysing the tuning and monitoring performance. Even if you close the position loop in the drive, you can still feedback actual position (including index) to LinuxCNC if you want to. Just don't use it to close the loop!
That said, I think you are right in that there are no real performance benefits of closing the loops in LinuxCNC as compared to the drives - and that there are, indeed, benefits of better dynamic range if you let the drives close the loops.
You can still benefit from feedback of torque, speed and position to LinuxCNC though, for analysing the tuning and monitoring performance. Even if you close the position loop in the drive, you can still feedback actual position (including index) to LinuxCNC if you want to. Just don't use it to close the loop!
Please Log in or Create an account to join the conversation.
- Ausschuss-Manufaktur
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 10
24 Oct 2022 16:51 #254922
by Ausschuss-Manufaktur
Replied by Ausschuss-Manufaktur on topic Advantage of closing the position loop in LinuxCNC
Thanks for giving your input, I agree with everything you say
If none of the pros see a problem with my Argumentation I’m gonna go with a step/dir controlled Servo system.
If none of the pros see a problem with my Argumentation I’m gonna go with a step/dir controlled Servo system.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5034
- Thank you received: 1430
26 Oct 2022 18:34 #255119
by Todd Zuercher
Replied by Todd Zuercher on topic Advantage of closing the position loop in LinuxCNC
The one real advantage to having the position loop closed in Linuxcnc, is being able to take full advantage of feed forwards in the loop. Otherwise the loop is always only reactionary with the loop closed in the drive.
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 18726
- Thank you received: 6296
26 Oct 2022 20:19 #255129
by tommylight
Replied by tommylight on topic Advantage of closing the position loop in LinuxCNC
Personally the main thing that makes my life much easier is the ability to disable motors and move the machine by hand and still have the position correct, enable motors and continue working!
The following user(s) said Thank You: Ehsan_R
Please Log in or Create an account to join the conversation.
26 Oct 2022 21:50 #255140
by arvidb
Replied by arvidb on topic Advantage of closing the position loop in LinuxCNC
How is this different from using feed forward in the drive's controller? (LinuxCNC's HAL pid component calculates the feed forward values reactively too, from the derivative of the command signal.)The one real advantage to having the position loop closed in Linuxcnc, is being able to take full advantage of feed forwards in the loop. Otherwise the loop is always only reactionary with the loop closed in the drive.
Please Log in or Create an account to join the conversation.
26 Oct 2022 21:51 #255141
by arvidb
Replied by arvidb on topic Advantage of closing the position loop in LinuxCNC
Does this not work when closing the loop in the drives? If so, why not?Personally the main thing that makes my life much easier is the ability to disable motors and move the machine by hand and still have the position correct, enable motors and continue working!
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 18726
- Thank you received: 6296
26 Oct 2022 22:30 #255143
by tommylight
No it does not, LinuxCNC has no way of knowing that the machine moved while the drives were disabled.
I use this a lot, or used it a lot to test stuff on big industrial machines, saves a lot of time homing and referencing material etc.
Also makes troubleshooting much more pleasant!
Replied by tommylight on topic Advantage of closing the position loop in LinuxCNC
Does this not work when closing the loop in the drives? If so, why not?Personally the main thing that makes my life much easier is the ability to disable motors and move the machine by hand and still have the position correct, enable motors and continue working!
No it does not, LinuxCNC has no way of knowing that the machine moved while the drives were disabled.
I use this a lot, or used it a lot to test stuff on big industrial machines, saves a lot of time homing and referencing material etc.
Also makes troubleshooting much more pleasant!
Please Log in or Create an account to join the conversation.
26 Oct 2022 23:01 #255149
by arvidb
(Step/dir servos would have to reset their position register to the current position when enabled again or they would give a following error if they had been moved while disabled; not sure how they handle that since I don't have any such drives.)
Replied by arvidb on topic Advantage of closing the position loop in LinuxCNC
Hmm, I have limited experience, but both my old Yaskawa drives (±10V) and my more modern Omrons (EtherCAT) continue to supply encoder info when disabled. Is that not common?No it does not, LinuxCNC has no way of knowing that the machine moved while the drives were disabled.
(Step/dir servos would have to reset their position register to the current position when enabled again or they would give a following error if they had been moved while disabled; not sure how they handle that since I don't have any such drives.)
Please Log in or Create an account to join the conversation.
Time to create page: 0.102 seconds