CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 25, 2017, 21:36:45 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: 4th axis lathe  (Read 2513 times)
OddCNC
CNC Ewok
*
Offline Offline

Posts: 5


View Profile
« on: July 09, 2016, 06:30:07 am »

Hi!
I can run my 4th axis in position and velocity modes. So... any possibility to get new features for lathe plugin, like "spindle axis" or something like that? Shoudnt be that hard...
Would be nice to turn basic shape first in velocity mode and then do some milling in position mode.

Henry
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 2734



View Profile
« Reply #1 on: July 09, 2016, 10:02:35 am »

Henry,

Have you tried the Wrapper plugin ?
http://www.atelier-des-fougeres.fr/Cambam/Aide/Plugins/Wrapper_plugin.html
Be sure to read the documentation for it.
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4197



View Profile WWW
« Reply #2 on: July 10, 2016, 21:31:58 pm »

Hello

Quote
I can run my 4th axis in position and velocity modes. So... any possibility to get new features for lathe plugin, like "spindle axis" or something like that? Shoudnt be that hard...

For use the 4axis as a spindle (Like a lathe), it's not in cambam that you can set that, in CB, you do a standard Gcode for turning.

If you are using Mach3, you can set your 4th axis as a spindle in port&pin, then, when Mach3 encounter a M3 it start running the 4th axis

I don't know if the S value (speed) for rotation has any effect on the motor speed, certainly, you must play with the step per to change the RPM.



enable Spindle and set the same values as for the A axis in the Spindle section (and disable A axis)



enable spindle motor output and step/dir

It would be a good idea to create a new profile in Mach3 for this "lathe" config of the CNc.

++
David

« Last Edit: July 10, 2016, 21:34:14 pm by dh42 » Logged
Garyhlucas
CNC Jedi
*****
Offline Offline

Posts: 853


View Profile
« Reply #3 on: July 11, 2016, 00:20:41 am »

David,
My machine runs on Mach 3 and has a 4 axis Xulifeng motion card. I have a stripped down 7x12 lathe spindle driven by a large stepper motor. Works fine as a 4th axis, however I can not find a way to get Mach 3 to use it as spindle through the motion card. If you know a way I'd love to know. Currently I can do lathe work with a 4" chuck I have mounted on a R8 arbor on the mill spindle. The horizontal lathe with the tail stock would be nice.
Logged

Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/
OddCNC
CNC Ewok
*
Offline Offline

Posts: 5


View Profile
« Reply #4 on: July 11, 2016, 07:08:01 am »

Im running linuxcnc. Velocity and position mode changed with M-codes(100 & 101)
see link for setup
https://forum.linuxcnc.org/forum/38-general-linuxcnc-questions/17804-4th-axis-rotation-angle-limit-problem?start=30

I lose position after every mode change, but thats not an issue, cause I was going to turn shape and then mill(in position mode) rest of the part.

What I was hopinbg to do is use cambam lathe plugin to generate turning toolpaths and somehow get toolpath rotated rigth way for my 4th axis. In MOP header M-code to spin 4th axis. In MOP footer m-code to change to position mode.
Then add some additional MOPs and mill
Logged
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4197



View Profile WWW
« Reply #5 on: July 11, 2016, 14:30:43 pm »

Hello,

No Garry, I do not know why it does not work with your card .... and I do not know LinuxCNc

++
David

Logged
Bubba
CNC Jedi
*****
Offline Offline

Posts: 2065



View Profile
« Reply #6 on: July 11, 2016, 17:24:09 pm »

David,
My machine runs on Mach 3 and has a 4 axis Xulifeng motion card. I have a stripped down 7x12 lathe spindle driven by a large stepper motor. Works fine as a 4th axis, however I can not find a way to get Mach 3 to use it as spindle through the motion card. If you know a way I'd love to know. Currently I can do lathe work with a 4" chuck I have mounted on a R8 arbor on the mill spindle. The horizontal lathe with the tail stock would be nice.

Gary,
The Xulifeng motion card is USB card? If is parallel card I don't see why it would not work for you as long as step and dir port pins are configured. Also did you try configure motor tuning section pertaining to spindle? Good luck. 
Logged
OddCNC
CNC Ewok
*
Offline Offline

Posts: 5


View Profile
« Reply #7 on: July 12, 2016, 13:21:37 pm »

Found a way use cambam for toolpaths with my 4th axis.

What im doing is using cambam lathe plugin to generate toolpaths. Only difference is that I add
-custom MOP header: M101 P120  to spin my a-axis at 120rpm, velocity mode
-custom MOp footer: M100 to stop spinning, position mode

I removed G7 command from generated file.

I put generated g-code through modified grecode(https://github.com/bkubicek/grecode).
 I added new functions:
-xscale          to compensate G7 command that cant be used with my setup
-xzexchange   change x<->z  I<->K G2<->G3  to get part in rigth orientation
-xmirror          change x<->x- I<->I- G2<->G3 just because my a-axis is on rigth side of table, "pointing" left

>grecode.exe -xscale 0.5 -xzexchange -xmirror -o CamBam_Pawn_mod.ngc CamBam_pawn.ngc

Now im allmost happy Smiley
Logged
OddCNC
CNC Ewok
*
Offline Offline

Posts: 5


View Profile
« Reply #8 on: July 14, 2016, 16:32:22 pm »

Hi intterweb!

I was going to commit my changes to grecode, but didnt, cause dont like github interface.
So here are all files to compile grecode.

Note that xscale doesn't scale everything on x axis, JUST x parameters. So most other gcode programs that scale dont work, because they scale arcs(I parameter).

* grecode_0.4_AAxisMod.zip (15.01 KB - downloaded 42 times.)
Logged
toplakd
CNC Ewok
*
Offline Offline

Posts: 35


View Profile
« Reply #9 on: December 09, 2016, 17:47:36 pm »

I do similar thing manualy to do the lathe job with my 4th axis in LinuxCNC
X <> Z
I <> K
G3 <> G2

One of my first tests:
https://youtu.be/vOuraiKWQG0
Logged
CarForSaleSign
CNC Ewok
*
Offline Offline

Posts: 11


View Profile
« Reply #10 on: January 04, 2017, 05:17:13 am »

I do similar thing manualy to do the lathe job with my 4th axis in LinuxCNC
X <> Z
I <> K
G3 <> G2

One of my first tests:
https://youtu.be/vOuraiKWQG0

Thats very cool.  Can you give more detail/example on how you modify the gCode to work on a 4 axis machine?   I want to get camBam to generate code for my 4th axis.  Smiley
Logged
toplakd
CNC Ewok
*
Offline Offline

Posts: 35


View Profile
« Reply #11 on: January 12, 2017, 08:12:18 am »

I use custom M codes for switching form angular to continuos rotation and for start/stop of a axis.
With notepad++ I change the G-Code as mentioned above
« Last Edit: January 12, 2017, 09:24:20 am by toplakd » Logged
Garyhlucas
CNC Jedi
*****
Offline Offline

Posts: 853


View Profile
« Reply #12 on: January 13, 2017, 00:32:13 am »

I finally found a hardware solution to my problem.  I found a card that converts pwm to steps.  So I'm going to take the 4th axis drive inputs through a relay so I can select whether the step and direction come from the Mach 3 4th axis output, or from Mach 3 PWM spindle output via the new card.  Using the 4th axis output I'll even be able to do threading with a bit of tricky G-coding.
Logged

Gary H. Lucas

Have you read my blog?
 http://a-little-business.blogspot.com/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.123 seconds with 19 queries.

Copyright © 2008 HexRay Ltd. | Sitemap