Advantage of closing the position loop in LinuxCNC

More
26 Oct 2022 23:23 #255155 by tommylight

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?

Yes it is, all the good drives will keep encoders working and supplying feedback.
Both of our examples are feeding position info back to LinuxCNC, so the loop is closed in LinuxCNC.
New step/dir drives close the loop in the drive, and when there is no feedback to LinuxCNC it can not know machine moved while drives are disabled or enabled, hence open loop.

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

More
26 Oct 2022 23:36 - 26 Oct 2022 23:38 #255157 by arvidb
You can have feedback to LinuxCNC without closing the loop there. And if I'm not mistaken LinuxCNC will internally set actual (i.e. commanded) position to fed back position while drives are disabled.

I do know that I can run my EtherCAT drives like that: the loops are closed in the drive (no pids loaded in HAL at all), I get actual position feedback from the drive (that works also when the drives are disabled), and there is no problem with turning the drives back on again after they've been moved; LinuxCNC keeps track of where they are also while disabled.
Last edit: 26 Oct 2022 23:38 by arvidb. Reason: Clarity

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

More
27 Oct 2022 10:50 #255175 by Ausschuss-Manufaktur
Thanks for all the opinions. 
I think I’m going to use a 7i76e for now and go with Step/Dir controlled Delta Servos. 

Moving the Schaublins axis by Hand is probably not necessary I think. But I never really thought about it before. 
If I’m going to encounter problems with the Index signal or want to be able to move the axis like tommylight likes, I can always add a 7i85 and use the encoder signal like arvidb does :) 
The following user(s) said Thank You: arvidb

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

More
27 Oct 2022 12:09 #255179 by tommylight

You can have feedback to LinuxCNC without closing the loop there.

Yes, of course.
You can also set LinuxCNC to show the position from that feedback and use the other feedbacks for inner workings.

And if I'm not mistaken LinuxCNC will internally set actual (i.e. commanded) position to fed back position while drives are disabled.

I do not think so, changing feedback while LinuxCNC is running would cause a lot of issues in a lot of situations.
But i am also sure that if inclined, it can be made to do just that.

I do know that I can run my EtherCAT drives like that: the loops are closed in the drive (no pids loaded in HAL at all), I get actual position feedback from the drive (that works also when the drives are disabled), and there is no problem with turning the drives back on again after they've been moved; LinuxCNC keeps track of where they are also while disabled.

In that case, it is a closed loop system at the LinuxCNC side, also most probably loop is closed in the drives so LinuxCNC gets just the actual position.

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

More
27 Oct 2022 16:38 #255203 by arvidb

And if I'm not mistaken LinuxCNC will internally set actual (i.e. commanded) position to fed back position while drives are disabled.

I do not think so, changing feedback while LinuxCNC is running would cause a lot of issues in a lot of situations.

It does, here is the code:
    case EMCMOT_MOTION_DISABLED:
	/* set position commands to match feedbacks, this avoids
	   disturbances and/or following errors when enabling */
	emcmotStatus->carte_pos_cmd = emcmotStatus->carte_pos_fb;
	for (joint_num = 0; joint_num < ALL_JOINTS; joint_num++) {
	    /* point to joint struct */
	    joint = &joints[joint_num];
	    /* save old command */
	    joint->pos_cmd = joint->pos_fb;
	    /* set joint velocity and acceleration to zero */
	    joint->vel_cmd = 0.0;
	    joint->acc_cmd = 0.0;
	}

I do know that I can run my EtherCAT drives like that: the loops are closed in the drive (no pids loaded in HAL at all), I get actual position feedback from the drive (that works also when the drives are disabled), and there is no problem with turning the drives back on again after they've been moved; LinuxCNC keeps track of where they are also while disabled.

In that case, it is a closed loop system at the LinuxCNC side, also most probably loop is closed in the drives so LinuxCNC gets just the actual position.


No, the loops are closed only in the drives. That LinuxCNC receives feedback does not mean it's closing the loop since it does not use that feedback to produce a control signal. (It only outputs an open-loop position reference.)

I guess you could argue that it's kind of a time-shared control where the drive closes the loop while the servos are active and LinuxCNC closes the loop when the servos are inactive. :) But besides being a bit silly it also misses the point that you can get the performance benefits of closing the loops in the drives and still be able to move the joints by hand without any problems.

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

More
27 Oct 2022 21:51 #255250 by andypugh

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 LinuxCNC PID had a "command-deriv" pin that can be connected to the joint motor velocity output for direct feedforward. ( joint.N.joint-vel-cmd )
The following user(s) said Thank You: arvidb

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

More
24 Apr 2024 20:14 #299021 by Ehsan_R
I am controlling a robotic arm using a few servo motors
Sometimes it is necessary to disable the motors and move the arm manually. In this case, I want to receive the position change from the motor encoder.
Does anyone know how to do this?

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

More
24 Apr 2024 20:59 #299025 by tommylight
Yes, you wire the "machine-is-enabled" or "amplifier-enable" pin to actual drive enable.
But first, are the encoders wired back to LinuxCNC in any way?
The following user(s) said Thank You: Ehsan_R

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

More
25 Apr 2024 05:47 #299042 by Ehsan_R
Yes, I can see the encoder data in the show hal congratulations menu
Can you explain in detail how to do this?

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

More
25 Apr 2024 08:52 #299051 by tommylight
Start a new topic with details about the hardware in use.

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

Time to create page: 0.135 seconds
Powered by Kunena Forum