question of Homing

More
05 Mar 2025 04:46 #323225 by Masa
question of Homing was created by Masa
I am using LinuxCNC+EtherCAT to retrofit an old NC controller in Japan. I am not good at English, so I am posting on the forum using Google Translate.

I apologize if it is difficult to read.

I am currently using an old torque-controlled servo amplifier controlled by Beckhoff's EL5101+EL4132.

The problem is that in Homing, Index-enable is connected to jioint, PID, and Encoder, but when it is moving at the HOME_LATCH_VEL speed, when it seems to detect the C phase of the Encoder, it goes into a runaway state for a moment and immediately goes to the HOME_FINAL_VEL speed.

After Homing ends, the same phenomenon does not occur when Homing is performed again. It only occurs during Homing immediately after powering on.

When I made it with EM7004 before, I was told that I did not connect Index-enable to PID, but this time I am having trouble resolving the problem.

I cannot increase the PID gain because it goes out of control.

I am attaching the INI and HAL. Please let me know if there are any mistakes.

I am using LinuxCNC 2.9.4. The EM7004 system was created with 2.3.2 and has not been upgraded.

I have asked a question on "General LinuxCNC Questions" about whether there is a problem with the PID, but I was unable to find a solution.

Thank you in advance.
sg01@SG01-1015:~$ ethercat slaves
0  0:0  OP  +  EK1100 EtherCAT-Koppler (2A E-Bus)
1  0:1  OP  +  EL5101 1Ch. Inc. Encoder 5V
2  0:2  OP  +  EL5101 1Ch. Inc. Encoder 5V
3  0:3  OP  +  EL5101 1K. Inc. Encoder 5V
4  0:4  OP  +  EL5101 1Ch. Inc. Encoder 5V
5  0:5  OP  +  EL4132 2Ch. Ana. Output +/-10V, 16bit
6  0:6  OP  +  EL4132 2Ch. Ana. Output +/-10V, 16bit
7  0:7  OP  +  EL1088 8Ch. Dig. Input 24V, 3ms, negative
8  0:8  OP  +  EL1088 8Ch. Dig. Input 24V, 3ms, negative
9  0:9  OP  +  EL2088 8Ch. Dig. Output 24V, 0.5A, switching to negative

 
Attachments:

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

More
07 Mar 2025 19:59 #323460 by andypugh
Replied by andypugh on topic question of Homing
LinuxCNC expects the encoder counts to be zeroed at the index. (then LinuxCNC uses the small number of remaining counts that accumulate as the axis comes to a stop to calculate the exact index position).

If your ethercat encoder counters don't do this then you will see the behaviour you describe. And, also, your home position will be wildly inconsistent.

If you have good homing switches you may be able to just not use home-to-index. Alternatively some HAL magic might be used to latch the C phase to look like the edge of a switch (and2 with the actual switch).

Reset on index might be a configurable option in the encoder counter.

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

More
10 Mar 2025 07:26 #323595 by Masa
Replied by Masa on topic question of Homing
Thanks for your reply, andypugh.

Unfortunately, the counter and position values ​​of the EL5101 being used seem to be reset the moment index-enable is turned OFF. The position where it stopped at the end of homing is the correct position. The coordinates of LinuxCNC are 0, and the POS position of the EL5101 is the same as the HOME_OFFSET value. It seems that it is not possible to avoid the excessive PID deviation when index-enable is turned OFF. This phenomenon does not occur when homing is performed again.

Until now, I have tried converting the Count value instead of the EL5101 POS and using it for Feedback, but it did not work.

It worked fine with the EM7004, but I'm starting to think that an external torque mode amplifier cannot be used with the Ethercat driver.

Thank you.

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

More
13 Mar 2025 00:45 #323788 by Masa
Replied by Masa on topic question of Homing
Hello everyone.

I have a report. The problem has been solved.

There was a misinterpretation in the HAL file I wrote.

I moved the two lines

addf motion-command-handler servo-thread and
addf motion-controller servo-thread

before the PID-related lines.

As a result, Homingd operation became normal.

I read the manual carefully and thought that if I understood it, I would not have to apologize for the order of writing.

I am Japanese, and it takes a lot of effort to understand English manuals at the same level as Japanese. Even when reading a Japanese translation, there are some parts that do not match the original English text.

If there is a part that describes the position of writing such as addf motion-command, please let me know. I would like to understand it well. Thank you for your valuable advice, andypugh.

Thank you.
The following user(s) said Thank You: tommylight

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

More
02 Apr 2025 20:55 #325544 by andypugh
Replied by andypugh on topic question of Homing
Have you connected the index-enable to the PID? That is intended to prevent a PID "bump".
pid.N.index-enable
linuxcnc.org/docs/stable/html/man/man9/pid.9.html#PINS

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

More
07 Apr 2025 02:21 #325850 by Soccer Kid
Replied by Soccer Kid on topic question of Homing
In fact, with torque control, I don't think Linuxcnc is up to the task, you should choose OMRON..... PMAC controller.

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

  • Todd Zuercher
  • Todd Zuercher's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
07 Apr 2025 11:16 #325862 by Todd Zuercher
Replied by Todd Zuercher on topic question of Homing
Torque commanded servo control is working perfectly fine on my cnc router with Linuxcnc. But a good fast low latency PC is required for good results.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.100 seconds
Powered by Kunena Forum