Return to Previous page
WHAT DO I DO?
An overview to give the sequence of operations
(First time computer users, build a simulated 3-axis machine, for a cost of
£10-15 details included, and follow the step by step examples in the
manual, which even covers testing your 'car-boot bargain' PC.)
Using any ASCII text editor or word processor, (DOS5 EDIT is fine) the user
types a 'PARAMETER' file, which contains the NON-dimensional data for the
machine, such as feed rate, rapid feed rate, port address, scale factor,
enable for error correction etc, this file is saved to disc as PARAM.nnn
where nnn is your 3-digit identifier. (First time users, use the default
PARAM3.000 file.)
The user then types a 'CONTROL' file which is the list of operations needed
to complete the job, chosen from a 'language' of 22 command types. This
file holds the dimensional data, and is saved to disc as YOURJOBn.CON where
'yourjob' is your identifier for this machining job. Example, CONROD2.CON
(First time users, use the demo control files.)
The machine is set-up, the cutter set to 'datum' position, the motors are
switched on, and the program is run. The computer 'beeps' at the
completion of the work, which could be many hours of almost continuous
cutting. (While learning, follow the numerous examples given in the guide)
Return to Previous page
GETTING HELP WITH CIRCULAR AND OTHER COMPLEX DATA
Anyone who has watched the movements of carriage and copy slide of a copy
lathe turning an angular or curved profile might be thinking that the
programming for complex shapes is very mathematical. NOT SO! (Or rather it
is, but we don't do it). The computer is often being asked to perform the
equivalent of this X-Y function when it outputs the design produced using a
Computer Aided Drawing (CAD) program to a PLOTTER. We can borrow this
facility to produce the data for our machine program. The 'industry
standard' language for driving X-Y plotters is the HEWLETT-PACKARD
GRAPHICAL LANGUAGE. (HPGL)
Using the CAD package DraftChoice (or program with which you are already
familiar providing it produces a HPGL file) to draw out the job required to
scale and save the work as a plot file. That's it, the X, Y program data is
complete, you save the data as a file with a .PLT extension. These data
files can be imported into our control file, thus the CAD program is used
as a "calculator" for the circular data.
The Compucut command set includes rapid traverse moves, Z axis moves,
altering feed rates, selecting manual control, Loopn command for multiple
passes of all or part of a program, and others.
Basically, the system can be overviewed as a provision for learning to use
and test your system with 'COMP2KEY', then producing your tricky
engineering projects with 'COMPUCUT' and if your CAD package has produced
very large files, to rout out your large, clipartistic wooden designs with
'COMPURAM'
Return to Previous page
IF YOU CAN DRAW IT, YOU CAN MAKE IT
(The computer can even help you draw it)
You DO NOT need an expensive computer for machine tool control (typical
cost £50-£100)
You DO NOT need previous programming experience.
The results of a mistake are trivial when you prove your programmes by
milling polystyrene wall-board, which is cheap and kind on the kit, even if
you decide to rapid traverse towards the table! However, once proved and
saved on disk, these programmes become part of your tool-kit, and are
always on hand to produce duplicate pieces in the future.
Return to Previous page
Software Command Set
The control files will be named JOBn.CON for example
CONROD2.CON, DEMO1.CON etc. Some commands use values passed via the PARAM
file.
Command syntax is case sensitive use UPPER CASE.
**************
'STRAV' Use slow feed rate as set in CUT in PARAM file, or
last X,Y or ZFEED command.
Example: STRAV;
'RTRAV' Ramp up from CUT feed rate to FAST feed rate in
RAMP steps, slowing down to CUT before stopping.
Can only be used in CARDINAL moves, ie moves in X
or moves in Y. For OBLIQUE moves STRAV is used
even if you specify RTRAV.
Example: RTRAV;
'PAxxx,yyy' Plot Absolute, Is followed by X ordinate then Y
ordinate separated by a comma. All dimensions
are taken from the 'ZERO' prompt to the user on
screen 2, or an F12 key press. If the movement is
oblique then the feed is set by CUT, in a cardinal
movement feed is set by the last RTRAV or STRAV
command to FAST or CUT respectively.
Example; ( assuming imperial pitch screw, and
SCALE is set to give 1 step = 1/1000 inch )
Example; PA1000,550; means move to 1.000 inch
in X, and 0.550 inch in Y
'PR+/-xxx,+/-yyy' Plot Relative or incremental move, is followed
by signed X ordinate, then signed Y ordinate
separated by a comma The datum for the move is
last position, feeds as 'PA' Ordinates preceded
by one space are taken as positive.
PR 50,-175; is the same as PR+50,-175;
Example; PR+50,-175; = oblique cut +50 in X,
-175 in Y.
As with PA, the units for PR could be 1/1000 inch
or 1/100 mm. depending on your screws and 'SCALE'
in your PARAM file.
'3Axxx,yyy,zzz' Three dimensional ABSOLUTE move. Gives
3-axis interpolation.
Example; 3A 25,50,75;
'3R+/-xxx,+/-yyy,+/-zzz' Three dimensional RELATIVE move. Gives
3-axis interpolation.
Example; 3R 25,-50,75;
'CD' Cutter down, Z axis feed positive. Feed rate set in CUTZ
in PARAM.nnn or last ZFEED command.
Example: CD150;
'CU' Cutter up, Z axis feed negative. Feed rate set in CUTZ
in PARAM4.nnn or last ZFEED command.
Example: CU200;
'ON' Turns AUXiliary output ON. Default is OFF.
Example: ON;
'OFF' Turns Auxiliary output OFF.
Example: OFF;
'XFEEDnnn'
'YFEEDnnn'
'ZFEEDnnn' Change the X, Y & Z feed rate factor to nnn.
The larger you make nnn the slower the feed rate.
Example: YFEED200;
'LOOPnn' Loop instruction for multiple passes through the
commands within the block beginning with LOOPnn
and ending with LOOP. LOOPnn means; REPEAT the
following block nn times.
Example: PA500,1000;LOOP12;CD20;PA1000,1000;PA500,1000;LOOP;
This cuts a slot from 500 to 1000 on X, in 13 cuts of
20 steps in Z.
'HOME' Homes the cutter by reversing into X limit switch, then
reversing into Y limit switch. Run the test program 'LIMITS.exe'
to check which limit switches will be the 'HOME' switches. Note,
before HOME will execute, ALL limit switches must be clear.
Used to set the cutter to a known datum, although not as accurate
as clocking a dowel hole on the work or fixture, different types
of micro switch will give differing repeatability. Use of the
PARAM.nnn parameters POLX, POLY, XHOM and XYHOM and HOMER, allow
the datum 'corner' to be changed between jobs or machines.
Corner can be changed in the program with CORNER command which
overwrites the HOMER parameter. If the CLICK parameter is set to
a NON-zero value (default = 200) this number of steps are moved
in X forward, Y forward to clear the limit switches. CLICK is
only read by COMPCUTA. Example: HOME;
'SC message' Outputs message to screen, then waits for ENTER
key to be pressed. Uses; Job title, prompts for tool changes,
prompt for measuring etc.
Example: SC,Engine plate HONDA / ANTIG 8mm Dural;
Example: SC,Change to 3mm end mill, set to 1.5mm clear of work;
'MES message' Outputs message to screen, and continues with
program. Cannot be used within a loop.
Example: MES,Hole 23;
'REM' Indicates that this line is a remark and generates no
data. Do not use REM within a LOOP command, and do not use ';'
within a REM. Note REMs do not appear on screen, they help you
read the control file.
Example: REM Now drive to X400,Y600;
'SP0' Denotes end of program. Example: SP0;
SP0 offers the option to Quit or repeat using the same data,
or to HOME and repeat with same data. To use the 'repeat with
same data' option the data should be in relative (PR) form.
'PD' and 'PU' are recognised as valid codes, but generate no
data. This allows the PD and PU commands in the HPGL files to be
left in the .CON file without causing 'unrecognised command'
errors.
'LABEL num;' Allows the placing of destination markers anywhere
in the main program, but not within a LOOP. Num can be ONE, TWO,
THREE etc up to TEN. LABEL FOUR; Uses the 'four' as a target
destination for GOTO commands.
Example: LABEL SIX;
'GOTO num;' Starts to execute your program at num.
Example: GOTO THREE;
'IFY num;' IFY means "If response to the preceeding SCreen
prompt was YES then GOTO the LABEL num, otherwise continue. The
envisaged use of this conditional goto is to allow the operator
to stop and prompt for the measurement of a feature, jumping back
as many times as necessary to size the feature by responding 'Y'
to the prompt. When the feature is sized, the response is to
press ENTER and proceed with the rest of the program.
Example: SC, Check depth = 12.3mm, type Y to take another cut;
IFY THREE;
Typing 'Y' in response to the 'check' prompt, will cause the
execution of the program data back at LABEL THREE, pressing enter
will allow the program to continue.
'INP1IF nnn FIVE; INP1IF means if the value returned by a read
of the limit inputs on card 1 is equal to nnn then jump to label
five, otherwise continue.
Example: INP1IF 112 SIX; If the limits return 112 then jump to
label SIX, else continue. (INP1IF is only available to COMP3CUT,
COMP3BIG, for COMPDATA/COMPCUTA equivalent see 'advanced
commands').
'CORNER n; This changes the 'HOMER' parameter to n.
Allowable values are 0 to 11 (00, 01, 10, 11) which set the
POLarities of X and Y. As in HOMER, XHOM and XYHOM a 1 is
reversed, 0 is normal. Intended to allow both homing to datum
X0,Y0 (bottom left) corner and later homing to clear the cutter
for component / cutter changing.
Example: If 'HOMER' parameter is 0 and the program executes
CORNER 11; then the HOME corner is changed to the diagonally
opposite corner.
'XHOM nn; This command overwrites the default value for XHOM set
in the parameters file. Using the XHOM, XYHOM and CORNER
commands allows a new 'parked' position for the HOME command.
Example: XHOM 96;
'XYHOM nn; Used as above, to change the HOME corner set by limit
switches. Use the LIMITS program to check on the XHOM and XYHOM
values required.
Example: XYHOM 48;
'JOYCON' If you have a joystick(s) connected to the games port
then this command transfers control to the control pod which you
may have built in to your machine. It also works with a standard
cheap 'games' joystick. If you have not got a games port, you
might have trouble locating a dedicated card, the solution is to
buy a cheap sound card, always has a games port, and most can
be permanently enabled by on-card jumper, so not requiring a
software driver to be installed . At the lowest level the
joystick replaces the keyboard for 'Yes' and 'No' reponses using
buttons A and B respectively. The stick gives a single
step on the appropriate axis, then if the stick is held
it goes into continuous movement at normal cut rate. Other
programs in the Toolkit may use the stick(s) and buttons for
different functions.
'KEYCON' This command transfers control to manual input via the
keyboard. KEYCON can be written in to your program, or by
pressing the F11 key during a run, control then goes manual at
the end of the current cut. The program turns CAPS ON an NUMLOCK
OFF in this mode F1 and F2 single step the Z axis, 8 and 2 on the
numeric pad single step the Y axis, 4 and 6 single step the X
axis. F3 and F4 turn the AUX contacts On and Off, F5, F6, F7
and F8 fast traverse in X and Y by BLOCK steps, F9 reverts to
execution of the stored program, F12 zeros the Absolute datums in
X and Y
The numeric pad keys 7,9,1 and 3 ramp up/down the cutting
rates in X and Y.
'D1 nn;' Outputs an 8-bit byte equivalent to nn decimal to the
Port.
Example: D1 170; Will place 10101010 on LPT1
'D2 nn;' Outputs a byte to second card
Example: D2 85; Will place 01010101 on LPT2
The D1/2 commands are useful for users of the software
only, to initialise their NON-Compucut hardware.
'SX nn;'
'SY nn;'
'SZ nn;' Increments the current value of SCALX,Y or Z by nn.
Example: SY -0.6; Decrements SCALY by 0.6.
The following commands are valid only if a second interface
is connected via LPT2
'A2ON' Switches second AUX on.
Example: A2ON;
'A2OFF' Switches second AUX off.
Example: A2OFF;
'X2nnn' Drives a stepper on second interface nnn steps
relative to current position. nnn is signed
number 1 to 32,000.
Example: X2-654;
'Y2nnn' Drives a stepper on second interface, as X2 above.
Example: Y2 234;
'Z2nnn' Drives a stepper on second interface, as X2 above.
Example: Z2962; Note space is optional.
'DMnnn' Delays nnn milliseconds for timing purposes.
Example: DM50;
'DSnnn' Delays nnn seconds.
Example: DS10;
'PAUSE' Beeps and waits for keypress with no display.
Example: PAUSE;
'Advanced' commands available to COMPDATA/COMPCUTA
****************************************************************
In order for the user to set up some degree of flexible
input/output structure to control the program flow without having
to 'patch' the COMPUCUT programs, a simple command set is now
included to allow 'macro' programming based on the inputs from:
INP1/2, MOUSEX/Y, Joystick and CHILD routines etc. On execution
the variables INP1 and INP2 are set to the values returned by
reading the limit switches of cards 1 & 2. The user can put some
form of transducing device on one or more limit inputs and the
program will read these and act accordingly.
To assist with processing these input quantities a set of
user variables and arithmetic operators are included. User
variables VAR00 to VAR10 can be loaded directly with integer
numbers, or can be loaded with the contents of other variables
including INP1, INP2, MOUSEX, MOUSEY, CHILD1 and CHILD2. All
variables can be the subjects of addition, subtraction,
multiplication and integer division. The program flow is then
directed by the new RELATIONAL operators IF EQUAL (IFE), IF
GREATER (IFG) or IF LESS (IFL). Finally a variable can be
displayed with the SHOW command.
Note, one of the design rules of the prototype Compucut system
(circa 1994) was to re-deploy the 'ex-corporate' XT class PCs
which were flooding onto the market, allowing cheap, powerful
and stable DOS platforms for hobby use. This is still the case,
COMPDATA scans your whole program and PRE-processes whatever data
it can, but the 'advanced' commands entail much more real time
(during machining) computing and a '386 machine should be
considered a minimum .
ADVANCED COMMAND SET (for use with COMPDATA/COMPCUTA)
*****************************************************
INP1; sets variable INPUT1 equal the value on card1 limit inputs
INP2; sets variable INPUT2 equal the value on card2 limit inputs
To use the following two commands, a serial mouse must be
connected, and its DOS driver installed by adding it to your
AUTOEXEC.BAT file or simply typing AMOUSE /R9 when you boot. A
driver called AMOUSE.com is included which allows variable
resolution. UTEST is a test routine for your mouse or mouse
based transducer, and AMOUSE.HLP is the menu for the driver
switches entered by typing AMOUSE/H.
MINIT; initialises the serial mouse encoders and starts mouse.
Note, depending on your driver software resolution
settings MINIT is not always to 0,0.
MOUSE; sets variables MOUSEX and MOUSEY to the current mouse
co-ordinates, a MINIT command must have been made
earlier in the program to initialise/start the mouse.
To use the following eight commands, one or two joysticks must be
connected to the games port.
JBA; will set the variable JBA to the value of JoyButton A.
JBB; JBB B.
JBC; JBC C.
JBD; JBD D.
JSX; JSX to the JoyStick X value.
JSY; JSY Y
JSX2; JSX2 to 2nd JoyStick X value.
JSY2; JSY2 Y
OPENO filename; opens a file for output allowing subsequent
STORE variable; commands to save data.
Example: OPENO myfile.dat;
STORE INPUT2; saves the data value of variable input2 to disk.
CLOSEO; Closes the output file.
OPENI filename; opens a file for input allowing subsequent
GET variable; commands to input data.
Example: OPENI filename.dat; where 'filename.dat' is a file of
numeric strings.
GET VAR01; Reads the next string from the Input file and assigns
the integer value to variable VAR01.
Example: GET VAR05;
CLOSEI; Closes the input file.
VAR00 to VAR10 can be assigned directly by number, by GET or
indirectly via a variable (including INPUT1/2,
MOUSEX, MOUSEY)
Example of direct assignment: ASSNUM VAR05 852; sets the value
of VAR05 to be 852 decimal.
Example of indirect assignment: ASSVAR VAR08 INPUT2; sets the
value of VAR08 to be the current value of INP2.
Note, you must have executed an INP2; command
before the assignment command.
PLUS VAR04 VAR07; Adds the value of VAR07 to the value of
VAR04. The result is in VAR04, VAR07 is unchanged.
MINUS VAR01 VAR09; Value of VAR09 is subtracted from VAR01.
Result is in VAR01, VAR09 unchanged.
MULTIPLY VAR02 INPUT1; Value of VAR02 is multiplied by value of
INPUT1, result in VAR02, INPUT1 unchanged.
DIVIDE VAR04 VAR07; Value of VAR04 is divided by value of VAR07.
Result rounded to nearest integer and stored
in VAR04, VAR07 unchanged.
IFE VAR02 VAR06 NINE; If values in VAR02, VAR06 are equal, then
jump to label NINE. Variables unchanged.
IFG VAR05 VAR01 THREE; If value in VAR05 is greater than value of
VAR01 then jump to label THREE.
IFL VAR06 VAR10 SIX; If value of VAR06 is less than VAR10 then
jump to label SIX.
SHOW INPUT2; Displays the value of INPUT2 on screen.
Variables CORRECTX and CORRECTY can be used with plot relative as
'correction' moves with the command PR CORRECTX, CORRECTY; Note
single space preceeding CORRECT variables. You do not have to
use both correction variables PR 134, CORRECTY; is OK.
CORRECTX and CORRECTY are loaded by assignment from other
variables, not directly. Example: ASSVAR CORRECTX CHILD1;
ADOPT 'userfile.exe';
Allows the user to write any device handling
routine, or use a proprietory driver to run as a 'CHILD' process.
When the child completes, the Compucut program continues from the
next command. You can write the program in any language but it
must be compiled to an 'executable' (.EXE). It must open a data
file called CHILDFIL.DAT into which it writes the data to be
returned to your program. Close the file at the end of your
'child' routine. Even if there is no data to return, you must
open and close the CHILDFIL.DAT file. This means that
childfil.dat is to be treated as a temporary store, as it may be
overwritten on each ADOPT command. List the examples BRANCH.CON
as a program that 'adopts' service routines LOOP.EXE and
CHILD.EXE. Up to two numbers can be returned and they are given
the symbols CHILD1 and CHILD2. This facility allows standard
serial or parallel I/O port extenders to be used for any extra
INPUTS or OUTPUTS. An interesting possibility is to connect one
of the small multi-axis robot arms which are produced for the IT
educational market and use it as a auto gauging head or component
loading/unloading arm.
Example: ADOPT readcali.exe; If readcali.exe is your DOS driver
for your digital caliper with Statistical Process Control (SPC)
facility, then this could set the program variable CHILD1 to the
caliper reading and return to the program where the CHILD1
variable can be used to 'steer' the pro
gram flow.
DRILL is for deep drilling where it is necessary to withdraw
to clear swarf and introduce lubricant.
'DRILL, axis, direction, infeed rate, outfeed rate, depth, first
plunge, pecks;'
Example: DRILL,Y,R,20,4,2000,100,50;
Which means, Drill in Y-axis in reverse direction using an in
feed of 20mSecs per step and outfeed of 4mSecs per step. Total
drilled depth is 2000 units, first feed is 100 units, withdrawing
at each 50 units.
These new commands allow users to build things such as SPARK
ERODERs and DIGITISERs where the operating conditions can be
monitored by the program and the feed mechanism driven
accordingly. Different configurations can be tried for
digitising two and three dimensional models. INP1 and INP2 can
provide EIGHT 1-bit digital inputs which could be attached to the
users mechanical or electronic stylii.
The toolkit routine MICKEY.exe can be used to read the co-
ordinates of a serial mouse, to allow calibration of the XY
motions for different driver resolutions. Use AMOUSE/H to see
menu for the AMOUSE.COM driver. I use the high resolution
setting of /R9 which gives a smallest increment of 8 when viewed
in mickey, the Compucut MOUSE; command returns the 'mickey'
values divided by 8 in both MOUSEX and MOUSEY allowing
them to be tested as normal (consecutive) numbers. The MOUSE;
command can be made very useful by making a replacement encoding
wheel. Keep the slot widths exactly the same as the original but
increase the diameter to give say, 3 or 4 times the number of
slots.
In COMP3KEY 'F' mode (Feeds, where units are STEPS * SCAL):
FEEDSYS the auto feeding system also has these key assignments:
Keying the 'L' key to move the cutter LEFT (negative in X)
Keying the 'R' key to move the cutter RIGHT (positive in X)
Keying the 'F' key to move cutter FORWARDS (positive in Y)
Keying the 'B' key to move cutter BACKWARDS (negative in Y)
Keying the 'U' key to move cutter UP (negative in Z)
Keying the 'D' key to move cutter DOWN (positive in Z)
Keying the 'O' key to turn feed OFF
Key NUMPAD 8 for FORWARD 1 unit, NUMPAD 2 for BACK 1 unit
Key NUMPAD 6 for RIGHT 1 unit, NUMPAD 4 for LEFT 1 unit
Key F1 for DOWN 1 unit Key F2 for UP 1 unit
F3 / F4 for faster/slower Z-feed, F5 / F6 for faster/slower X-
feed, F7 / F8 faster/slower Y-feed. Key 'X' 'Y' 'Z' to ZERO X, Y
or Z readout.
F10 to Quit.
Note, You must turn one feed OFF before starting another,
the initial feed rate for each axis is that set in PARAM file.
In COMP3KEY 'D' mode (Jig drill, where units are STEPS * SCAL)
Key NUMPAD 8 for Y + 1 step, NUMPAD 2 for Y - 1 step
Key NUMPAD 6 for X + 1 step, NUMPAD 4 for X - 1 step
F1 for Z + 1 step, F2 for Z - 1 step.
F3 is RAPID +Z, F4 is RAPID -Z, F5 is RAPID +X, F6 is RAPID -X,
F7 is RAPID +Y, F8 is RAPID -Y. Each of the RAPID commands moves
GRID units, at speed set by FAST in PARAM file.
Drill feed rate faster/slower by NumPad +/- keys.
Press 'D' to execute ONE drill cycle of 'down STROKE units at
CUTZ feed rate followed by up STROKE units in FAST traverse.'
PgUp AND PgDn keys move UP and DOWN by 1 STROKE in STRAV.
For further info please visit our website at www.compucutters.com or email
us at compucutters@compuserve.com
Return to Previous page