Saving GCode for Haas CNC
Posted: 13 Sep 2017, 19:04
Hi, I'm using the GCode feature and have observed some issues with a Haas brand CNC.
Here is a sample code from a Haas:
Issue 1: Note the % at the beginning and end. The ABViewer code is missing the %. Therefore the Haas will generate a "corrupt file" error and will not import. Using % seems to be common practice for CNC machines. Note: there is a blank line at the top of the code also, but I left it out and it seems to work ok without it...maybe it's good practice anyway? I dunno.
Issue 2: Also note that all G00, G01, etc. have 2 numbers after the G. This does not seem critical; ABViewer uses G0, G1, etc. It looks funny on the Haas, but it will run.
Issue 3: Note that the Haas likes to have a file name at the top, with the O command. It seems a user-readable name appears on the next line in (). The Haas will complain if the file name is missing, however it will still accept the GCode and allow editing.
Issue 4: ABViewer does not output a decimal after round integer values. The Haas will interpret G1 X2 as "move 2 ten-thousandths" not "move 2 whole inches." Acceptable code is G1 X2. or G1 X2.0 or G1 X2.0000 . This is a big issue!
Thanks for reading.
Here is a sample code from a Haas:
Code: Select all
%
O00032
(GASKET FOR TRACY)
(Milling Y Axis)
(ToolNo = 3)
(WrkOfset = 54)
T3 M06
G00 G90 G54 X0.8 Y-0.3
S1500 M03
G43 H30 Z0.2 M08
G01 Z-0.125 F20.
G01 Y0.7 F3.
G01 X-0.8
G01 Y-0.3
G00 Z1. M09
T3 M06
G00 G90 G54 X1.7 Y0.67
S1500 M03
G43 H30 Z0.2 M08
G01 Z-0.125 F20.
G01 X1.15 F3.
G01 Y0.03
G01 X0.7
G00 X-0.7
G01 X-1.15 F3.
G01 Y0.67
G01 X-1.5
G00 Z1. M09
T3 M06
G00 G90 G54 X1.7 Y0.75
S1500 M03
G43 H30 Z0.2 M08
G01 Z-0.125 F20.
G01 X1.15 F3.
G01 Y0.12
G01 X0.7
G00 X-0.7
G01 X-1.15 F3.
G01 Y0.75
G01 X-1.5
G00 Z1. M09
G28 G91 Z0 M05
T1 M06
G00 X1.5 Y11.
M30
%
Issue 2: Also note that all G00, G01, etc. have 2 numbers after the G. This does not seem critical; ABViewer uses G0, G1, etc. It looks funny on the Haas, but it will run.
Issue 3: Note that the Haas likes to have a file name at the top, with the O command. It seems a user-readable name appears on the next line in (). The Haas will complain if the file name is missing, however it will still accept the GCode and allow editing.
Issue 4: ABViewer does not output a decimal after round integer values. The Haas will interpret G1 X2 as "move 2 ten-thousandths" not "move 2 whole inches." Acceptable code is G1 X2. or G1 X2.0 or G1 X2.0000 . This is a big issue!
Thanks for reading.