- Posts: 35
- Thank you received: 0
orient spindle with ethercat EL5101
- laurentl38
- Topic Author
- Offline
- Junior Member
-
Less
More
1 year 2 months ago #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...
Thank you in advance for your help.
Laurent
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...
Attachment not found
Attachment not found
Thank you in advance for your help.
Laurent
Please Log in to join the conversation.
1 year 2 months ago #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
The addfs are executed in some order and these lines should be the last.
Code:
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
Please Log in to join the conversation.
1 year 2 months ago #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.
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 to join the conversation.
- laurentl38
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
1 year 2 months ago #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)
And orient.poserr decreases
The attached halscope (in halshow, I can't display orient.poserr)
Attachment not found
Please Log in to join the conversation.
1 year 2 months ago #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.
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 to join the conversation.
- laurentl38
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
1 year 2 months ago #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...
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 to join the conversation.
- laurentl38
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
1 year 1 month ago #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.
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 to join the conversation.
- laurentl38
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
1 year 1 month ago #334230
by laurentl38
Replied by laurentl38 on topic orient spindle with ethercat EL5101
I'm trying a new approach by removing the PID for orientation and replacing it with a near component.But it's worse; even the speed control isn't working anymore, nothing's moving...Where are my mistakes?
I started from a version with only one pid speed that works.
With errors like ./EL7-schaublin-28.hal:326: Signal 'spindle-at-speed' of type 'float' cannot add pin 'spindle.0.at-speed' of type 'bit'
I tried to merge my speed pid with a spindle orientation example from talla83
talla83.homepage.t-online.de/linuxcnc/20181124_Spindel_5i25.zip
I started from a version with only one pid speed that works.
With errors like ./EL7-schaublin-28.hal:326: Signal 'spindle-at-speed' of type 'float' cannot add pin 'spindle.0.at-speed' of type 'bit'
Attachment not found
I tried to merge my speed pid with a spindle orientation example from talla83
talla83.homepage.t-online.de/linuxcnc/20181124_Spindel_5i25.zip
Please Log in to join the conversation.
1 year 1 month ago #334322
by Hakan
Replied by Hakan on topic orient spindle with ethercat EL5101
Could not fully follow it, but it looks like you give speed to the analog output in the spindle speed case as it should be.
But you give position to the analog output in the spindle orient case - which is wrong, should always be speed.
Worthwhile checking anyway.
But you give position to the analog output in the spindle orient case - which is wrong, should always be speed.
Worthwhile checking anyway.
Please Log in to join the conversation.
1 year 1 month ago #334378
by RayJr
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Replied by RayJr on topic orient spindle with ethercat EL5101
I am trying to learn how to set this up, so please do not take my comments as "expertise".
Have you checked the MUX2 select pin to see if it is switching when you start the orient routine?
I would think that you should start with the same pid parameters that are used in the "Spindle PID Parameter" int the Orientation section, then work from there.
Ray
Have you checked the MUX2 select pin to see if it is switching when you start the orient routine?
I would think that you should start with the same pid parameters that are used in the "Spindle PID Parameter" int the Orientation section, then work from there.
Ray
"No problem can be solved from the same level of consciousness that created it"
Albert Einstein
Please Log in to join the conversation.
Time to create page: 0.058 seconds
