Mill atc configuration

More
3 years 1 month ago #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   
 

Attachment not found

Please Log in to join the conversation.

More
3 years 1 month ago #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.

Please Log in to join the conversation.

More
3 years 1 month ago #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?

Attachment not found


 

Attachment not found


 

Attachment not found

Please Log in to join the conversation.

More
3 years 1 month ago #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.

Please Log in to join the conversation.

More
3 years 1 month ago #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

Please Log in to join the conversation.

More
3 years 1 month ago #280080 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Try to use near component but get error. How to solve this?
My command;
net encoder_in_count        <=   hm2_5i25.0.encoder.04.count   
net encoder_in_count        =>   near.0.in1
net comp_pos_out       near.0.out       motion.digital-in-05
setp near.0.in2 116                # Set comparison value
setp near.0.difference 1         # Set the tolerance

Attachment not found

Please Log in to join the conversation.

More
3 years 1 month ago #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.

Please Log in to join the conversation.

More
3 years 1 month ago #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...

 

Please Log in to join the conversation.

More
3 years 1 month ago #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

Please Log in to join the conversation.

More
3 years 1 month ago #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.
 

Please Log in to join the conversation.

Time to create page: 3.065 seconds
Powered by Kunena Forum