orient spindle with ethercat EL5101

More
29 Aug 2025 07:58 #334078 by laurentl38
orient spindle with ethercat EL5101 was created by laurentl38
Hello,

I would like to be able to orient the spindle in position.

The spindle encoder is a 1024-line encoder connected to an EL5101.

I've already set up a PID to control the spindle speed. The settings could still be improved, but for now it works and is acceptable.

However, for now, I can't get the spindle orientation to work. I'm not proficient enough with HAL to see where the problem might be.
If I start an M19 R10, for example, the spindle starts spinning and never stops. I've changed the PID values, but to no avail.
I have the impression I have an index problem, and I can't see it in the HALscope.

I'll send you the HAL and INI files, in case any of you experts spot a bug...

 

File Attachment:

File Name: EL7-schaublin-28.hal
File Size:10 KB
 

File Attachment:

File Name: EL7-Schaublin-28.ini
File Size:4 KB


Thank you in advance for your help.
Laurent
Attachments:

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

More
29 Aug 2025 08:48 #334080 by Hakan
Replied by Hakan on topic orient spindle with ethercat EL5101
Probably not the issue, but you should have these lines as the bottom-most addf lines
addf cia402.0.write-all       servo-thread
addf cia402.1.write-all       servo-thread
addf cia402.2.write-all       servo-thread
addf lcec.write-all           servo-thread
The addfs are executed in some order and these lines should be the last.

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

More
29 Aug 2025 08:48 #334081 by Rookie0
Replied by Rookie0 on topic orient spindle with ethercat EL5101
debug with halshow.

disable the spindle's motor,
run M19, then see if <mux2_orient.out> become less when u rotate the spindle manually to the right angle. the pin <orient.poserr> can tell u that if ur direction is right.

the expected result is: <mux2_orient.out> follows <orient.poserr> both become less, utill <orient.is-oriented> become true, so <mux2_orient.out> will be 0, means M19 is done, spindle could stop now.
if the pins work as expected, the problem maybe in pid component.

btw, i haven't configured a spindle orienting hal code with frequency converter, i use a servo spindle, orient in csp mode. it works nice and could lock at the angle after orienting.

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

More
29 Aug 2025 09:39 #334084 by laurentl38
Replied by laurentl38 on topic orient spindle with ethercat EL5101
mux2_orient.out always remains at zero (-0.01397) and doesn't move.
And orient.poserr decreases

The attached halscope (in halshow, I can't display orient.poserr)

 
Attachments:

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

More
29 Aug 2025 10:43 #334085 by Rookie0
Replied by Rookie0 on topic orient spindle with ethercat EL5101
your orient pid params in ini file, their values is 0, why?
you need to gradually debug these values.
all are 0 it's wrong. At least P and D have non-zero values.

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

More
29 Aug 2025 11:25 #334086 by laurentl38
Replied by laurentl38 on topic orient spindle with ethercat EL5101
To set the PID for the spindle speed, I had to set FF0 before setting P and I, otherwise it would go straight to maximum speed.
So, I started the same process, I reassessed everything, except for trying to set FF0 to 0 and only play with P and I.
I just did it, and ohhhh!!! It moves and stops (only for small angular movements, about 10 degrees, and it's not always reproducible). Above that, it's unstable and starts spinning at full speed.

Well, first of all, it's not a hardware problem, the hal seems to be working, I need to look at the PID values ​​again.

By being so obsessed with it, you end up losing sight of the basic elements... thanks for putting this back on track...

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

More
31 Aug 2025 12:39 #334178 by laurentl38
Replied by laurentl38 on topic orient spindle with ethercat EL5101
I thought I was on the right track. I played with the PID coefficients all weekend, but nothing conclusive.
With an M19 R10, the spindle jams and eventually stops, but "orient.is-oriented" never goes to 1.
If I repeat an M19 R5, for example, nothing happens. If I repeat an M19 R30, the spindle ends up running at maximum speed.
In any case, it's rarely reproducible twice in a row.

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

Time to create page: 0.097 seconds
Powered by Kunena Forum