Page 130 - CNC Robotics
P. 130
Chapter 5 / Software Setup and Driver Test
at first. After checking the through-holes from top to botto m of the
board. I discovered that three of them weren't act ually connected
fro m top to bottom, so I put longer pieces of paper clip through the
holes, and the board worked fine.
Creating Test Files
Now that you have all the boards working, open a text editor like
Notepad, and type in the following lines of code.
NOOl %
N002 G90
N003 M03
N004 GOO Zl
N005 GOO XOOO.OOO YOOO.OOO
N006 GOO X002 .904 Y002.052
N007 GOO ZO.5
NOOS GOl X006 .967 Y002 .052
N009 GOl X006.967 Y006.115
NOlO GOl X002.904 Y006.l l 5
N011 GOl X002 .904 Y002.052
N012 GOO Zl
N013 GOO XOOO.OOO YOOO.OOO
N014 M05
N015 M30
Save the file as Square-gc.txt. In KCam, go to the file menu and
cli ck on "Open G code file", Find Square-gc.txt and open it (see
Figure 5.12).
The plot view will now be showing a square in red and lines in
blue. The red lines indicate whe re a cut wi ll be made and the blue
lines are where the machine will travel without cutting. Click on
the automatic tab in the CNC Controls window and run the pro-
gram you have just written. This square program will move all the
motors du ring its execut ion. It's a simple test and will ind icate that
the electronics are finished and can be put in a box. If you want to
run a few more tests, the following can be created in Notepad as
the first test was and opened in KCam.
121