DeskNC for DOS Users Manual and Quick Reference V2.0


Quick Reference

Key	Action

A	Sets "All" coordinates to zero.
B	Jogs tool "Back" along the Y Axis of a mill or X Axis of a lathe.
C	"Clear" graphical display.
D	Jogs tool "Down" along the Z Axis of a mill.
E	"Execute" a G-Code command directly.
F	Jogs tool "Forward" along the Y Axis of a mill or X Axis of a Lathe.
Alt+G	"Go" process the "G"-Code file.
H	Moves tool to the "Home" position.
I       "Import" a G-Code file.
J	Toggle "Jog" distance - 100,000, 10,000, 1,000, 100, 10, or 1 step.
K	Brings up the Select machine window.
L	Jogs tool "Left" along the X Axis of a mill or Z Axis of a lathe.
M	Brings up the Setup "Machine" window.
O	Toggles Screen or "Output" mode.
P	Toggles "SteP" or Continuous mode.
Q	"Quit"
R	Jogs tool "Right" along the X Axis of a mill or Z Axis of a Lathe.
S       "Set" Index
T	Brings up the "Tool" Offsets window.
U	Jogs tool "Up" Along the Z Axis of a mill.
V	Shows About Message Box.
X	Sets X Axis to zero.
W	Brings up the Colors window.
Y 	Sets Y Axis to zero.
Z	Sets Z Axis to zero.
+	Increments the feedrate override by 5 percent.
-	Decrements the feedrate override by 5 percent.
6	Sets screen resolution to 640 x 480 x 256.
7	Sets screen resolution to 800 x 600 x 256.
8	Sets screen resolution to 1024 x 768 x 256.
Esc.	Resets program or closes a window
Up Arrow    Scroll back through loaded file
Down Arrow  Scroll forward through loaded file
Left Arrow    Jogs A Axis "CCW" 
Right Arrow   Jogs A Axis "CW"
Delete  Shifts display coordinates 10% to the Left
End     Shifts display coordinates 10% to the Right
Page Up Shifts display coordinates 10% Up
Page Dn Shifts display coordinates 10% Down
1       Zooms in the display coordinates by 10%
2       Zooms out the display coordinates by 10%
F1      Help
F10	Toggle Display Features

Overview

DeskNC for DOS is a G-Code interpreter that will take a high level standard
G-Coded file and process it into the required signals for several different
driver types.  It currently will drive Step / Direction,  Bi-Polar phase, or
the MaxNC unipolar drives.  It includes a graphical display of the tool
location that is continuously updated in real time.  Files can be dry run
exactly as they would be run while machining.  Coordinate display is updated
in real time and automatically shut down to improve performance.
Drivers can be plugged into the parallel port or a dedicated I/O board.

Command Summery

A - Set "All" coordinates to zero.
Pressing  A  will zero all Axis of the current machine

B - Jogs tool "Back" along the Y Axis of a mill or X Axis of a lathe
Pressing  B  will jog the tool "Back" the amount of steps displayed under
Jog.  "Back" refers to the Y Axis of a mill or the X Axis of a Lathe.
To interrupt execution of this command, press any key except +, - , or G.

C - "Clear" display
Pressing  C  will clear the graphical display area.

D - Jog "Down"
Pressing  D  will jog the tool "Down" the amount of steps displayed under
Jog.  "Down" refers to the Z Axis of a mill.  To interrupt execution of
this command, press any key except +, - , or G.

E - "Execute" a command
Pressing  E key  enable the last line of the status area for input of a
G-Code command.  You must enter the command in full.  It is non modal.
Eg.  Press E then enter G01 X1 Y2 Z3 and press Enter.  The tool will move
to positon 1, 2, 3.  For a list of supported G-Code commands,  look at
Appendix A.

F - Jog "Forward"
Pressing  F  will jog the tool "Forward" the amount of steps displayed
under Jog.  "Forward" refers to the Y Axis of a mill or the X Axis of a
Lathe.  To interrupt execution of this command, press any key except
+, or -.

Alt + G - "Go"
Pressing G will start processing the currently loaded G-Code file either
continuously or one command at a time depending on whether Step or Cont. is
selected.  To interrupt processing of the file, press any key except
+, or - .

H - Move to the "Home" position
Pressing H will send the tool to the home position.  If you are not using
home switches then the tool will go to the position specified under Home
Position during the Setup of the machine.  If you are using homing switches
then the tool will move rapidly in the direction  of the Home Position
until the home switches are triggered.  It will then move a short distance
away and then move at the Instant Velocity of the machine until the switches
are triggered again and automatically set the coordinates to the Home
Position.

I - "Import" file
Pressing I will bring up the Import file window.  The  up and down arrow
keys will toggle the selected file while the PageUp and PageDown keys will
toggle the current block of files.  To import a file, select it and press
enter.  To display a list of files using wildcards, enter the wildcards
and press Enter.  To change drives, enter a new drive letter and press Enter.
To cancel and close this window press Esc.

J - "Jog"
Pressing J will toggle the "Jog" distance from 100,000 - 10,000 - 1,000 -
100 - 10 - 1 step.  Distances are in steps and not absolute distances.  The
Jog distance is displayed in the lower right corner of the main window and
represents the number of steps the tool will move when one of the movement
keys are pressed (U, D, R, L, B, F).

K - Select Machine
Pressing K will bring up the Select Machine window.  There can be a maximum
of ten different machine/configurations.  Pressing the Up/Down arrow keys
will toggle the seleted machine.  To select a machine/configuration, select
it and press the Tab key until Ok is highlighted and then press Enter.  To
set a particular machine to be the default machine/configuration loaded at
startup,  select it and press the Tab key until Set As Default is highlighted
and press enter.  You MUST use the Set As Default command each time you
change a parameter during the Setup Machine ( M ) function in order for
the changes to be loaded into the default startup configuration.  To cancel
and close this window press Esc.

L - Jog "Left"
Pressing  L  will jog the tool "Left" the amount of steps displayed under
Jog.  "Left" refers to the X Axis of a mill or the Z Axis of a Lathe.  To
interrupt execution of this command, press any key except +, - , or G.

M - Setup "Machine"
Press M to bring up the Setup Machine window.  To move around the screen,
press Tab or Backspace.  To select parameters, highlight them with the Tab or Backspace
keys and press Enter.

Parameter definitions and guidelines
New Machine - Edit Configuration.
      Select New Machine to enter parameters for a new machine or select
      Edit Configuration to edit an existing machine.  To edit an existing
      machine, use the Tab or Backspace key to highlight the machine/configuration
      and press enter to load its parameters.
Name
      Enter a unique identifying name for this machine/configuration.
Machine Type
      Select either Mill or Lathe.  Lathes have their origin set at the
      Left "Chuck end" and currently cannot be changed.
Maximum SPS
      Enter the maximum Steps per Second that your Stepper Motors can consistantly
      travel at.  This setting sets the G0 rapid travel rate as well and can never
      be overridden.
Instant velocity
      Enter the maximum start velocity of the motors in Steps per Second.
Accelleration
      Enter the accelleration of the motors in Steps per Second per Second.
Driver type
      Select which type of driver this machine uses.  DeskNC supports
      Step/Direction, Bi-Polar phase, and the UniPolar phase driver used
      on the MaxNC mill.
Port Address
      Enter the address of the Output port.  Make absolutely sure this
      address is correct.  When the Setup Machine window is first  brought
      up,  the address of the first parallel port is shown.  If you are
      using an I/O board or a different parallel port, make changes
      according to the manufacturers specifications.
Output Bits
      Enter the BIT Number of the output PIN for each output signal.  Look
      at appendix B for pinouts for the parallel port.  Since DeskNC can
      use any I/O board in addition the parallel port,  you must use BIT
      numbers and NOT PIN numbers.
Step / Direction signals
      If your driver uses a negative edge triggered signal to step the
      motor the set Step to Neg. If your driver uses a negative signal
      while moving the motor forward, set Dir to Neg.  If your motors are
      running backwards, Revers this selection.  Consult your drivers
      reference manual for further information.
Backlash Compenstation
      Enter the amount of backlash for each Axis in Steps to enable
      software backlash compensation.
Home Position
      Enter the coordinates of the Home Position.  See the H command
      above for information on how DeskNC uses these coordinates.
Tool position
      Enter the coordinates of the Tool Change position.  If any of
      these coordinates are non-zero then the tool will move to this
      position when a call for a tool chage (Txx) is encountered.
Steps per Unit
      Enter the number of steps each motor must turn to position the
      tool one unit further.  If you are using inches then set this
      value to Steps per Inch.  If you are using Millimeters then set
      it to Steps per Millimeter.
Switches
      If you are not using home or limit switches,  set the Port Address
      to zero.  If you are not using a Home switch on a specific Axis then
      set the Bit to -1. Switches are not supported when using the MaxNC driver
      through the parallel port.  When you first enter the Setup Machine
      window, the port address is set to the first parallel port.  This
      is the base parallel port address + 1.  If you are using an I/O
      board or a different parallel port set this port according to the
      manufacturers specifications.  Limit switches for each axis must
      be wired in series.  Any limit switch that is triggered will
      cause all movement to stop instantly without decelleration.
      Switches must be wired in accordance to Appendix C. For an
      explanation of the action of the home switches, look at the H
      command above.  To cancel and close this window press Esc.

Aux Signals
      Used for relays and enable signals etc.  See appendix D for an explanation
      on how to set up Auxillary signal control in DeskNC.  Note - Under
      the License agreement, you may NOT control a relay that automatically 
      turns on your machine.

O - "Output" mode
Press O to toggle between screen and output modes.  In screen mode,
commands and file execution are carried out exactly as if they were
being sent to the machine but as fast as possible without concern for
feedrate.  Use screen mode to run through a g-code file before you
start cutting.

P - "SteP" or Continuous mode
Press P to toggle between Step and Continuous modes.  In Step mode, press G
to execute on command at a time.

Q - "Quit"
Press Q to exit DeskNC.

R - Jog "Right"	
Pressing  R  will jog the tool "Right" the amount of steps displayed under
Jog.  "Right" refers to the X Axis of a mill or the Z Axis of a Lathe.  To
interrupt execution of this command, press any key except +, - , or G.

S - "Set" Index 
Pressing  S will allow changing the current G-Code index.  The g-code index
is the number of the g-code block being executed.

T - "Tool" Offsets
Press T to bring up the tool offset window.  Mills have access to length
offsets only (Z Axis) while lathes have access to X and Z axis.  Lathe
Axis designations will be in parenthesis.  Tool offsets are added to the
coordinates when a call for a tool change (Txx) is encountered.  Use the
Tab key to move around the screen and enter tool offsets.  To save the
tool table, highlight Ok and press Enter.  To cancel and close this
window press Esc.

U - Jog "Up"
Pressing  U  will jog the tool "Up" the amount of steps displayed under Jog.
"Up" refers to the Z Axis of a mill.  To interrupt execution of this
command, press any key except +, - , or G.

V - About
Press V to bring up the About window.  Press any key to close it.

W - Colors Window
Press W to change the colors used for rapid, linear, cw, ccw moves.  Use the 
Tab key to move between fields.  Press Enter to accept the new colors or Esc
to Cancel

X - Zero "X" Axis
Press X to set the X Axis to zero.

Y - Zero "Y" Axis
Press Y to set the Y Axis to zero.

X - Zero "Z" Axis
Press Z to set the Z Axis to zero.

+ - Increase feedrate
Press + to increase the feedrate by 5%.  The new feedrate will take effect
on the NEXT move and will NOT be immediate.  The current feedrate and the
overridden feedrate will be displayed at the lower right of the main screen.

- - Decrease feedrate
Press + to decrease the feedrate by 5%.  The new feedrate will take effect
on the NEXT move and will NOT be immediate.  The current feedrate and the
overridden feedrate will be displayed at the lower right of the main screen.

6 - Set screen to 640 x 480 x 256
Press 6 to set the screen to 640 x 480 x 256 resolution.  If a compatable
SVGA card is not present, then this function will not be available.

1 - Zooms in the coordinates by 10%
Future toolpaths drawn to the screen will be scaled to the new coordinates.

2 - Zooms out the coordinates by 10%
Future toolpaths drawn to the screen will be scaled to the new coordinates.

7 - Set screen to 800 x 600 x 256
Press 6 to set the screen to 800 x 600 x 256 resolution.  If a compatable
SVGA card is not present, then this function will not be available.

8 - Set screen to 1024 x 768 x 256
Press 6 to set the screen to 1024 x 768 x 256 resolution.  If a compatable
SVGA card is not present, then this function will not be available.

Up Arrow - Scroll back
Press the up arrow key to scroll backwards through the loaded file.  At the
far right is the associated index of each line.

Down Arrow - Scroll forward
Press the down arrow key to scroll forwards through the loaded file.  At the
far right is the associated index of each line.

Left Arrow - Jog A Axis CCW
Pressing  the left arrow will jog the table "CCW" the amount of steps displayed
under Jog. To interrupt execution of this command, press any key except +, - , or G.

Right Arrow - Jog A Axis CW
Pressing  the left arrow will jog the table "CW" the amount of steps displayed
under Jog. To interrupt execution of this command, press any key except +, - , or G.

Delete - Pans Left
Pressing Delete will shift the coordinate system 10% to the Left.
Future toolpaths drawn to the screen will be scaled to the new coordinates.

End - Pans Right
Pressing End will shift the coordinate system 10% to the Right.
Future toolpaths drawn to the screen will be scaled to the new coordinates.

Page Up - Pans Up
Pressing Page Up will shift the coordinate system 10% Up.
Future toolpaths drawn to the screen will be scaled to the new coordinates.

Page Dn - Pans Down
Pressing Page Dn will shift the coordinate system 10% Down.
Future toolpaths drawn to the screen will be scaled to the new coordinates.

F10 - Toggles Display Features
Pressing F10 will turn off certain graphics to speed the processing between
g-code commands.  Turn off graphics for a smoother transition between g-code
commands when processing a g-code file with many short linear (G01) commands.
The first time F10 is pressed, the Status Bar at the bottom of the screen will
be turned off while processing a g-code file.  The second time it is pressed,
the Coordinate Display will be turned off.  The third time it is pressed, the
index will be turned off.  Pressing F10 a fourth time will turn all graphics
back on.

Appendix A
Supported G-Codes


DeskNC assumes G90 (Absolute coordinates) and uses incremental I and J (K)
only.  It accepts comments, line numbers, spaces or no spaces, and modal
commands.
G00	Rapid travel at maximum feedrate.
G01	Linear interpolation at current feedrate.
G02	Clockwise circular interpolation at current feedrate.  X-Y plane only. 
G03	CounterClockwise circular interpolation at current feedrate.  X-Y plane only. 
G04 	Dwell in tenths of a second. Eg. G04 X10 will dwell for 1 second.
G81	Drill cycle.
G90 	Absolute coordinates (Assumed).
G92     Set Coordinates 
M00	Program Stop
M02	Program end
M07	Coolant On
M08 	Coolant On
M09	Coolant Off
Txx	Tool change to tool xx

Appendix B
Pinout for the Parallel Port

IBM-PC Parallel Printer Port Female DB-25 Socket external Pin layout 
 ______________________________________________________ 
/                                                      \
\  13  12  11  10   9   8   7   6   5   4   3   2   1  /
 \                                                    /     PINS
  \  25  24  23  22  21  20  19  18  17  16  15  14  /  
   \________________________________________________/   



 ______________________________________________________ 
/                                                      \
\   x   x   x   x   7   6   5   4   3   2   1   0   x  /
 \                                                    /   Output Bit Numbers
  \  x   x   x   x   x   x   x   x   x   x   x   x   /    Port Address = Base Address
   \________________________________________________/   


 ______________________________________________________ 
/                                                      \
\   4   5   x   6   x   x   x   x   x   x   x   x   x  /
 \                                                    /   Input Bit Numbers
  \  x   x   x   x   x   x   x   x   x   x   3   x   /  Port Address=Base Address + 1
   \________________________________________________/   



 ______________________________________________________ 
/                                                      \  (Second Ouput Port
\   x   x   x   x   x   x   x   x   x   x   x   x   x  /  For Aux signals)
 \                                                    /   Output Bit Numbers
  \  x   x   x   x   x   x   x   x   3   2   x   1   /    Port Address = Base Address + 2
   \________________________________________________/     Pins 14, and 17 are INVERTED (BITS 1, 3)



Appendix C
Switch Wireing Diagram 

 ______________________________________________________ 
/                                                      \
\  13  x   x   x   x   x   x   x   x   x   x   x   1   /
 \ :                                                : /     
  \:  Gnd Gnd Gnd Gnd Gnd Gnd Gnd Gnd  x  +5  x   x :/  
   :_______________________________:________________:   
   : 				   :                :
   :                   /           :                :
   :__________________/ ___________:                : 
   :                                                :
   :                Switch                          :
   :                                                : 
   :_________________/\/\/\_________________________:
                      4.7K

Example of a home switch connected to BIT 4 (PIN 13) of the Parallel Port.  Connect
one terminal of the switch and one lead of a 4.7K Ohm resister to PIN 13
of the Parallel Port (BIT 4).  Connect the other lead of the switch to a
Ground Pin (Any PIN 18 - 25).  Connect the other lead of the resister to
the +5 volt PIN 1).


For the Parallel Port -

Home and limit switch input pins need to be pulled up to +5 volts with a
4.7K Ohm resister.  PIN 1 can supply the +5 Volts needed.

For an I/O Board -
Input ports generally have pull up resisters installed.  Consult your
I/O board manual for specifications.  Switches are sensed when a logic
low is detected from the input port.



Appendix D
Wiring Auxillary Relay Signals Using PINS 14, 16, and 17 of the Parallel Port

 ______________________________________________________ 
/                                                      \  Second Ouput Port
\   x   x   x   x   x   x   x   x   x   x   x   x   x  /  For Aux signals
 \                                                    /   Output Bit Numbers
  \  x   x   x   x   x   x   x   x   3   2   x   1   /    Port Address = Base Address + 2
   \________________________________________________/     Pins 14, and 17 are INVERTED

When setting up auxillary (relay or enable) signals follow these guidelines.
Do Not use any portion of any other G or M Code supported by DeskNC with the exception
of the coolant (M07, M08, M09) M codes for the Code High or Code Low parameters.
When using the Parallel Port - PINS 14, and 17 are Inverted (corresponding to
BITS 2, and 4).  If you are using one of these PINS, switch the Code High with
the Code Low parameter. The Code High parameter represents the code that will set that
signal to a logic High.  Likewise, the Code Low parameter sets the signal to a logic
low.

Example 1 - Coolant Relay Signal using the Parallel Ports Pin 16

Port = Base + 2
Title = "Coolant"
BIT = 2
Code High = "M07"
Code Low = "M09"

Example 2 - Coolant Relay Signal using the Parallel Ports Pin 14

Port = Base + 2
Title = "Coolant"
BIT = 0
Code High = "M09"    : This is switched with Code Low because PIN 14 is Inverted
Code Low = "M07"

Examples of acceptable Code High / Code Low parameters

M005 - No good - Contains "M00" which is program Stop
M05 - This is acceptable
