Mill atc configuration
- Artur_1617
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 143
- Thank you received: 4
20 Aug 2023 12:14 - 20 Aug 2023 12:21 #278541
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
My encoder on spindle is ABZ with index output.
Add
net spindle-index-enable <=> orient-pid.index-enable
loadrt scale names=scale.spindle,scale.orient
addf scale.orient servo-thread
setp scale.orient.gain 58 #232/4 this is my setup from spindle
net spindle-vel-fb-rps => scale.orient.in
net orient-fb-rpm scale.orient.out
Can You write little more how connect this?
Add
net spindle-index-enable <=> orient-pid.index-enable
loadrt scale names=scale.spindle,scale.orient
addf scale.orient servo-thread
setp scale.orient.gain 58 #232/4 this is my setup from spindle
net spindle-vel-fb-rps => scale.orient.in
net orient-fb-rpm scale.orient.out
Can You write little more how connect this?
Attachments:
Last edit: 20 Aug 2023 12:21 by Artur_1617.
Please Log in or Create an account to join the conversation.
20 Aug 2023 12:40 - 20 Aug 2023 12:40 #278542
by Aciera
Replied by Aciera on topic Mill atc configuration
I would try like this:
1. Remove these lines:
setp scale.orient.gain 58
net spindle-vel-fb-rps => scale.orient.in
net orient-fb-rpm scale.orient.out => #abs.orient.in
2. Change these lines:
# Encoder position into orient component and orient pid
net spindle-revs => orient.position
net spindle-revs => orient-pid.feedback
to this:
setp scale.orient.gain 0.00277778
net spindle-revs => scale.orient.in
net spindle-revs-scaled <= scale.orient.out => orient.position => orient-pid.feedback
1. Remove these lines:
setp scale.orient.gain 58
net spindle-vel-fb-rps => scale.orient.in
net orient-fb-rpm scale.orient.out => #abs.orient.in
2. Change these lines:
# Encoder position into orient component and orient pid
net spindle-revs => orient.position
net spindle-revs => orient-pid.feedback
to this:
setp scale.orient.gain 0.00277778
net spindle-revs => scale.orient.in
net spindle-revs-scaled <= scale.orient.out => orient.position => orient-pid.feedback
Last edit: 20 Aug 2023 12:40 by Aciera.
The following user(s) said Thank You: Artur_1617
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 143
- Thank you received: 4
20 Aug 2023 13:20 #278544
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Not working.
screen8 is after turn 10times cw spindle with hand
screen9 is after start orient. And finish turn 10times cww for orient
screen8 is after turn 10times cw spindle with hand
screen9 is after start orient. And finish turn 10times cww for orient
Attachments:
Please Log in or Create an account to join the conversation.
20 Aug 2023 13:35 #278545
by Aciera
Replied by Aciera on topic Mill atc configuration
If you look at 'orient-pid.feedback' and turn the spindle by hand, does is go from 0 to 1 in one revolution and then start at 0 again?
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 143
- Thank you received: 4
20 Aug 2023 13:58 - 20 Aug 2023 14:05 #278547
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
orient-pid.feedback after one turn is 0,0027 and not set to zero it keeps growing.
I marked spindle shaft.
And if start linuxcnc with mark on position 0 this well be 0 for orient. I turn spindle to 90 and start linuxcnc this is new 0.
For now index is random not from index encoder input.
I marked spindle shaft.
And if start linuxcnc with mark on position 0 this well be 0 for orient. I turn spindle to 90 and start linuxcnc this is new 0.
For now index is random not from index encoder input.
Last edit: 20 Aug 2023 14:05 by Artur_1617.
Please Log in or Create an account to join the conversation.
20 Aug 2023 14:45 #278549
by Aciera
Replied by Aciera on topic Mill atc configuration
I see, so you will have to loadrt and addf a 'not' component (say 'not.spindle-index') and use the encoder input index to reset the encoder counter:
Like this:
net spindle-input-index <= hm2_5i25.0.encoder.04.input-index => not.spindle-index.in
net spindle-enc-reset <= not.spindle-index.out => hm2_5i25.0.encoder.04.reset
Like this:
net spindle-input-index <= hm2_5i25.0.encoder.04.input-index => not.spindle-index.in
net spindle-enc-reset <= not.spindle-index.out => hm2_5i25.0.encoder.04.reset
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 143
- Thank you received: 4
20 Aug 2023 15:58 - 20 Aug 2023 16:16 #278553
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Maked the changes and;
If turn spindle cww encoder.04.count go from 0 to 232 then set to 0 and go again 0 to 232 and we have some orient-pid.feedback working
If turn spindle cw encoder.04.count not count nothing only when past index show 1 and back to 0. After this orient not start orient-pid.feedback is 0
When orient direction is close for run cww start orient and still turning becouse not count on encoder.04.count input
Encoder 04 is true out of index and is false when is on index is important?
Screen11 after turn spindle cw
Screen12 after turn spindle ccw
If turn spindle cww encoder.04.count go from 0 to 232 then set to 0 and go again 0 to 232 and we have some orient-pid.feedback working
If turn spindle cw encoder.04.count not count nothing only when past index show 1 and back to 0. After this orient not start orient-pid.feedback is 0
When orient direction is close for run cww start orient and still turning becouse not count on encoder.04.count input
Encoder 04 is true out of index and is false when is on index is important?
Screen11 after turn spindle cw
Screen12 after turn spindle ccw
Attachments:
Last edit: 20 Aug 2023 16:16 by Artur_1617.
Please Log in or Create an account to join the conversation.
20 Aug 2023 17:52 #278557
by Aciera
Replied by Aciera on topic Mill atc configuration
Sounds like your encoder scale is not correct, so you'll have to fix that first.If turn spindle cww encoder.04.count go from 0 to 232 then set to 0 and go again 0 to 232
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 143
- Thank you received: 4
20 Aug 2023 18:37 #278559
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Encoder is 58 imp per rev 58x4=232
But now see other things. When turn spindle with hand wery slow see encoder is couting onlt to 230 when On index. And start counting again when index is off. We loos two encoder count.
But now see other things. When turn spindle with hand wery slow see encoder is couting onlt to 230 when On index. And start counting again when index is off. We loos two encoder count.
Please Log in or Create an account to join the conversation.
20 Aug 2023 19:25 #278563
by Aciera
Replied by Aciera on topic Mill atc configuration
so i guess you could try changing this (1/360):
setp scale.orient.gain 0.00277778
to this (1/230):
setp scale.orient.gain 0.004347826
It's late now and I've run out of time for today. Good luck.
setp scale.orient.gain 0.00277778
to this (1/230):
setp scale.orient.gain 0.004347826
It's late now and I've run out of time for today. Good luck.
The following user(s) said Thank You: tommylight, Artur_1617
Please Log in or Create an account to join the conversation.
Time to create page: 0.189 seconds