Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: geast on December 20, 2010, 05:33:22 PM

Title: Plasma tube cutting
Post by: geast on December 20, 2010, 05:33:22 PM
Hello everyone
I'm building a flatbed plasma cutting machine, and i want to be able to cut holes on a tube, also.
The tube will be parallel to the Y axis and rotated probably from axis A with an extra servo driver/motor.
My question is how to configure mach3 to use either axis A or X depending if i want to cut a hole on a tube surface or just a normal sheet metal X,Y plane.
Also i need somehow to give the information to mach3 of the diameter of the tube in order to calculate the right feedrate and the steps per inch/mm for every different tube diameter i will cut.
Any help will be appreciated.
 
Title: Re: Plasma tube cutting
Post by: Hood on December 21, 2010, 03:23:23 AM
I think Terry may have messed around with something similar to this, hopefully he will chime in if he did, but in the mean time have a look here http://www.machsupport.com/forum/index.php/topic,16411.0.html and see if Terry is talking about what you are wanting.
Hood
Title: Re: Plasma tube cutting
Post by: geast on December 21, 2010, 05:03:40 AM
I just need for start a simple gcode in order to cut for example a 50mm diameter hole.
The rotating axis will be the A and will be parallel to Y axis. the X axis want move.
Title: Re: Plasma tube cutting
Post by: BR549 on December 21, 2010, 12:48:49 PM
HIYA guys what I worked on was a way to COPE fit pipe joints on the plasma.

Cutting holes in a pipe is fairly simple with a 4th axis.  BUT you will have to convert the code to use it . The 4th is normally set up as degs/min and to cut it needs to be converted to compensate for the pipe diameter

 One way is to create a drawing then let the CAM do the conversion to the 4th axis. SHEET CAM can do this.

Another way is to use a utility like WRAPPER to convert your Gcode.

It also may be possible to set up a WIZARD to do the Gcode based on parameters

Make sure your 4th is set up accuately as to steps/deg.

(;-) TP

Title: Re: Plasma tube cutting
Post by: rrc1962 on December 21, 2010, 02:27:44 PM
We saw a cool coping plasma at FabTech.  It was 5 axis and made the cut angle on the tube match where it mated up.  It worked on square tubing also.  I could barely afford to walk by their booth, but it was a cool machine.  It used a rotary axis to turn the tube and a robotic arm to move the torch in 5 axes.  I guess it was really a 6 axis.  A 5 axis robotic arm plus a rotary.
Title: Re: Plasma tube cutting
Post by: geast on December 21, 2010, 04:45:49 PM
I manage to do some holes on the tube by simply substitute "electrically"  the axis X servo drive with the axis A servo drive. So i dont have to do any changes at all at the g code.
Is there any way to tell the mach to substitute software wise the output of the X axis to the output of the A axis?
Title: Re: Plasma tube cutting
Post by: BR549 on December 21, 2010, 06:48:48 PM
You can use swappaxis() in a macro to do the physical swap. BUT you will need to scale A axis to get the hole size corrected. you will always have to do some correction depending on the tube size and the motor settings. Best to set the motor settings correctly then adjust through scale.

We have the tubing coping workin fine with mach. It is avaliable from the  Mach Toolbox in the download section.

I will look to see IF we can create a version for basic holes as well.

(;-) TP
Title: Re: Plasma tube cutting
Post by: BR549 on December 21, 2010, 07:15:33 PM
The thing you need to determene is how will you drive the A axis.

From the centerline via a chuck     

OR

From a set of drive rollers


IF you set up with drive rollers THEN you can set it up as a linear drive and set you steps per inch directly.

Just a thought, (;-) TP
Title: Re: Plasma tube cutting
Post by: Fiero Addiction on December 21, 2010, 07:40:11 PM
I manage to do some holes on the tube by simply substitute "electrically"  the axis X servo drive with the axis A servo drive. So i dont have to do any changes at all at the g code.
Is there any way to tell the mach to substitute software wise the output of the X axis to the output of the A axis?

Since you likely won't be cutting sheet and tube on the same job, couldn't you just build a second mach profile for tube cutting? Then it would be as simple as loading the correct "version" of Mach for the job, and you could continue to use your standard g code.
Title: Re: Plasma tube cutting
Post by: geast on December 24, 2010, 06:16:25 AM
Thank  BR549 i try to use the swappaxis() command, but i couldn't fine the mach toolbox witch you mention.
Title: Re: Plasma tube cutting
Post by: Overloaded on December 24, 2010, 07:29:08 AM
 :)
Title: Re: Plasma tube cutting
Post by: geast on December 24, 2010, 07:39:53 AM
Does SwapAxis() operate on maxCL mode?
Title: Re: Plasma tube cutting
Post by: Hood on December 24, 2010, 08:05:13 AM
Does SwapAxis() operate on maxCL mode?


Dont know but likely it wont, give it a try and see though as thats the only way to know for sure. If it works please let us know.
Hood
Title: Re: Plasma tube cutting
Post by: geast on December 24, 2010, 08:24:46 AM
I just make a button with code SwapAxis(0,3) but it didnt make anything.
I also check the configuration for a change at the pins and port screen, for motor output but nothing changed also.
Do i have to restart every time i hit the button ?
Title: Re: Plasma tube cutting
Post by: Hood on December 24, 2010, 08:38:43 AM
Looks like it doesnt work with MaxCL then. :( You wouldnt see any changes in Ports and Pins, just the axis would swap.In other words if you commanded an X Axis move the motor on the A would actually move and vice versa.
Hood
Title: Re: Plasma tube cutting
Post by: geast on December 24, 2010, 09:23:00 AM
So the only way to do it is by electrical swap the pins with a relay.
Title: Re: Plasma tube cutting
Post by: stirling on December 24, 2010, 09:23:45 AM
Haven't really read all the thread properly so forgive me if I'm out of line. swapAxis is a bit quirky and there's a couple of things to bear in mind when using it.

You can only call it once. That is you must then call resetAxisSwap before calling it again.
When you call swapAxis you'll see the change in step/dir in ports n pins.
motor settings do not follow the swap. Just the step/dir pins.

I have no idea what maxCL mode is but I just ticked it and tried a swapAxis and it worked for me V3.042.040.

Ian
Title: Re: Plasma tube cutting
Post by: Hood on December 24, 2010, 09:37:08 AM
Stand corrected there, never noticed that earlier but of course I was using the wrong version of SS plugin when simulating so obviously never saw the pins swap ::)

Regards MaxCL mode I am not sure you could look at ports and pins as I think they are basically ignored and Mach internally sets the ports and pins to the specific ones the MaxCL machines require.

Hood
Title: Re: Plasma tube cutting
Post by: stirling on December 24, 2010, 09:56:27 AM
yep - just read up a little on maxcl and as you say it appears to use pin assignments of it's own and ignores whatever is set in ports n pins. Tried to confirm this with parmon and it looks correct. So although swapaxis still works it's not having the desired effect. sorry for the sidetrack.

Ian
Title: Re: Plasma tube cutting
Post by: geast on December 28, 2010, 05:01:08 PM
For BR549
How can sheetcam make the conversion to the A axis as you mentioned?
Can you give me an example?
Thank you in advance.
Title: Re: Plasma tube cutting
Post by: BR549 on December 28, 2010, 05:37:06 PM
Use the SheetCam rotary POST it converts the linear moves into polar moves based on the diam of the tube.

(;-) TP
Title: Re: Plasma tube cutting
Post by: geast on December 30, 2010, 02:58:39 AM
Sorry but because i'm not very experienced in gcode, can you be more specific and if possible give me an example of how can i cut for example a hole of diameter 50mm or a rectangle 30 x 30 mm on a tube of diameter 300mm.
What dxf parts do i have to import on sheetcam, i suppose the circle or rectangle but how do i define the 300mm tube?
Thanks in advance. 
Title: Re: Plasma tube cutting
Post by: BR549 on December 30, 2010, 11:04:41 AM
Simple import the drawing of the holes as a dxf as you wouold cut it if it were on a flate plate. Then specify the tube diameter as the material thickness.

Apply the cutting function as you normally would then post the results using the rotary post.SC will then translate the XY into XA axis moves.

That works IF you are using a chuck with your 4th axis so the tube runs on the centerline. IF you are using the roller method then the process is different.

Hope that helps, (;-) TP
Title: Re: Plasma tube cutting
Post by: locost_cam on December 31, 2010, 06:53:58 AM
Actually I just found a problem with the rotary post. It may get the feed rates wrong. Does anyone know if the mach g-code interpreter has a parameter to tell it the diameter of the tube on a rotary axis? I see that OEM DRO 825 is the diameter but I can't find an equavalent parameter.
Title: Re: Plasma tube cutting
Post by: BR549 on December 31, 2010, 06:12:54 PM
The problem is in MACH (;-) You have to use A axis radius correction. Turn it on in config then apply the radius on the settings page. Then maybe it will do the feeds correctly. ALSO your  A axis MUST be fast enought to be able to match the X/Y feeds speeds OR mach just slows down to the slowest component.

To use the 4th with plasma it MUST be settup as a very fast 4th.   (;-)

(;-) TP
Title: Re: Plasma tube cutting
Post by: locost_cam on December 31, 2010, 06:22:17 PM
What I am trying to do is supply Mach with the radius from the G-code instead of entering it in Mach every time.

The other alternative is to define the rotary axis as linear and then get the post processor to work out the feed rate for every line segment. The main disadvantage with this method is that Mach will probably run quite rough. It doesn't like running plasma with a feed rate on every line.
Title: Re: Plasma tube cutting
Post by: BR549 on December 31, 2010, 06:44:53 PM
You can update the Radius through a Macro call from inside Gcode at the beginning of each program if you want. If you are using SheetCam you can also bring in the Radius from sheetcam via a Gcode variable you just have to mod the post a touch>LES is really good at that for users. ALso with the variable trick you need an update Macro to run from the macropump.

I am not sure WHY you need to constanatly mess with the feerate?? Once set correctly Mach does a good job of maintaining a constant velocity for plasma work. AT LEAST it does here.

(;-) TP
Title: Re: Plasma tube cutting
Post by: BR549 on December 31, 2010, 07:06:38 PM
Another thought would be to set up the rotary as a linear drive and set the drive up so that one rev of the drive is equal to 10 inches then use scale on that axis to set the actual circuference of the tube to be cut.

(;-) TP
Title: Re: Plasma tube cutting
Post by: alenz on December 31, 2010, 08:40:09 PM
What I am trying to do is supply Mach with the radius from the G-code instead of entering it in Mach every time.
You can set it from G-code with a Macro:

M666 P1.2345

Pass the radius with the P word.
The Macro only needs one line:

SetOEMDRO(825, Param1 ())

Hope this helps
Al
Title: Re: Plasma tube cutting
Post by: locost_cam on January 01, 2011, 03:42:11 AM
You can set it from G-code with a Macro:
I was hoping to avoid that as it complicates things for my customers. I want to keep it as easy as possible for end users.

Quote
LES is really good at that for users.

Thanks. That's me ;)

Quote
I am not sure WHY you need to constanatly mess with the feerate?? Once set correctly Mach does a good job of maintaining a constant velocity for plasma work.

If the rotary axis is set up as linear then the feed has to be scaled depending on the cut angle. For instance if cutting parallel to the tube then the feed is scaled 1:1. However if you are cutting perpendicular to the tube axis then you need to scale the feed rate to match the angular rate you need. Angles between these two  will have a feed rate that is between the two extremes.

Quote
Another thought would be to set up the rotary as a linear drive and set the drive up so that one rev of the drive is equal to 10 inches then use scale on that axis to set the actual circumference of the tube to be cut.

Now that is an idea. The question is, when you scale the axis does it also scale the feed rate?
Title: Re: Plasma tube cutting
Post by: BR549 on January 01, 2011, 05:13:04 PM
There is NO easy(simple) way out other than using a good CAM to do the design work then mach will control based on Gcode provided by the CAM.

OR the operator needs to learn to jump through hoops to get the job done.

Or you can create a wizard to do the base code for them. 

(;-) TP
Title: Re: Plasma tube cutting
Post by: locost_cam on January 02, 2011, 04:04:31 AM
There is NO easy(simple) way out other than using a good CAM to do the design work then mach will control based on Gcode provided by the CAM.

That is exactly what I want to do. The problem is figuring out what G-code will make Mach follow the feed rate accurately on a rotary axis.
Title: Re: Plasma tube cutting
Post by: Tekno on January 02, 2011, 05:44:33 AM
Hi geast1967 greetings from istanbul  I wish you a happy new year
easy solution to your problem
you Rotate Axis  should be  X Axis 
300 X3.14 tube diameter: 942 mm
X-axis stepper resolution /942: X axis step per write
Also!!!
for continuous works  Must be PageWizard or macro

Tekno
Title: Re: Plasma tube cutting
Post by: geast on January 02, 2011, 11:03:11 AM
Happy new year to Tekno.
I'm afraid that the solution for my problem is not so easy as you think. If you have red in my first post 
'My question is how to configure mach3 to use either axis A or X depending if i want to cut a hole on a tube surface or just a normal sheet metal X,Y plane.'
So i need both axis X and A. Please be more specific about pagewizard.
Title: Re: Plasma tube cutting
Post by: rrc1962 on January 02, 2011, 11:20:52 AM
You won't be using both A and X at the same time, so just set up both axes and have your CAM output the appropriate code.  A rotary job will use the A axis and a planar job will use the X axis.  With both axes set up on the machine, all the operator has to do is load the material on either the table or the rotary and run the program.
Title: Re: Plasma tube cutting
Post by: BR549 on January 02, 2011, 11:52:53 AM
Either of the methods described above will work IF your A axis is fast enough to keep up. MACH will do the feedrate sync IF you set it up to do so.



(;-) TP
Title: Re: Plasma tube cutting
Post by: Tekno on January 02, 2011, 12:19:02 PM
Hi geast1967 
I did plasma tube cuting machine, I wrote the formula X axis to go 1 tour, because  tube diameter 300mm

for example :300 mm diameter X 3.14 :942 mm X plane You stepdriver 5000 micro step
write X axis  step per 5.370
for test MIDI page    X942 F200 X axis 1tour  rotary
Title: Re: Plasma tube cutting
Post by: Tekno on January 02, 2011, 12:50:05 PM
A Axis Not Required because, must be XY Plane work

Page Wizard option: must be For variable diameter

poppabear
Global Moderator

poppabear for you makes Page wizard

 For message poppabear link: http://www.machsupport.com/forum/index.php?action=profile;u=1633
Title: Re: Plasma tube cutting
Post by: Tekno on January 02, 2011, 12:56:50 PM
for tube cut machine video  link
http://www.youtube.com/watch?v=qUuHfi0QmTI
Title: Re: Plasma tube cutting
Post by: geast on January 02, 2011, 03:12:29 PM
BR549 i try the tube copying tool but i see this toolpath on mach when i load your example.
Can you figure out what is wrong. Can you send me the wright setting for mach in order to see the same picture as you post in the example.[/img][/img]
Title: Re: Plasma tube cutting
Post by: BR549 on January 02, 2011, 03:39:21 PM
Look in tool path config set it to be y/a or x/a depending on your setup.

(;-) TP
Title: Re: Plasma tube cutting
Post by: geast on January 02, 2011, 04:24:43 PM
It is y/a. How can i post a picture?
Title: Re: Plasma tube cutting
Post by: BR549 on January 02, 2011, 04:31:53 PM
Reply(not quick reply),  addition options, attach (select picture) Post
Title: Re: Plasma tube cutting
Post by: geast on January 02, 2011, 04:35:20 PM
Here is what i see in mach toolpath.
Title: Re: Plasma tube cutting
Post by: BR549 on January 02, 2011, 04:40:21 PM
Do you have A rotatons enabled ?
Title: Re: Plasma tube cutting
Post by: geast on January 02, 2011, 04:43:51 PM
Yes and 3d compass, tool position and show tool in z bar.
Also i give the DRO 825 the value of 1.25
Title: Re: Plasma tube cutting
Post by: BR549 on January 02, 2011, 05:01:22 PM
With the posted code set it up to use X with A in tool path config.

Title: Re: Plasma tube cutting
Post by: geast on January 02, 2011, 05:12:17 PM
Yes it looks better now, thanks.
Title: Re: Plasma tube cutting
Post by: FlyBoy on December 22, 2011, 09:56:56 AM
Below is Dan's code with lines added (separated by space) to cut the other end of the tube.
It doesn't work properly cutting from 0,0 rather than the 5" offset.
Can someone please point out the error in my code?
I've tried absolute vs incremental mode.... and nothing seems to work.


(CNC A axis Plasma TUBE Coping routine)
(Math derivative by Dan Hopper Copyright 2006)
#100= 1.250       (CutTube Diameter)
#101= 1.250       (Uncut Tube Diameter)
#103= .095         ( Tube Thickness )
#104= 45             (Joint ANGLE)
#200 = [#100 / 2]         (RO)
#201 = [#101 / 2]         (RU)
#202 = [#200 - #103]  (RI)
#203 = #104                (AF)
#204 = 0                       (ID)
#300= 2                        (A step in deg)
G0 G40 G54 G90 G49 G17 G50 G64 G91.1 G94
G0 A0.000 x0.000 Z1.000 F500
Z0.000
M98 P01 L180


#104= -45             (Joint ANGLE)
#200 = [#100 / 2]         (RO)
#201 = [#101 / 2]         (RU)
#202 = [#200 - #103]  (RI)
#203 = #104                (AF)
#204 = 0                       (ID)
#300= 2                        (A step in deg)
G0 A0.000 x5.000 Z1.000 F500
Z0.000
M98 P01 L180


G0  A0.000 X0.000 Z1.000
M30
o01
G1  A#300 X  [sqrt [#201 **2 - [ [#202 * sin [#204]] **2]] /  sin[#203] -  tan [90-#203] * #202 * cos[#204]]
#204=[#204+2]
#300=[#300+2]
m99
%