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.

Time to create page: 0.060 seconds
Powered by Kunena Forum