Mill atc configuration

More
3 years 3 months ago #275872 by andypugh
Replied by andypugh on topic Mill atc configuration
232 PPR sounds rather coarse, it will limit the accuracy of alignment that is possible.

You can try using a wcomp component:
linuxcnc.org/docs/stable/html/man/man9/wcomp.9.html

It will take a little work to get the "max" and "min" values for it. max needs to be the position from the orient comp + one or two encoder counts, and min needs to be - one or two.
Code:
loadrt wcomp loadrt sum2 count=2 setp sum2.0.in1 0.01 setp sum2.1.in1 -0.01 net o_angle orient.0.position sum2.0.in0 sum2.1.in0 net o_max sum2.0.out wcomp.0.max net o_min sum2.1.out wcomp.0.min net o_fwd wcomp.0.under => Use this pin to move the spindle FWD net o_rev wcomp.0.over ==> and this onw for REV

This will need massaging to fit your system, and is untested.
The following user(s) said Thank You: Artur_1617

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

More
3 years 3 months ago #275881 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
 Get error on start.
 

File Attachment:

File Name: Frezarka_z_ATC.hal
File Size:16.17 KB

 

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

More
3 years 3 months ago #275884 by andypugh
Replied by andypugh on topic Mill atc configuration
OK, I see you have loaded orient with names=

So the HAL pins should be just orient not orient.0

Also, I think that line should be orient.command not orient.0.position.
The following user(s) said Thank You: Artur_1617

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

More
3 years 3 months ago - 3 years 3 months ago #275887 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Another

Try to change to command and get error to
 
Last edit: 3 years 3 months ago by Artur_1617.

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

More
3 years 3 months ago #275897 by andypugh
Replied by andypugh on topic Mill atc configuration
Yes, so, fix the issues as described. I did say that my example would need to be altered to suit your HAL.

Also, it's not the best idea to have signal names identical to pin names, it causes confusion.

Also: I forgot the "loadrt" lines for the wcomp and sum2 components.

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

More
3 years 3 months ago - 3 years 3 months ago #275947 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
I cant get it working. And for now only want turn on relay when start Orient.
Why this dont working?
After or2.2.out must add another Output pin 'spindle.0.on' to connect with spindle-enable-all . But get error pin already has Out pin 'or2.2.out'
Try to use to 'net spindle-enable-all  <= spindle.on.enable' linuxcnc start without error but spindle dont start.
net spindle-orient         <=   orient.enable
net spindle-orient         =>   or2.2.in0 
net spindle-enable       =>   or2.2.in1 
net spindle-enable-all  <=   or2.2.out     
net spindle-enable-all  <=   spindle.0.on
 

 
Last edit: 3 years 3 months ago by Artur_1617.

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

Time to create page: 0.304 seconds
Powered by Kunena Forum