Mill atc configuration
- Artur_1617
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 143
- Thank you received: 4
04 Sep 2023 16:21 - 05 Sep 2023 08:42 #279844
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Now rigid tapping working and encoder count is set to 0 after hit index.Start orient after tapping with encoder count no past 232 encoder count working ok.But if turn spindle cw 50 times and stop. orient-pid.command and orient-pid.feedback is 50.0When orient start orient-pid.feedback is reset to 0 but orient-pid.command is still 50.0 spindle turn and not stop.
Actual hal
Actual hal
Attachments:
Last edit: 05 Sep 2023 08:42 by Artur_1617.
Please Log in or Create an account to join the conversation.
04 Sep 2023 19:00 #279862
by Aciera
Replied by Aciera on topic Mill atc configuration
Something went wrong with that Hal file upload.
I don't think we should be resetting the encoder count, so i would suggest to revert the last change.
So remove this:
net spindle-index-enable <= hm2_5i25.0.encoder.04.input-index
net orient-enable => and2.1.in0
net spindle-input-index => and2.1.in1
net encoder-reset <= and2.1.out => hm2_5i25.0.encoder.04.reset
and replace with this:
net spindle-index-enable <= hm2_5i25.0.encoder.04.input-index
And remove the 'loadrt/addf' for the 'and2.1' component.
I would try again with this and check 'orient-pid.command' and 'orient-pid.feedback'. Maybe that points us in the right direction. Other than that I have run out of ideas for the moment and I don't have a system to test spindle.orient with.
I don't think we should be resetting the encoder count, so i would suggest to revert the last change.
So remove this:
net spindle-index-enable <= hm2_5i25.0.encoder.04.input-index
net orient-enable => and2.1.in0
net spindle-input-index => and2.1.in1
net encoder-reset <= and2.1.out => hm2_5i25.0.encoder.04.reset
and replace with this:
net spindle-index-enable <= hm2_5i25.0.encoder.04.input-index
And remove the 'loadrt/addf' for the 'and2.1' component.
I would try again with this and check 'orient-pid.command' and 'orient-pid.feedback'. Maybe that points us in the right direction. Other than that I have run out of ideas for the moment and I don't have a system to test spindle.orient with.
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
05 Sep 2023 09:40 #279937
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
On 1screenshoot we have working orient with pid.coomand and pid.error after 100 turns of spindle and spindle turn and not stop. The pid feedback was to 100 but after hit index is set to 1
Aciera I make the change from Your last post today morning Rigid tapping working but Orient want to back to 0 encoder count 2scrrenshot
Anybody work with both orient and rigid tapping?
Aciera I make the change from Your last post today morning Rigid tapping working but Orient want to back to 0 encoder count 2scrrenshot
Anybody work with both orient and rigid tapping?
Attachments:
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
05 Sep 2023 13:42 #279970
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
I found solution.
In toolchange.ngc go to write (today tested and working)
M3 S30
G33.1 Z 0.1 K0.1
M2
After that command spindle is indexed and on position 1-4 encoder counts which is easier to setup orient pid becouse all time start from the same position.
Last things for now;
1. When orient point is close to 116encoder count for example 117 then back to 115 but passing by 116 and orient.is-oriented is set to High. Need to delay this. If is on 116 encoder position 1 second then orient.is-oriented go High.
2. Is possible make some output checking if encoder position is 114-117 then output is high? spindle.is-oriented go to high only for moment.
In toolchange.ngc go to write (today tested and working)
M3 S30
G33.1 Z 0.1 K0.1
M2
After that command spindle is indexed and on position 1-4 encoder counts which is easier to setup orient pid becouse all time start from the same position.
Last things for now;
1. When orient point is close to 116encoder count for example 117 then back to 115 but passing by 116 and orient.is-oriented is set to High. Need to delay this. If is on 116 encoder position 1 second then orient.is-oriented go High.
2. Is possible make some output checking if encoder position is 114-117 then output is high? spindle.is-oriented go to high only for moment.
Please Log in or Create an account to join the conversation.
05 Sep 2023 18:45 - 05 Sep 2023 18:48 #280015
by Aciera
Replied by Aciera on topic Mill atc configuration
Just had another look through your hal and I would suggest removing this line. Not sure if it fixes anything but it makes no sense to connect the input-index to index-enable:
net spindle-index-enable <= hm2_5i25.0.encoder.04.input-index
Question1: Use the component 'timedelay'
linuxcnc.org/docs/2.8/html/man/man9/timedelay.9.html
Question2 : Use the component 'near'
linuxcnc.org/docs/html/man/man9/near.9.html
net spindle-index-enable <= hm2_5i25.0.encoder.04.input-index
Question1: Use the component 'timedelay'
linuxcnc.org/docs/2.8/html/man/man9/timedelay.9.html
Question2 : Use the component 'near'
linuxcnc.org/docs/html/man/man9/near.9.html
Last edit: 05 Sep 2023 18:48 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
06 Sep 2023 10:04 #280080
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Attachments:
Please Log in or Create an account to join the conversation.
06 Sep 2023 11:15 #280089
by Aciera
Replied by Aciera on topic Mill atc configuration
A type mismatch, encoder count is of type s32 while near expects type float.
option 1: use component 'conv-s32-float' to convert encoder counts to float type.
linuxcnc.org/docs/html/man/man9/conv_s32_float.9.html
option 2: use encoder position instead of encoder counts.
option 1: use component 'conv-s32-float' to convert encoder counts to float type.
linuxcnc.org/docs/html/man/man9/conv_s32_float.9.html
option 2: use encoder position instead of encoder counts.
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
13 Sep 2023 14:01 #280636
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Firstly I must thanks for all suport to Aciera.
Toolchanger working and change tools.
Must add two more sensors, one tool in spindle and one in toolchanger on position where tools is load or unload. If we stop change the tools before is unload complete and start load new tool program want insert tool in pocket with tool inside.
Toolchange.ngc must be 110% safe.
New things for now.
Now I make two times orientation. One before load tool and one before unload tool. But need orientatio only one time after first change is now maked.
Explain how working now after start.
M6 T1
Orient, load 1 tool working with them spindle must be oriented
M6 T2
Orient, On spindle brake and unload tool 1 to pocket 1. Spindle dont turn any encoder count. Move carousel to pocket 2. On spindle brake and start load 2 tool but here we dont need another orientation becouse is oriented before .
We only need to orient before loads tools on start or if we make T0 load some tool working with them unload manualy and want load tool from changer.
We lose time make orient if spindle is now oriented.
Ofcourse I use brake function when change is working.
In section toolchange.ngc [#<selected_tool> GT 0] need write something like this.
Comprobation if is oriented now and not start orient. Or if is not oriented then start orientation.
Another things is orient complete. Now use time delay but somethimes is oriented after 2 seconds and somethimes after 6 seconds but every time waithing 10seconds which is setup for timedelay.
Need something like this. If spindle is on orient position 2 seconds then make orient complete without time delays. Think this must be edited orient component...
Toolchanger working and change tools.
Must add two more sensors, one tool in spindle and one in toolchanger on position where tools is load or unload. If we stop change the tools before is unload complete and start load new tool program want insert tool in pocket with tool inside.
Toolchange.ngc must be 110% safe.
New things for now.
Now I make two times orientation. One before load tool and one before unload tool. But need orientatio only one time after first change is now maked.
Explain how working now after start.
M6 T1
Orient, load 1 tool working with them spindle must be oriented
M6 T2
Orient, On spindle brake and unload tool 1 to pocket 1. Spindle dont turn any encoder count. Move carousel to pocket 2. On spindle brake and start load 2 tool but here we dont need another orientation becouse is oriented before .
We only need to orient before loads tools on start or if we make T0 load some tool working with them unload manualy and want load tool from changer.
We lose time make orient if spindle is now oriented.
Ofcourse I use brake function when change is working.
In section toolchange.ngc [#<selected_tool> GT 0] need write something like this.
Comprobation if is oriented now and not start orient. Or if is not oriented then start orientation.
Another things is orient complete. Now use time delay but somethimes is oriented after 2 seconds and somethimes after 6 seconds but every time waithing 10seconds which is setup for timedelay.
Need something like this. If spindle is on orient position 2 seconds then make orient complete without time delays. Think this must be edited orient component...
Please Log in or Create an account to join the conversation.
14 Sep 2023 08:55 - 14 Sep 2023 08:59 #280716
by Aciera
Replied by Aciera on topic Mill atc configuration
Sounds like you want to check if 'spindle.0.locked' is high in your Toolchange.ngc.
For this you could connect 'spindle.0.locked' to a 'motion.digital-in-NN' and then use M66 in your Toolchange.ngc:
M66 Pnn L0
o100 if [#5399 EQ 1]
(Do your M19 here)
o100 endif
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m66
For this you could connect 'spindle.0.locked' to a 'motion.digital-in-NN' and then use M66 in your Toolchange.ngc:
M66 Pnn L0
o100 if [#5399 EQ 1]
(Do your M19 here)
o100 endif
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m66
Last edit: 14 Sep 2023 08:59 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
18 Sep 2023 09:10 #281056
by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Spindle.0.locked is set to high in the same time like orient.
The problem is spindle turn from 115 to 117 encoder count and past 116 set orient high but pid still working and spindle still turn to get exact position.
Now I use motion digital in and near for check encoder position after orient is ready for be 110% sure encoder position.
net encoder_in_count <= hm2_5i25.0.encoder.04.position
net spindle-revs => near.0.in1
net comp_pos_out near.0.out motion.digital-in-06
setp near.0.in2 0.5 # Set comparison value
setp near.0.difference 0.004913793 # Set the tolerance 0.004913793
I can work with setting orient timedelay 10 sec but in 90% orient is set after 1-3 seconds
I need exact if orient is on position 2 seconds then set to high.
The problem is spindle turn from 115 to 117 encoder count and past 116 set orient high but pid still working and spindle still turn to get exact position.
Now I use motion digital in and near for check encoder position after orient is ready for be 110% sure encoder position.
net encoder_in_count <= hm2_5i25.0.encoder.04.position
net spindle-revs => near.0.in1
net comp_pos_out near.0.out motion.digital-in-06
setp near.0.in2 0.5 # Set comparison value
setp near.0.difference 0.004913793 # Set the tolerance 0.004913793
I can work with setting orient timedelay 10 sec but in 90% orient is set after 1-3 seconds
I need exact if orient is on position 2 seconds then set to high.
Please Log in or Create an account to join the conversation.
Time to create page: 0.231 seconds