0% found this document useful (0 votes)
136 views13 pages

Despre Interfata Mach 3

This document provides instructions for learning to program a CNC router by understanding basic G-code commands. It translates common G-code phrases into English and provides examples of how to cut straight lines, arcs, and pockets using different codes. The summary includes key G-code commands like G0, G1, G2, G3 for moving and cutting, and G40/41/42 for tool radius compensation. It also provides a sample program for cutting a 4x4 pocket and explains how to interpret it in English.

Uploaded by

Mărian Ioan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views13 pages

Despre Interfata Mach 3

This document provides instructions for learning to program a CNC router by understanding basic G-code commands. It translates common G-code phrases into English and provides examples of how to cut straight lines, arcs, and pockets using different codes. The summary includes key G-code commands like G0, G1, G2, G3 for moving and cutting, and G40/41/42 for tool radius compensation. It also provides a sample program for cutting a 4x4 pocket and explains how to interpret it in English.

Uploaded by

Mărian Ioan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

https://www.dioda.ro/ro/accesorii-cnc/183-carcasa-abs-neagra-118x297x216mm.

html

Carcasa plastic negru 118x297x216mm Z-39 la 25,82 lei

Referin Z-39

Condiie: New product

Carcas plastic negru, panou frontal+posterior, Dimensiuni 118x297x216mm

Learning to Program a CNC Router


By: Nick Lieurance | December 11, 2015

You can learn to program a CNC router with a few basic commands that can be mastered in a day or two.

Have you ever used flashcards or CDs to learn a foreign language? To learn a new word, you read it from a card or listen to a native speaker say it in the new language, then you get an
English translation. I think you can take a similar approach to learning G code, the programming language that controls CNC routers.

G-code is simple, and every machine uses it. Commercial machines come with fancy software that adds some proprietary code to every program, but the basic commands are always the
same. Ill translate some G-code into English so you can see how it works.

Software for CNC Programming


You dont have to learn G-code to create CNC programs. Theres software that will write the code for you, but it can be expensive. If you learn a few G-code commands, youll be able write
your own programs without spending a dime. You can create a CNC program in any text editing application. All you have to do is type your code in plain text and save the file with the right
extension (.nc or .gcode). There are other extensions that will work, but these two are the most common. Load the file in your CNC control software and run the program.
CNC Phrases

Whether you want to cut a straight line or an arc, drill a hole or route a pocket, you need to use the appropriate command. Think of G-code commands like phrases in a foreign language.
Heres a list of CNC phrases to get you started.

G0: Move at full speed to a specific point

G1: Cut a straight line

G2: Cut a clockwise arc

G3: Cut a counterclockwise arc

G40: Cut right down the center of the line


G41: Cut to the left of the line by the tools radius

G42: Cut to the right of the line by the tools radius

G20/G21: Coordinates are in inches/Coordinates are in millimeters

Syntax

You tell a CNC machine what to do by typing a command, followed by coordinates. If you want to cut a straight line, your code might look something like this:

G1 X3 Y0

In English, this means Cut a straight line that ends at 3 in the X-axis and 0 in the Y. Check out these G-code commands, followed by their English translations.

G0 X10 Y0: Move full speed to 10 in the X-axis and 0 in the Y-axis.

G1 X15 Y15: Cut a straight line ending at 15 in the X-axis and 15 in the Y-axis.

G2 X1 Y1 R0.5: Cut a clockwise arc with a radius ending at 1 in the X-axis and 1 in the Y-axis.

As you can see, some commands require additional parameters. The G2 command above is followed by a parameter for the arcs radius. Youll see the parameter P below, which is used with
tool radius compensation. Check out this link for more information about G-code parameters.
Tool Radius Compensation

In all of the above examples, the router bit will be centered over the X and Y coordinates. When this is true, the final size of whatever youre cutting will be smaller than the specified
dimensions by the diameter of the bit. To fix this, you have to use a G41 or G42 command, which initiates tool radius compensation. Take a look at these bits of G-code and their English
translations.

G41 P0.125: Compensate for the router bits radius by cutting 1/8 to the left of the specified X and Y coordinates.

G42 P0.125: Compensate for the router bits radius by cutting 1/8 to the right of the specified X and Y coordinates.

Example Program

To program this part on a CNC router, we need to know all the coordinates shown here.

Lets look at the code required to cut the 4 x 4 part shown above. If this part is 3/4 thick, well need to make several shallow passes to cut all the way through the material. The
following code will give us a 1/8 deep cut. To get to full depth, wed simply repeat the code several times, adding -.125 for each pass to the Z coordinate in the second line. The first line of
code is whats called a lead-in move, which gives us room to initiate tool radius compensation.

G0 X-1 Y-1
G1 Z-0.125 (add -.125 to this line for each pass)
G42 P0.125
G1 X0 Y0
G1 X4
G1 Y3
G3 X3 Y4 R1
G1 X0
G1 Y0
G1 Z0.2
G40

Heres how this translates to English:

G0 X-1 Y-1: Move at full speed to -1 in X and -1 in Y.

G1 Z-0.125: Plunge 1/8 into the material.

G42 P0.125: Compensate for the router bits radius by cutting 1/8 to the right of the specified coordinates.

G1 X0 Y0: Cut a straight line ending at 0 in X and 0 in Y.

G1 X4: Cut a straight line ending at 4 in the X.


G1 X3: Cut a straight line ending at 3 in the Y.

G3 X3 Y4 R1: Cut a counterclockwise arc with a 1 radius, ending at 3 in X and 4 in Y.

G1 X0: Cut a straight line ending at 0 in X.

G1 Y0: Cut a straight line ending at 0 in Y.

G1 Z0.2: Retract the bit so that its .20 above the material.

G40: Turn off tool radius compensation.

Heres a look at the part in a G-code viewer. Notice the lead-in move at the bottom left.

When using tool radius compensation, think about the direction of the cut. If youre moving clockwise, cut to the left of your coordinates. For counterclockwise cuts, compensate to the right.
You may need to experiment to get the hang of tool compensation.

Speaking/Writing G-code
Practice using the G0, G1, G2, G3 and G40/41/42 commands by writing some simple programs. You can download a G-code viewer here that will let you see the results of your code. Try
programming in millimeters by writing G21 in the first line. When you know these commands, you know enough G Code to create all sorts of CNC programs.
Sign up for Build a CNC Router from Popular Woodworking University for complete plans, drawings and instructions for building your own CNC machine. Youll learn even more about G-code.

ull Package - 15" x 9" - $1500

The Full package includes everything you need to build the


Hot Wire CNC foam cutter. Hot wire power
Supply and hot wire are not included
No Soldering, drilling or tapping is required
Assembly time is usually less then two hours
Includes:
All Mechanical parts, shafts, ACME screws, ACME nuts,
bearing, mounting brackets, stepper motor driver board,
power supply, cables, motors and motor couplers
Specs:
Effective Horizontal travel: 15"
Effective Vertical travel: 9"
Axis: 4 independent axis (will cut tapered wings).
4800 steps per inch
Electronics: 4 axis pulse and direction on Printer port.
Motors: NEMA23 2.8A 3.3V
Power: 110V 200W.
Cutting Speed: Software dependent - up to 20"/min
Resolution: 4800 steps per inch.
Software is available at www.devcad.com or here
Mach3 from www.machsupport.com will run the cutter
** Electronic board is fully assembled and tested
** No soldering required
** Wire length is dependent on the hot wire power
supply voltage
4 X Axis shafts 1/2" - tapped on both ends
4 Y Axis shafts 1/2" - tapped on both ends
2 Y Axis ACME screws 3/8-12 - Machined to 1/4" one one end
2 X Axis ACME screws 3/8-12 - Machined to 1/4" one one end

4 Axis electronic board (assembled and tested)


4 Stepper Motors with 4 cables.
Power supply for the electronic board. (110V or 220V)
PC to board D25 cable
Power cable for power supply
Software: Will work with Mach3 and DevCAD
Assembly Manual

Not Included: Electronics case, hot wire power supply


and hot wire
RCFoamCutter Assembly Manual - Mechanics

For more information, please visit our official


website at www.RCFoamCutter.com

RCFoamCutter setup and assembly manual

Once you unpack the boxes please go over all the parts and make sure
that non are missing or damaged.

The 1st step is to assemble the X axis carriage (the horizontal axis)

For this step you will need the following:


1 carriage (yellow metal U shape)
2 bearing support plates (black plastic plates)
4 teflon bushings
1 ACME nut (white)
6 Alan screws and 4 nuts
Mount the ACME nut onto the bearing support plates
use two 8-32 screws

Mount the bearing support plate onto the carriage as shown above

Now mount the 2nd bearing support plate on the other side of the carriage
Another look at the carriage - insert the 4 bearings
make sure that the wider side of the bearing is
facing the inside of the carriage.

View of the carriage with the ACME nut installed


You now can make 3 more of these assemblies

In this step we will assemble the complete horizontal axis


You will need:
1 The assembled carriage you made in the previous step
1 Stepper motor (Bipolar - 4 wires)
2 Long shafts
1 Long ACME screw
1 Small bearing
4 Screws
4 Nuts
Insert the two long shafts making sure that the
bearings stay in place
Screw in the ACME screw about 1/2 way in.

Mount the motor mount (the part that has the larger hole)
Make sure that the ACME screw with its machined side is
facing the hole - this is where the stepper motor will be mounted
and connected to the ACME screw via the stepper motor coupler.
Secure the two shafts using two 8-32 screws

On the other side, mount the end plate (the one with the small hole)
Insert the small bearing in the small hole
then screw in place the two shafts as shown above
Secure the motor shaft to the ACME screw with the coupler.

The below image shows the entire X carriage assembled

Now assemble another one just like it.

The next step is to assemble the Y tower

You will need the following parts for this step


1 Stepper Motor
2 Bearing support plates
1 ACME nut
1 Carriage
4 Large bearings
6 Screws
4 Nuts
Follow the steps shown before to assemble the Y carriage
The Y carriage is identical to the X carriage

Mount the new Y tower onto the horizontal axis as shown below.

Secure the two shafts with two 8-32 screws as shown below
You may want to flip the tower on its side in order
to have access to the two mounting holes

Now build another tower just like that


You should now have two of these towers - set them apart
about 24" or so - you can always change the distance between the
two towers at a later stage.

Hot Wire Hookup


The next step is to connect the eye hooks - the eye hooks are
use to hold the spring one one side and the hot wire
on the other side

Place the eye bolt through the bottom hole.


of the Y carriage as shown in the picture above.
the eye hook is circled in red.
secure the wire lead coming from the hot wire
power supply. Now do the same for the other
side of the machine.

On the other side of the machine, connect the spring


to the eye hook, and on the other side of the spring
connect the hot wire. The other side of the hot wire
will connect to the eye hook on the other side of the machine.

To test the hot wire, set the hot wire power supply
to the lowest voltage setting and the highest current
settings. Slowly increase the voltage, and at the same time
you will notice that the current will rise as well.

thin wire will provide good cutting at about 1A and thicker


wire will provide good results at 2A. Try experimenting
with different types of wire/temperatures and foams
Click here for instructions on how to set up the
electronics for the 4 axis stepper motor driver boards

http://www.rcfoamcutter.com
Hot Wire CNC Foam Cutter Electronics

www.RCFoamCutter.com

There are two software packages that will run the machine
1 Mach3 - www.machsupport.com
2 DevFoam and

For Mach3
Mach3 is available at http://www.machsupport.com/
The free version of Mach3 will control the machine, but is limited
to 1000 lines of g code.

Download Mach3 and install.


Click here to download the XML file that has all the information
to run the foam cutter Copy the XML file into the Mach3 folder
and start Mach3 - Or you can follow the instructions below to
setup Mach3. Run Mach3 software and follow these screen shots
to setup the software

Click on the image for a large view


From the Config menu, select "Ports and Pins"
the select "motor outputs" - follow the screen shot above to set up
the 4 pins (each pulse and direction)
If one or more of your motors are turning "the wrong way" you can reverse it
by clicking once in the "DirLowActive" - if it was red, change it to green
If it was green, click on it to turn it to red

Next, select from the Config menu, "Ports and Pins" but this time

select "Input Signals" and set the EStop to active low - as shown below

Now select "Output Signals" and set output #1 to pin 16


This will enable the 4 axis on the board - see image below

The next step is to set the "steps per inch" for the board
The ACME screw and Lead Screw on these machines is 3/8-12
This means the screw will turn 12 times in order for the carriage
to advance 1 inch.
Stepper motors are 200 steps per turn - so this means, that the
combination of the lead screw and the motors will give you 200*12=2400
steps per inch. To make things a bit more complicated, the board has the ability
to drive the motors in microsteps - microstepping means that for each pulse
the computer the motor will advance a part of a step.
The board can be configured for
full step - 2400 steps per inch
Half step - 4800 steps per inch
1/4 step - 9600 steps per inch
1/8 step - 19200

For best results use full step or half step


From the Config menu select "motor Tuning, then select the X axis
Set the steps per - to 4800 and the velocity to 22
Make sure to click on the "Save axis settings" button
If you do not click on the save axis settings and move to the next step
the changes you made will not be saved
Select the Y axis, Z axis and the A axis and enter the same values as are in the X axis

Hot Keys
The next step is to set the hot keys
Hot keys are keyboard keys that have special functions.
Since this board will control 4 axis (two for the left side and two for the right side)
we will need a total of 8 keyboard keys to control the machine
We would use the up/down/left/right arrow keys on the right side of the keyboard
these 4 will control the right side of the machine
For the left side of the machine we will use the D A W and Z keys on the left side of the keyboard
From the config menu, select "system Hot Keys" and then follow the instructions on the screen
By default, the right side of the machine is already setup, the left side of the machine will need
to be setup
Follow the steps in the image below

At this point you should be able to control all 4 axis

Click on the Reset button and test the 4 axis.

Foamworks setup

Download and install Foamworks from this link http://www.foamwork.net/

www.rcfoamcutter.com

https://www.instructables.com/id/Homebuilt-DIY-CNC-Router-Arduino-Based-GRBL/

You might also like