Advantage of closing the position loop in LinuxCNC

More
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 

 

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

More
19 Oct 2022 09:45 #254503 by Ausschuss-Manufaktur
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. :)

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

More
19 Oct 2022 11:46 #254512 by arvidb
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!

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

More
24 Oct 2022 16:51 #254922 by Ausschuss-Manufaktur
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.

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

More
26 Oct 2022 18:34 #255119 by Todd Zuercher
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.

More
26 Oct 2022 20:19 #255129 by tommylight
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.

More
26 Oct 2022 21:50 #255140 by arvidb

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.

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.)

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

More
26 Oct 2022 21:51 #255141 by arvidb

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! :)

Does this not work when closing the loop in the drives? If so, why not?

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

More
26 Oct 2022 22:30 #255143 by tommylight

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! :)

Does this not work when closing the loop in the drives? If so, why not?


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.

More
26 Oct 2022 23:01 #255149 by arvidb

No it does not, LinuxCNC has no way of knowing that the machine moved while the drives were disabled.

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?

(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.171 seconds
Powered by Kunena Forum