Add gear/range change to linuxcnc turn post

More
1 year 2 months ago #333864 by Trav328
For the past while i have been using mastercam v9 for my linuxcnc powered lathe , I use 3 M codes to select speed ranges , this was easy to setup in the mastercam post but im having a hard time with the fusion post.

All the information i can find online seems to be a bit dated or the post format has changed , it looks like there used to be a fairly simple section for the spindle but now is more complicated than i can handle.

1-649 rpm - M101
650-1199 rpm - M102
1200-2200rpm - M103

Here is what the code should look like , note the M102 before the spindle turns on , If using constant surface speed it should output the M code for the max RPM

G0 T0002 M06 G43
G97 M102 S1200 M03
G0 G54 X1.8013 Z.11 M8


I have attached the newest linuxcnc turn post with a few small changes i have made for other things.including G43 at every tool change .

Thanks for any help you are able to offer.

 

Attachment not found

Please Log in to join the conversation.

More
1 year 2 months ago #333989 by andypugh
If you are using CSS then this might be more complicated than it first seems.
The PP would need to calculate the spindle speed at the start and end of the sequence of feed moves and choose a spindle gear appropriately.

My own lathe handles this in HAL, but certainly not optimally. It will often do a gear change at the end of a facing cut, then change back at the start of the next cut, which isn't ideal.

Please Log in to join the conversation.

More
1 year 2 months ago #334067 by Trav328
it took me a few days of reading and playing but i got it working even with  CSS , in the properties tab you can now define you highest speeds for the ranges and fusion will automatically output the desired M code , im used to old mastercam posts but getting the hang of fusion.

once i figured it out this was fairly easy to setup using some bits from an okuma post , you can add as many gears as needed.

here is my current linuxcnc post, setup to switch between 3 gears based on defined speeds in the property tab , puts G43 at every tool change , properly posts G28 , working CSS (selects high gear) , several other changes im forgetting. 

download the text file and change to .CPS , i am not responsable for your machine.

 

Attachment not found

 

Attachment not found

 

Attachment not found

  
 

Attachment not found

Please Log in to join the conversation.

Time to create page: 0.172 seconds
Powered by Kunena Forum