Hello Guest it is April 18, 2024, 06:35:58 PM

Author Topic: Code conversions  (Read 7114 times)

0 Members and 1 Guest are viewing this topic.

Offline Kai

*
  •  60 60
    • View Profile
Code conversions
« on: October 19, 2010, 08:04:12 PM »
please dont think I'm stupid I have trouble reading things and understanding.

I have gone back to school so to speek to learn cnc more as a hobby I always wanted to do.
we have to write the code in word or note pad. this bit of code is used to do the job.
this is a snipet of code we used to cut a small nameplate
Start
%                  
O0020(Rik outer name plate)
N10   G90  G21 G54            
N20   G40 80            
N30   T10 M06            
N40   G0 X0               
N50   G0 X-20 Y-20 S1000 M13
N60   G43 H10 G0 z3
N70   G0 Z-3 F50
N80   G41 G01 X-5 Y-3 D10 F75      
N90   G01  X-5 Y3
N100   G01 X-3 Y5
N110   G01 X33 Y5
N120   G01 X35 Y3
N130   G01 X33 Y-3
N140   G01 X33 Y-5
N150   G01 X-3 Y-5
N160   G01 X-5 Y-3
N170    G0 Z50
N180   G40 G0 X-20 Y20
N190   M05
N200    M09
N210   G28 G0 Z100
N220   G28 G0 Y100
N230   M30   
%                  

Iam reading the manual I am strugling a little to get my head round it.  I know this bit of code ref to offsets etc in the machine we are using but my main question is sort of I know
the program we use at college is alphacam and this outputs the code to the machine we use there.What do I need to do to get the code to output to a format that mach3 understands?
Or am I comming at this from thw wrong way, please tell me if I am being dumb on this I jst have not got my head round how things go, Hood did a bit of code for me and I was very greatfull for the pointers I get that I dont need the line numbers I think but the rest at the moment is I think over my head or I am just slooooow at this lol

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Code conversions
« Reply #1 on: October 19, 2010, 08:44:02 PM »
This will run in Mach so you can see what it is doing.

M98 P0020
                 
O0020 (Rik outer name plate)
N10   G90  G21 G54           
N20   G40             
N30   T10 M06           
N40   G0 X0               
N50   G0 X-20 Y-20 S1000 M13
N60   G43 H10 G0 z3
N70   G0 Z-3 F50
N80   G41 G01 X-5 Y-3 D10 F75     
N90   G01  X-5 Y3
N100   G01 X-3 Y5
N110   G01 X33 Y5
N120   G01 X35 Y3
N130   G01 X33 Y-3
N140   G01 X33 Y-5
N150   G01 X-3 Y-5
N160   G01 X-5 Y-3
N170    G0 Z50
N180   G40 G0 X-20 Y20
N190   M05
N200    M09
N210   G28  Z100
N220   G28 Y100
N230   M30   
%

From the worlds worst programmer........,  :D
RICH

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Code conversions
« Reply #2 on: October 19, 2010, 09:58:00 PM »
Is that M13 supposed to be M3?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Kai

*
  •  60 60
    • View Profile
Re: Code conversions
« Reply #3 on: October 20, 2010, 04:16:46 AM »
On my M-code list m13 is coolant on spindle CW

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Code conversions
« Reply #4 on: October 20, 2010, 05:46:55 AM »
Quote
What do I need to do to get the code to output to a format that mach3 understands?

Like any language, Gcode has "dialects". The attached file is a listing of Mach M & G codes ( you can find them in the Mach directory ).
 Do  a quick review to determine those not supported by Mach or different than the  program your using.
Clicking the G & M code buttons while in Mach provides a description of each.

The M13 is a good example that was pointed out by Gerry.

BTW, the post processor specific for say Mach, if there is one for your CAM program, is set-up to modify code posting  such that you don't have problems.
Fanuc is very close. I remember  Brian saying that Mach would be modified over time,in general, to agree with programming as shown in Peter Smid's
Handbooks.
 
RICH
« Last Edit: October 20, 2010, 05:54:33 AM by RICH »

Offline Kai

*
  •  60 60
    • View Profile
Re: Code conversions
« Reply #5 on: October 20, 2010, 06:41:39 PM »
thanks for that I will have a look to see what the translation looks like many thanks for the help.