CNC related items

 

This section contains a number of miscellaneous items including G code programs, PowerBasic utilities -- both source and executables, pdf files of interesting cnc projects, dwg files of some projects, AutoCAD lisp programs related to CNC, etc.

    UNDER CONSTRUCTION   

If you have problems, suggestions, comments or see a mistake, click here to send me an email  Unka' George

You can download a FREE CNC simulator at http://www.cncsimulator.com/ that will run on most Windows computers. This emulates a generic ISO controller for MC/mills, lathes, plasma cutters, and several other controllers such as FANUC.  While not all G codes are supported, it is very useful, and the CNC programs listed below that I wrote were developed and will run on this simulator in the ISO mode. 

 

AutoLISP files -- run under most releases of AutoCAD and clones such as InteliCAD.  In ASCII text format.

ListOut.lsp

click to download

Program to print out a text file [ListOut.txt] of the properties of entities such as circles, lines, arcs, etc. The standard selection process inside AutoCAD is used.  ListOut.txt can then be processed by the PowerBasic utilities below to generate G-code fragments for copy/paste into your program.
cnc2.lsp

click to download

Program to "dimension" CNC features such as ends of arcs.  Adds X & Y position of feature to print [separate layers suggested] Puts small donut at feature and adds leader.  Uses standard <osnap> commands. [CNC at prompt to invoke after loading]
cnc-lmd.lsp

click to download

As above except for lathes.  Z axis increases to the left, and the Y [X] dimension is doubled for diameter programming.  The chess pieces below used this. [CNC at prompt to invoke after loading]
   
   
   

 

PowerBasic source and executables to extract data and generate G code fragments.  Runs under most versions of Windows -- no DOS box required. Sample data files included. Must be "unzipped" to run.

Click for information on PowerBasic available in classic text base [console] or Windows versions.

dashes.zip

Supplied as freeware with no warranty for fitness of use, 
not even as a bad example.

PB utility to process straight line segments exported using the ListOut.lsp generated LispOut.txt file.  4 blocks are generated for each line in the dataset.  It would be trivial to include Z values.  Be sure this program and ListOut.txt are in the same directory, and that you are processing only straight line segments. Output file will be dashes.ggg in same directory as parsedash1.exe and ListOut.txt.  dashes.ggg will need to be copied/pasted into your cnc program. A sample output file as sampout.txt is included. Plunge depth is hardcoded but trivial to change.

Part of the smidcrib program below

(ENGRAVE DASHES)
N15070 G00 X0.3750 Y4.4349
N15080 G01 Z-0.0500
N15090 G01 X1.3750 y4.4349
N15100 Z0.1250
3750 Y4.4349N15140 Z0.1250

drill.zip

Supplied as freeware with no warranty for fitness of use, 
not even as a bad example.

PB utility to process "circles" in the sense of picking up the center points, exported using the ListOut.lsp generated LispOut.txt file. 2 blocks generated for each line in the dataset. 

Be sure GetCen.exe and ListOut.txt are in the same directory, and that you are processing only circles. Output file will be cenlist.txt in same directory as GetCen.exe ListOut.txt and  A sample ListOut.txt file and output file as cenlist.txt are included. 

If you have a large number of holes it can be worthwhile to sort the order.  Import cenlist.txt into Excel or OpenOffice spread sheet and sort <data/sort> and save as a comma delimited [.csv] file called CenList.csv.  

CenList.csv is the input file for drill03.exe.  drill03.exe generates drill.ggg which is an ascii test format G code fragment you can copy/paste to your CNC program.  The drill depth is hardcoded but is trivial to change.

Part of the smidcrib program below

N210 G00 X0.6250 Y4.326
N220 G81 Z-0.1300  
 

countchr.zip

Supplied as freeware with no warranty for fitness of use, 
not even as a bad example.

PB utiliity to count all characters in a CNC ascii text file.  Can be useful to detect non-printing characters, lower case "L" in place of one, etc.  Count generated for ascii characters 0 through 255. Includes PowerBasic and exe file that will run under Windows -- no dos box needed.  Includes some test cnc input files and sample output.  Also outputs .csv file for Excel analysis.

splitter.zip

click to download

 

Supplied as freeware with no warranty for fitness of use, 
not even as a bad example.

A software solution to the problem of a large file and small controller memory w/o drip feed capability.  Divides any G-code CNC file into smaller user specified size files (minimum 5k), and adds header.nc and footer .nc to preserve modal settings, etc.  Generated programs are seg00001.nc through seg99999.nc in the same directory as split02.exe.  you can specify drive and directory of the long input file and the program will accept long file names as well as the DOS 8.3 format.

Splitter.zip contains the following files:

split04.bas -  the PowerBasic CC source file
split04.exe -  the executable program that will run in Windows  no DOS box needed
blade.nc        -  a long 341k profiling program for test
footer.nc    -  a sample footer file from test.nc 
header.nc   -  a sample header file from test.nc

Note header.nc and footer.nc must be user generated from the long program they wish to split.  Let me know if you find this to be useful and any suggestions for improvements or extensions.

Update 13 Apr 07 from split02 to split03 is that the return of the tool to the last position is under rapid [G0] except for last 0.10 unit of Z travel. G1 modal is restored.

Update 14 Apr 07 from split03 to split 04 is that entire code line is parsed and LAST XYZ values are used, when multiple moves per line.  Rapid approach now to within 0.5 units in Z on following segment, then G1 model.

polygon7.zip

click to download

Supplied as freeware with no warranty for fitness of use, 
not even as a bad example.

PowerBasic program to generate polygons using live tooling in a cnc lathe with C axis control [not indexing].  Includes PB source, exe files for Windows and sample output file.  Should run on all versions of MS windows.  Feel free to email me with suggestions, observations, etc. or you need different output format. version 6.0 changes: 'N' prefix added to line numbers, H (incremental) changed to C (absolute) spindle positioning, 'X' changed from radial to diametrical.  X calculations now though to be correct v7 also includes prn file with cross reference and line numbers.

click to download

hob03c.zip

Supplied as freeware with no warranty for fitness of use, 
not even as a bad example.

alpha? test level v0.3c of a program generator to allow you to use a CNC lathe with indexing spindle as a light duty low volume gear hobber/shaper. One big advantage is that it will generate the correct involute profile using only a rack profile [straight sided] single point tool that can even be hand ground for emergency use, but certainly on any surface grinder.  Only the side angles and the flat at the tip are critical.  It is assumed that a knee type tool holder will hold the tool above the part at a distance of 1/2 the pitch diameter to the Z axis and the tool is at right angles to the Z axis. (may be a set-up problem on slant bed machines)

In use the tool is positioned (and part zero is) slightly behind  the rear edge of the gear blank and in line with the front face.  Z axis travel is used as the ram of a shaper, and the tool is fed to the front of the lathe in synchronization with the blank rotation to generate the involute profile.

Based on user input information such as pitch diameter, number of teeth, spindle resolution, desired X step increment, gear face thickness, etc. three programs are generated:

O02.cnc which cuts two opposing spaces for checking over pins for adjustment.

O099.cnc which cuts all the spaces.

O0314.cnc which strokes the Z axis in and out, rotates the spindle and increments X.

O0314 is a sub program called by both O02 and O099.

You should be able to cut involute splines on a shaft although a relieving grove at the end of the stroke will be required.

These programs have not been test run and this program generator is provided only for your comments and suggestions., which I hope to receive quite a few of. Click on the email below to contact me.

Thanks to all the regulars on AMC and RCM for their observations, suggestions, etc. that got me this far.

Please let me know if you find this of interest and/or help.

  

   
ptsim.zip

click to download

 

Companion program to poly07.  Reads the polygon.txt file and graphically simulates the machining.  Should run on any version of windows.  Note that the part stand still and the tool moves around the part. contains bppt01.bas source file, bppt01.exe executable, bppt01.prn pretty print file with cross reference and highlighted control loops, bppt01.log compiler log, and polygon.txt sample file.  Placed in the public domain 07Jan07

Zip file now contains bppt01a.

 

pulse.zip

Supplied as freeware with no warranty for fitness of use, 
not even as a bad example.

PowerBasic exe file w/source and sample output file to generate Gcode for "pulse drilling" to produce very fine chips that will feed up the flutes when doing deep hole drilling.  Runs on most any version of Windows, no dos box required.  User will need to provide start and end program blocks.  This generates the pulse drill action only.  Prompts for user inputs. zip file contains pulse01.bas, pulse01.exe and plsdrll.cnc sample output file in ascii text format.  Placed in the public domain 03 Sept 2010/

   

 

Sample G-code programs [in above MicroTech free CNC simulator format] with part prints in pdf format, dwg files, and required detail [material/tool] files.  These multiple files are "zipped" for easy download.  DWG files have CNC dimensions in addition to standard part dimensions (on separate layers).  Unless noted otherwise the pdf part prints are from the CD included in Smid's book _CNC programming Handbook - 2nd Edition_
3 ed. current, but 2 ed. still available from Enco and Amazon

Download files have been "zipped" and contains several files.  Smid's G code files are in Fanucian, and will not run as is on the MicroTech Simulator.  These also contain newer G codes which the simulator does not [yet] support (and are skipped) .  The g code [.nc files] I have written will run on the MicroTech CNCsimulator but lack required features such as roughing.  Be sure to load material and tool files where included for correct simulation.

 

 

machining center - mill projects

smidcrib.zip Fancy cribbage board [machining center / mill project]
 

lathe projects

smidchess.zip Zipped file of complete turned chess set by Smid w/ Fanuc "solutions." Based on training material from the Emco Maier corporation. Part prints are in pdf format.  "Solution" files are in both pdf and Fanuc .NC format. Dimensions and programs in metric.
queen.zip not yet available
king.zip not yet available
bishop.zip not yet available
knight.zip not yet available
rook.zip Rook [Castle] ISO .nc files will run on microtech simulator but roughing not active.
pawn.zip not yet available
gpawn.zip not yet available
   

 

Hit Counter
05/27/2014 14:59