Author Topic: Turning with 4th axis  (Read 28653 times)

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7371
    • View Profile
    • Cambam V1.0 French Doc
Turning with 4th axis
« on: June 02, 2011, 21:43:00 pm »
Hello,

I must cut 4 identical columns, and I try to do this with Cambam and the 4th axis.

I use a profile MOP to define ... the profile and a NCFile object to store the code for the A axis.



My knowledge of GCode is very light, and I don't know how to do a loop like FOR n = 0 to 12 .... NEXT n ..  ::)

In the NCfile, I store this code.

Code: [Select]
G0 G53 Z-1 (Z max in machine coords)
G91 (inc mode)
G0 A30 (rotate 30°)
G90 (abs mode)
M47 (repeat)

I must stop manually the program after the 12 sides has been cut (60 for the finishing)

Here is a video of the process, and the result ... smoother than I assumed, no trace of the facets .... strange.

https://www.youtube.com/watch?v=lTJaejjPt68

The part is 26 mm of Ø and 80 mm long (beech)

++
David


 

« Last Edit: July 06, 2021, 03:02:13 am by dh42 »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8938
    • View Profile
Re: Turning with 4th axis
« Reply #1 on: June 02, 2011, 21:55:05 pm »
Very nice!

I disagree that the facets were not visible, they were quite so.  But they were also small enough that a bit of spindle sanding would remove them entirely.

Look at the vid up near the tailstock end, where the thin part again arcs up to the larger part of the diameter, and you'll clearly see the facets.

But this is quite wonderful work.  I LIKE!

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1612
    • View Profile
Re: Turning with 4th axis
« Reply #2 on: June 03, 2011, 12:56:28 pm »
To loop in g-code you need to use subroutines.  Here's how to do it.

1) Move the code that cuts one facet and then rotates the axis "n" degrees to the end of the file.  Add the line O0001 to the beginning of this code to define subroutine # 0001.  Add the line M99 (subroutine return) to the end.

2) Invoke the subroutine in the main code via the line "M98 P0001 L120".  This invokes the subroutine 120 times (assuming subroutine rotates 3 degrees).  Adjust the L word and rotation in the subroutine to match.

So code looks like this

M98 P0001 L120
M5
M30
O0001
...
M99

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7371
    • View Profile
    • Cambam V1.0 French Doc
Re: Turning with 4th axis
« Reply #3 on: June 03, 2011, 15:22:58 pm »
Hello,

Thanks for the reply  ;)

I find a better way to do this, without manual change in the code, all is made with Cambam.

I move the code that is in the NC file in the profile MOP footer, without the M47.

I create a point list with all points at X,Y = 0,0 (12 points for 12 sides)

I nest the part with this point list, that make a repeat off all part at the same place.

File in attachment.  ;)

++
David

Offline Bob La Londe

  • CNC Jedi
  • *****
  • Posts: 4436
  • ^ 8.5 pounds on my own hand poured bait.
    • View Profile
    • CNC Molds N Stuff
Re: Turning with 4th axis
« Reply #4 on: June 05, 2011, 14:45:17 pm »
How about drawing your profile 1 time, array copy it, set up your MOP, and then use CNC Wrapper? 

Just guessing as I have not gotten around to getting CNC Wrapper yet even though its cheap enough. 
Getting started on CNC?  In or passing through my area?
If I have the time I'll be glad to show you a little in my shop. 

Some Stuff I Make with CamBam
http://www.CNCMOLDS.com

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7371
    • View Profile
    • Cambam V1.0 French Doc
Re: Turning with 4th axis
« Reply #5 on: June 05, 2011, 18:56:45 pm »
Hello Bob,

For now I've spent all my free trials of Cnc wrapper and can't use it, but it's a good idea.

Another way to explore is to extrude the profile to do a 3D object, and wrap the 3D profile Gcode itself ..

++
David

Offline dsnellen

  • Storm Trooper
  • ***
  • Posts: 108
    • View Profile
Re: Turning with 4th axis
« Reply #6 on: October 09, 2011, 13:13:01 pm »
This is an interesting way to cut a round object using an A axis. It works but leaves a 12 sided object. For me it seems backwards. When I do round objects, I use the Z axis to cut depth while rotating the A axis. Y Axis is constant at 0.00 aligned with A axis. The X axis moves back and forth while the Z Axis shapes the object. I haven't used CamBam for A axis cutting so maybe this is how CamBam does it.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7371
    • View Profile
    • Cambam V1.0 French Doc
Re: Turning with 4th axis
« Reply #7 on: October 09, 2011, 14:49:03 pm »
Hello,

CamBam don't manage a 4th rotating axis, it's the reason because I use this method.

For finishing, I use 60 steps of rotation.

++
David

Offline dsnellen

  • Storm Trooper
  • ***
  • Posts: 108
    • View Profile
Re: Turning with 4th axis
« Reply #8 on: October 09, 2011, 16:03:35 pm »
Ok. Didn't know that. I write my own A axis routines using layout paper and subroutines. Was going to give CamBam a try when I had time. I will keep this in mind. Thanks Dave

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3353
    • View Profile
Re: Turning with 4th axis
« Reply #9 on: October 09, 2011, 16:17:06 pm »
Since the weather is nasty here (rain) I decided to see what can CB do with the spindle David has created.
 First, I converted to the inch system, used "Transform, Resize, mm-inch option with all check boxes marked.
Next used the extrude function to extrude the profile and translated to assure proper orientation in relation to the Z axis.
 Created the gcode, wrapped in the CNC Wrapper, and previewed in the Mach3 toolpath window. Much to my suprice the toolpath does not look round it is a pentagon shaped. At this point I have not a clue what is causing this. Any ideas?
Please see the attachments... :(  
« Last Edit: October 09, 2011, 18:33:31 pm by Bubba »
My 2¢

Win11, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, 4th Axis, Endurance Laser.

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3353
    • View Profile
Re: Turning with 4th axis
« Reply #10 on: October 09, 2011, 16:18:42 pm »
Oh, senior moment. Forgot to attach the Cb file. ;D
For those of you who would like to try the wrapped spindle gcode, see attachment.

The X axis is wrapped and the spindle travel along the Y axis. Z "0" set @ center of the tailstock point.
« Last Edit: October 09, 2011, 20:46:51 pm by Bubba »
My 2¢

Win11, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, 4th Axis, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7371
    • View Profile
    • Cambam V1.0 French Doc
Re: Turning with 4th axis
« Reply #11 on: October 09, 2011, 17:44:09 pm »
Hello,

I get same strange toolpath in Mach, but I thing it's only a display problem in mach.

If you run the gcode (without machine), the tool follow the right toolpath in the simulation windows.(i set a feedrate of 8000 to speedup the simulation)


++
David


Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3353
    • View Profile
Re: Turning with 4th axis
« Reply #12 on: October 09, 2011, 18:12:57 pm »
Since I don't have the cutviewer simulator, only option for me is to use Mach3 to see rotational toolpath unless somebody know of free simulator to view rotational axis..
My 2¢

Win11, CB(1.0)rc 1(64 bit) Mach3, ESS, G540, 4th Axis, Endurance Laser.

Offline dh42

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 7371
    • View Profile
    • Cambam V1.0 French Doc
Re: Turning with 4th axis
« Reply #13 on: October 09, 2011, 18:21:05 pm »
Since I don't have the cutviewer simulator, only option for me is to use Mach3 to see rotational toolpath unless somebody know of free simulator to view rotational axis..

Unfortunately, even cutviewer don't do that  :'(   and I don't know free soft to do that

Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1612
    • View Profile
Re: Turning with 4th axis
« Reply #14 on: October 09, 2011, 20:32:07 pm »
Watching the video a couple of thoughts occured to me.

1) It would only be necessary to rapid just above the centerline of the column to clear after each pass.  In fact, it would be faster to do the clearance move in the Y axis allowing the tool to remain at a constant Z.
2) If you could add the A axis move to the X axis move block then the piece would rotate at the same time the tool is returning to the start point.