The files in this folder can be used to quickly set up LinuxCNC, SheetCAM, and Eagle for use with SheetCNC or other similar 3D CNC machines.

Installation is by manual copying of files - detailed below.

These files are provided as-is, with no warranty whatsoever, in the hope that they may be useful. Use at your own risk.
Some files may be produced by third-party tools or provided by third parties. These may be subject to licence terms declared within those files.
All other files may be freely distributed provided that this notice is included in the distribution.

Pre-requisites:
    Machine Controller: A PC with latest 2.7.n version of LinuxCNC installed and up-to-date. Username sheetcnc.
    CADCAM-PC: A Desktop PC with SheetCAM, Eagle, and PCB-GCODE installed. Windows or Linux.
    
Take the actions for each folder, described below:

Folder: LINUXCNC-MACHINE/CopyContentsToHomeDirectory
    Copy the contents of this folder to the home directory of user sheetcnc on the LinuxCNC machine controller.
    (You should first rename the directory at /home/sheetcnc/linuxcnc to /home/sheetcnc/linuxcnc.OLD)

Folder: LINUXCNC-MACHINE/DragContentsToDesktop
    Copy (or drag) the contents of this folder to the desktop of sheetcnc on the LinuxCNC machine controller.
    
Folder: CADCAM-PC/CopyContentsToHomeDirectory
    Copy the contents to the home directory of the CAD/CAM user on the PC which is used for CAD and CAM work.
    
Folder: CADCAM-PC/CopyContentsAsPerReadme
    Copy each file onto the PC which is used for CAD and CAM work. The locations for the copies are detailed in a file
    called README.txt which is inside the folder.
    
The primary setup file which you may need to edit is SHEETCNC.ini, on the machine controller.
In particular the following values:
  AXIS #0 MAX_LIMIT: This sets the distance of travel along the X-table. Set up as appropriate to your machine (whether nominally 4', 8', etc.)
  ARC_BLEND_RAMP_FREQ: Increasing this may speed up LinuxCNC's output when following complex curves, but at the expense of sudden jerks in the path. It can be
  beneficial to increase this number in conjunction with setting a larger "G64 Pnn Qmm" value, provided that the consequent path errors are acceptable.
  SCALE: This is micro-steps-per-millimeter. It should be set to a value which matches your stepper drivers. The SCALE value can be calculated
  for each AXIS from the physics of the machine, but note that the X/Y SCALE values provided by us already include an allowance for chain stretch at the
  recommended tension and will therefore not exactly match a value calculated from a nominal chain pitch.
  Note that the X-axis settings and Y-axis settings should be the same in all respects, except for MAX_LIMIT (and except for fine differences in SCALE due to
  chain allowances). While it is physically possible to set up the Y-axis to accelerate faster than the X-axis, doing so is likely to result in
  assymmetric cuts and we do not advise it.
  MAX_LIMIT: If you prefer that the X-axis is measured along the gantry (rather than along the table) then swap the X/Y MAX_LIMIT values.
  
The installer may also need to edit the file SHEETCNC.hal, in the machine controller.
In particular the following lines:
  loadrt hal_parport cfg="0xnnn out"
    This defines the address of the parallel port. It must be correct or no input/output can occur. The address is defined by "0xnnn".
    The values which should replace "0xnnn" can be determined a number of ways. On may PCs, the single-character value "0" may suffice.
    The simplest way to detect the port address is to examine the BIOS settings.
  set parport.0.reset-time nnnn
    This defines how long a signal-pulse output to the stepper-drivers must last for the stepper-driver to reliably read that pulse.
    The value can be found in the stepper-driver sepcification. It will be listed under various names, something like "Low-Active
    Minimum Required Time". The value in SHEETCNC.hal is in nanoseconds. The value in the driver specifications may be in
    nanoseconds (in which case it will be a value in the thousands) or it may be in microseconds (in which case it will be a value
    of a few units.) Convert to microseconds if necessary before updating SHEETCNC.hal. For example 2.5us should be converted to 2500.

See http://linuxcnc.org/docs/2.4/html/hal_parallel_port.html for information.
    
STEPPER DRIVER PHYSICAL SETUP
Microstepping values which match the provided SHEETCNC.ini are:
  X and Y axes: 5000 steps per rotation
  Z axis: 800 steps per rotation
Current settings are:
  X and Y axes: 4.2A. For half-current setting, see note below.
  Y axis: 2.8A with half-current enabled.
Note on half-current: Many stepper drivers are of poor quality and drive with considerably less current than claimed. This will
result in inability to make deep cuts. Worse, the machine can easily be made to lose position by moving the axes manually. A
particular issue we have seen is that the user can accidentally move the X/Y axes while changing a stubborn cutter. We suggest
setting X and Y to half-current idle initially. If loss of position is observed while changing cutters, then set to full-current
temporarily. This will cause considerable extra heating of the motors and is only a short-term answer. The only suitable
long-term solution is to source better quality stepper drivers.
