CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI...

35
CNC Controller 2.01.02 Copyright © 1995, 1996 Microsystems of Buckhannon Inc. 14 East Lincoln Street, Buckhannon, WV 26201 (304)472-7206 Microsystems of Buckhannon Inc. makes no warranties, either expressed or implied, including any implied warranties of fitness for a specific purpose, for this software. This package is provided solely on an “as is” basis. All risk involved in the use of this software is the responsibility of the purchaser. Program errors, improper software configuration, hardware failures, or other problems can result in damage to the machinery being controlled. Failure of limit switches, cabling, or port components can result in machine movement past limits, potentially damaging the machine and endangering operators. It is imperative that a separate Emergency Stop system be in place which bypasses all computer control. Software features to abort motion from the keyboard and limit switch inputs are provided as conveniences only, and must not be relied upon to stop motion in an emergency. Microsystems of Buckhannon Inc. disclaims all liability for any and all damages, including incidental and consequential damages in connection with use of this software. The sole and exclusive liability of Microsystems of Buckhannon Inc. will be limited to the purchase price of this software package. If you do not understand and agree with these disclaimers, please do not use this product. Return all materials to the place of purchase for a full refund.

Transcript of CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI...

Page 1: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller 2.01.02

Copyright © 1995, 1996Microsystems of Buckhannon Inc.

14 East Lincoln Street, Buckhannon, WV 26201(304)472-7206

Microsystems of Buckhannon Inc. makes no warranties, either expressed or implied, including any impliedwarranties of fitness for a specific purpose, for this software. This package is provided solely on an “as is” basis.All risk involved in the use of this software is the responsibility of the purchaser.

Program errors, improper software configuration, hardware failures, or other problems can result in damage tothe machinery being controlled. Failure of limit switches, cabling, or port components can result in machinemovement past limits, potentially damaging the machine and endangering operators. It is imperative that aseparate Emergency Stop system be in place which bypasses all computer control. Software features to abortmotion from the keyboard and limit switch inputs are provided as conveniences only, and must not be relied uponto stop motion in an emergency.

Microsystems of Buckhannon Inc. disclaims all liability for any and all damages, including incidental andconsequential damages in connection with use of this software. The sole and exclusive liability of Microsystemsof Buckhannon Inc. will be limited to the purchase price of this software package.

If you do not understand and agree with these disclaimers, please do not use this product. Return all materials tothe place of purchase for a full refund.

Page 2: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Contents

Installation 1 - 1

Program Operation 2 - 1

Command Reference 3 - 1

System Configuration 4 - 1

Error Codes 5 - 1

Page 3: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Installation

Users Guide 1 - 1

CAUTION: DO NOT USE THIS SOFTWARE ON A COMPUTER CONNECTED TO A MACHINE UNLESSTHERE IS AN EMERGENCY STOP READILY AVAILABLE WHICH WILL INDEPENDENTLY STOP THEMACHINE.

Software features to abort moves from the keyboard and limit switch inputs cannot be relied upon in emergencysituations and are provided as conveniences only!

Requirements:

CNC Controller requires a PC compatible computer with 386 or faster processor, and a hard drive. A 486DX orPentium is recommended. Make sure your turbo button is on. Slower computers or turbo off will result inabnormal acceleration and other problems.

CNC Controller will not run from Windows 3.1. It may be run in MS-DOS mode from a Windows 95 machine.

Software Installation:

Insert the CNC Controller diskette into th floppy drive and type a:install (or b:install if installing from drive B)The install routine will create the directory c:\cnc if it does not exist and copy the necessary files into it. If there isa previous installation of CNC controller the file cnc2.exe will be overwritten, the cnc2.ini file will not be changed.

Plug the software key into one of the printer ports of the computer. Connect the cables from your motor driver tothe ports you use. One cable may be connected through the software key. The software will only run in demomode without the key.

Some Terminate and Stay Resident Programs (TSR’s) may interfere with program operation. Specifically othersoftware indexers and print spoolers should not be loaded while using CNC Controller. Check your config.sys fileand remove or “rem” any print spoolers or indexer TSR’s.

Run the program from the directory you created by going to the CNC directory (cd \cnc) and the typing “run” atthe C:\CNC> prompt.

If you add C:\CNC to the dos path then CNC Controller may be run from any directory. This can be useful if youwant to keep associated part files in their own directory and change to that directory before running CNCController. It is also necessary to have the CNC directory in the path to edit files from CNC Controller.

If you install CNC Controller into a directory other than C:\CNC then the “dir=” line in CNC2.INI must be changedto the new directory.

Program Configuration:

CNC2.INI is read on program startup. The default file is setup to work with minimal change for normalinstallations. To change configuration use a text editor to edit CNC2.INI. If your are running DOS verision 5 orlater use EDIT. If you use a word processor to change CNC2.INI make certain that you save as in ascii textformat.

Example: (using edit)

C:\> cd \cncC:\CNC> edit cnc2.ini

After editing type Alt-F Alt-S to save and Alt-F Alt-X to exit

Page 4: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Installation

Users Guide 1 - 2

CNC.INI Settings:

Many CNC.INI settings are similar except for the axis specifier or the port number etc. In this case the referencebelow will specify the parameter to be changed in <>. For example:

<axis>chan would be typed as xchan, ychan, zchan etc.

aux<#> would be typed as aux1, aux2, aux3, etc.

Axis and Port Settings:

CNC.INI Description

[Number of Axises]

axis=4 set number of axises from 2 to 6 (Level 1 is limited to 4 axis)

pulse_12=2 set pulse width for 0x278 port ( Value must be 1,2 or 3)

pulse_34=2 set pulse width for 0x378 port

pulse_56=2 set pulse width for 0x3BC port

stepdiv=4 pulse accuracy - use 4 for 486 and Pentiums - 2 or 0 for slower machines

Pulse widths vary with cpu speed. Approximate pulse widths for 486DX-66 are :

1 = 5 microseconds 2 = 10 microseconds 3 = 15 microseconds

Set Channels

[<axis> Axis]

<axis>chan=# # is channel 1 to 6

Each axis is assigned to a port channel. The channel setting assigns default control bits to the axis specified.Allowed axises are X,Y,Z,W,U, and V. Axises must be assigned in order. For example if you have a 3 axismachine X,Y, and Z must be used. Z may not be skipped.

Channels 1, 3, and 5 use the lower 4 bits of the port. Channels 2, 4, and 6 use the higher 4 bits.

Channels 1 and 2 refer to port 0x278

Channels 3 and 4 refer to port 0x378

Channels 5 and 6 refer to port 0x3BC

Set Directions

<axis>_dir_pos=0 The default for the direction setting is 1. If an axis moves

in the wrong direction, then add this line after the channel setting

otherwise leave this line out.

Set Resolution

<axis>res=#.# Set to the actual resolution in steps/unit. (ie. steps/inch)

Page 5: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Installation

Users Guide 1 - 3

Limit Switches:

The default channel settings will normally provide proper interfacing with the machine’s limit switches. Beforeatttempting to move the machine verify that all limit switches are functioning properly.

Limit switch status is displayed in the position window as “<“ and “>“ around the axis labels.

If no limit switches are closed the position display should show only “X”,”Y”,”Z”,”W”. “<“ in front of an axisindicates that the low limit switch for that axis is closed. “>“ after the axis label indicates that the high limit switchis closed.

First toggle your limit switches by hand. Verify that the appropriate limit display toggles. If it does not toggle thenyou need to adjust CNC2.INI. See the CNC2.INI reference section of the manual if the default settings areincorrect for your machine.

It is recommended that you verify limit switch operation at the beginning of each operating session.

Movement:

Do not attempt movement until the limit switches and displays toggle correctly. Once the limits are working try asmall move. If nothing moves, the wrong axis moves, or movement is in the wrong direction then adjustCNC2.INI.

Perhaps the easiest way to do preliminary testing of movement is with the Jog mode. Push F6 to select Jog .1”.Use the LEFT and RIGHT arrow keys to move X, the UP and DOWN arrows to move Y, the PAGEUP andPAGEDOWN keys to move Z and U, and the HOME and END keys to move W and V. The SCROLL LOCK keytoggles between ZW and UV. If the SCROLL LOCK light off Z or W will move. If the light is on U or V will move.Make certain that each axis moves in the proper direction. If it moves the wrong way the limit switch will not stopthe motion in the event the limit is hit, possibly resulting in damage to the machine.

Abort Cushions

lim_step=# Set # to number of steps to compress limits after switch hit

esc_step=# Set # to number of steps to move after Escape key pushed

Some machines may be damaged if stopped suddenly at higher speeds. Abort cushions provide a method ofdeceleratiing quickly but not instantly when a limit is hit or the escape button is pushed.

lim_step specifies the number of steps to continue after a limit is hit. This number must be calculated from thedistance your switches may be compressed without damage and the lowest axis resolution of your machine.

For instance if your X and Y resolution are 1018.592, your Z and W resolution are 2000 and your limit switchesmay be compressed .1” then you would set lim_step as follows:

lim_step=1018.592*.1=100 steps

esc_step may be set to any value that results in a quick stop without moving to far. 200 is suggested.

Page 6: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Installation

Users Guide 1 - 4

Initial Velocities:

Initial Velocities may be specified separately for the XY, Z, W, U, and V velocities. Note that X and Y velocitiesare always the same, so only X velocities should be specified.

Maximum, Feed, and Rapid Velocities may be specified for each axis. If you specify a maximum velocity thenthe axis velocity will be limited to that maximum.

Velocity Locks may be set for Rapid and Feed Velocities for each axis. Two types of Velocity Locks areavailable.

Velocity Lock=0 F# specifier on a Gcode line will change the default velocity.

Velocity Lock=1 F# will cause the current Gcode line to be run at the rate specified but

will not change the default velocity.

Velocity Lock=2 F# is ignored. The line is run at the default velocity.

It can be useful to use lock type 2 for rapid velocities. This will insure that rapid moves are always done atspeeds compaitble with your machine. However if and part programs use G0 moves while cutting (not arecommended practice) and specify lower speeds for G0 moves then rapid_lock=2 will result in bit breakage orworse.

<axis>max=# Maximum allowed velocity for axis

<axis>feed=# Initial feed velocity for axis

<axis>rapid=# Initial rapid velocity for axis

<axis>feed_lock Velocity Lock type (line may be ommited for type=0)

<axis>rapid_lock Velocity Lock type (line may be ommited for type=0)

Arc Feed rates may be set to Automatic Mode or set to an initial rate. In Automatic Mode arcs are run at thecurrent XY feed velocity unless the radius is too small to support that velocity, in which case the maximum arcvelocity is calculated based on the acceleration settings for the X and Y axises. Arc Feed rate may also belocked as above. Smoothest motion is usually obtained using Auto mode,

arcfeed=# 0 for Auto Mode or velocity desired

arc_feed_lock=# 0,1, or 2 as above

Page 7: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 1

CNC Controller has advanced features to provide the smoothest possible cuts. G-Code input is constantlybuffered to ‘vector match’ moves. This means it only slows down when it needs to and then only as much asneeded to stay within the acceleration parameters programmed. CNC Controller also does incrementalacceleration through arcs and matches arc tangential velocities with straight moves to provide smooth arcmoves. The result of these features is simply smoother cuts and less need for finish operations.CNC Controller has a user friendly interface that lets you take control of your machine providing featurespreviously only found on custom industrial controllers.

Run the program by typing ‘RUN’ from the CNC directory. Do not run from Microsoft Windows 3.1.Program options may be selected from the pull down menu using the mouse, alt + menukey,or function keys while the machine is stopped.

When the machine is moving only the ESC and SPACE keys are active.

Mode:

F1 Command Selects Command Mode. In Command Mode the controller looks for a file with the nameentered and runs it if found. Otherwise it trys to run the command entered as a Gcodecommand.

See Command Reference for codes supported.

SPACE will pause a running file. ESC will abort a running file.Pause and Abort features should not be used in place of a hardware Emergency Stop and must not be relied upon to stop the machine in an emergency

Restart If F1 is held down mode is changed to Restart.Restart is used to skip through a progam file and run from a specified line.

After a file name is entered the Skip To: prompt is displayed. Enter the line numberdesired and push ENTER to start the file.

If it is necessary to stop a file and restart:

Push Pause to stop the file.Note the program line number displayed.Push ESC to abort the run.Execute any commands needed.Move back to the start position for the previous run. (@START will work)Adjust the exact starting position if necessary and reset G92 if needed.Push and hold F1 for RestartEnter File Name and Skip To Line

Restart is not available in Level 1

Page 8: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 2

F2 Simulate Checks file name entered for syntax. Displays a simulation report if file iscompleted without error:Simulate is not available in CNC Level 1.

Simulation report displays:

Estimated run time Estimated time needed to run the simulated file.This feature may be disabled using from CNC.INIor the Settings Menu to speed up simulation on slower PC’s.

Start Axis positions and Workspace mode at start of program.End Axis positions and Workspace mode at end of program.Work Coord Min Minimum position reached for each axis expressed in

Workspace Coordinates. Displays in red if Boundaries wereexceeded.

Work Coord Max Maximum position reached for each axis expressed inWorkspace Coordinates. Displays in red if Boundaries wereexceeded.

Absolute Coord Min Minimum position reached for each axis expressed inAbsolute Coordinates. Displays in red if Soft Limits wereexceeded.

Absolute Coord Max Maximum position reached for each axis expressed inAbsolute Coordinates. Displays in red if Soft Limits wereexceeded.

F3 Edit Edit mode runs the MS-DOS editor. A file name may be entered or selected from theFile Finder. This feature is onlyavailable if CNC Controller is started by the RUN.BAT file.Edit Mode is not available in CNC Level 1.

Jog/Transit:

F4 Transit Select Transit Mode.In Transit Mode the machine moves continuously while a key is held down.When F4 is pushed transit speed is set to rapid.Holding F4 down will change transit speed to slow.You must allow room for deceleration after any key is released since the head will continue to move until it decelerates to a stop.If a limit switch is encountered or the Esc key is pushed the move will be stopped without deceleration.Soft Limits and Boundaries are not checked while in Transit Mode.Transit Mode is not available in CNC Level 1.

Machine may be transitted as follows:

Left/Right Arrows Move XUp/Down Arrows Move YPageUp/PageDown Move Z or U (based on current Scroll Lock)Home/End Move W or V (based on current Scroll Lock)Esc Abort Current Transit Move if Moving

F5 Jog .001 Sets Jog Distance. Machine may be jogged as follows:F6 Jog .01F7 Jog .1 Left/Right Arrows Move XF8 Jog 1 Up/Down Arrows Move Y

PageUp/PageDown Move Z or UHome/End Move W or VScroll Lock Toggle Between ZW and UV Jogs

Light Off For ZW On for UV

Page 9: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 3

Macro Keys

F9 4 custom macros may be assigned to function keys 9-11F10 Macros are assigned in CNC2.INI:F11F12 Example: f9=g90

f10=g91f11=g92.2z-.01f12=g92.2z.01

Settings:

Soft Limits Toggle Soft Limit Checking. Not Available in CNC Level 1.

Boundaries Toggle Boundary Checking. Not Available in CNC Level 1.

Default Limits Set Boundaries To CNC2.INI default values. Not Available in CNC Level 1.

Estimate Time Toggle cutting time calculation for Simulate Mode. Not Available in CNC Level 1.

Auto Simulate Toggle Auto SimulateAuto Simulate checks each file for syntax, soft limits, and boundaries before running.If there are errors the file is not run.Not Available in CNC Level 1.

Exit:

Exit Exit To Dos. Push <alt>X ENTER at any time to exit.

Other Keys:

A-Z 0-9 .- Type in the command or file name to be executed

TAB Repeat the last command or program entered

ENTER Execute current file or commandIf Enter is pushed from Command, Simulate, or Edit mode File Finder is loaded.File Finder allows individual file selection using mouse or keyboard.

Keys Active While Running:

ESC Aborts current move when running. NOT A SUBSTITUTE FOR EMERGENCY STOP!When ESC is pressed when the machine is moving it is likely that the displayedposition will no longer be precisely accurate since stepper motors will miss stepsif not decelerated properly. The machine should be homed again before proceeding.

SPACE Toggles Pause Mode when running. Push ENTER to continue. Go to Pause Modebefore aborting with ESC to avoid stalling stepper motors and to keep from jolting themachine.

Page 10: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 4

Homeing the Machine:

When CNC Controller is started the display is set to the last known position. If the machine has been movedmanually or can drift while powered down this position will not be accurate. The G28 command must be used tohome the machine. G28 moves the WZ motors up to the hi limits, then moves the XY motors to their low limits.The heads are then moved away from the limits by the values specified in CNC2.INI and each axis is set to zero.This position is Machine Zero.

It is important to use G28 to set Machine Zero since many CNC Controller features are calculated from thisposition. Soft Limits, Boundaries, @MZ, @LZ, and @RETRACT cannot be used if Machine Zero is not properlyset.

G28 will search for the limits at the G28_XYSRCH and G28_WZSRCH speed specified in CNC2.INI or at 50”per minute if search speeds are not specified. Increasing the search speeds may result in damage to yourmachine. The lim_step setting in CNC.INI can help minimize the impact to the machine when stopping at thelimit switches.

G28 can also be used to home only specified axis’s. (ie. G28Z homes only the Z axis)

Normal machine operation using CNC Controller would be to:

Start the programEnter G28. Push Enter (Machine Goes Home)Enter Name of Part Program To Be Cut

Alternately, you may write your own home program using the M28, M29, and L28 codes.M29 added to any G0 or G1 command will keep the program from aborting when a limit is hit. Instead the currentgcode line will be aborted but the next program line will be run normally. When a limit is hit the machine willdecelerate using the lim_step value in CNC.INI for limit cushions.

M28 is used to get an accurate measurement of limit switch position for the purposes of homeing the machine.M28 added to any G0 or G1 command will keep the program from aborting when a limit is hit. The limited axiswill stop moving, but other axises will continue movement until they hit a limit or finish their move. It isimperative that any line with M28 be run slowly since the limit cushions are not active and the head will stopimmediately, which can cause damage if running to fast.

L28 sets absolute position and is used to set the current position to the values specified. Use L28 only to setMachine Zero in your custom home program. Many commands use this absolute position as a reference formovement. Use G92 to set Local Machine Zeros for running parts programmed in G90 mode.

Sample Home File: (Homes the machine and leaves the head .1” from limits)

G91G1 Z20 W20 M29 F50G1 Z20 M29 F50G1 W20 M29 F50G1 X-200 Y-200 M29 F50G1 X-200 M29 F50G1 Y-200 M29 F50G0 X.5 Y.5 Z.-5 W.-5G1 X-1 Y-1 Z1 W1 F5 M28 F10G0 X.1 Y.1 Z-.1 W-.1L28 X0 Y0 Z0 W0

Page 11: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 5

Coordinate System:

The Machine Zero (MZ) set by homeing the machine becomes the anchor point for all positions specified insubsequent G Code commands.

The position display box displays the current axis coordinates and the axis coordinate modes. The axiscoordinate mode is displayed to the right of the axis position.

<blank> MZ Coordinates Values are relative to MZñ G92 Coordinates Valuse are relative to LZ specified by G92ò G55, G56, G57 Coords for XY XY values are offset for W,U, or V head

G43 Coords for WZUV ZWUV values are offset for M37 valuesô G92 and G55,G56, G57, G43 Values are offset for both

The coordinate modes show how the axis values in a given G code command will be interpreted.

G Code commands specify coordinates that specify either distances to be moved or positions to be moved to.

G91 Mode:

G91 mode is called relative or incremental mode. In G91 mode values specify distances. For instance if the Xposition is currently 20 and G0 X8 is specified the machine would move +8 inches in X to X28.

A G Code program written in G91 mode may be run from any position. Since the moves are relative, the startingposition does not matter, the program will run properly from any starting position. However to get the properresults the machine must be set to the proper position in relation to the workpiece before the piece is run.

The axis coordinate status does not have any effect on how the program runs. It does however effect thecoordinate display while the program runs.

G90 Mode:

G90 mode is called absolute mode. In G90 mode values specify positions. If the X position is 20 and G0 X8 isspecified the machine would move -12 inches in X to X8.

In G90 mode the situation is different. The initial position of the machine will not affect where the part runs sincethe first move will go to the absolute position specified on the table. Instead of setting the machine positionproperly before running, as for the G91 program, the machine coordinates must be set properly before running aG90 program.

The G92 commands are used to change the coordinate system so that any position may be temporarily made tobe Local Zero (LZ).

Page 12: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 6

G90 Mode (continued)

Most G90 programs are written relative to a starting position of X0Y0 with Z0W0 being either the bottom or top ofthe workpiece. All that is then necessary to run the program is to insure that the current LZ is set to match theprogram before running. There are several ways to do this.

The machine maybe positioned to the proper position and the G92 command used to set the proper coordinatesfor running.

For Example:

The workpiece is fixtured at X20Y20, is 1” thick and Z0 in the part file refers to the top of the workpiece:

G90 Commands in G90 ModeG92 Turn off any current G92’sG0Z2 Set Z 2” above the table - 1” above the workpieceG0X20Y20 Go to corner of workpieceG92X0Y0Z1 Set this position to be 1” above LZ

The coordinate display shows X 0.000 ñY 0.000 ñZ 1.000 ñ

Alternately LZ may be set by shifting MZ the desired amount using G92.1 Using G92.1 it is not necessary tomove to the workpiece first.

G90 Commands in G90 modeG92.1X20Y20Z1 Move LZ 20” in XY and 1” above the table

The coordinate display shows the current position relativeto the workpiece.

When writing a G Code program there must always be a starting point. Typically it would be the lower left corner(in XY) of the piece to be machined and either the upper or lower surface of the workpiece or a position a knowndistance above the workpiece (ZW). In a G91 mode program this point does not need to be given a coordinatevalue. In G90 mode this point is assigned a coordinate value (usually 0,0,0) and all positions are specifiedrelative to this starting point.

When running the program the machine is positioned to this starting point and G92 is used to set this position tothe start position for the program. Alternately G92.1 may be used to shift MZ

Page 13: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 7

Workspace:

G54 G55 G56 and G57 are used to shift the XY position so that the Z, W, U, or V heads may be used to cut agiven part. The distance from the Z head to each of the other heads must be measured and set in CNC2.INIbefore using the workspace commands.

For example:

The X distance from the Z head to the W head in X is +7.3” and there is no difference in Y

Enter G55=X7.3Y0 in CNC2.INI

Commanding G55 will then move X -7.3” resulting in the W head being at the same position as the Z headbefore the G55 command was given.

The G56 and G57 commands function in the same fashion for machines with more than 2 heads

Head Swap:

L12 provide a means of cutting with a head not specified within a program and of using multiple headssimultaneously.

For example:

L12WZ moves Z whenever W is specified and moves W when Z is specified.

L12 ZZ moves Z and W together whenever Z is specified.

L12 alone or L12ZW sets normal operation

Tool Length Offset

M37 is used to measure tool length and set ZWUV workspace.

By using M37 it is not necessary to measure tool length for every workpiece thickness change. Using M37 incombination with Soft Limits and Boundaries also provides a means of protecting then table from being routedaccidentally. After M37 is set G28 will set the ZW coordinates to the actual position of the tool tip above thetable.

For example:

Move the Z head tool tip to the table.Command M37 Z0

M37 turns on G43 mode, indicating that tool length offsets are active. Tool length offsets can be disabled usingG49 and re-enabled with G43 without re-measuring.

Page 14: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 8

Soft Limits and Boundaries

Soft Limits are used to keep programs and command from moving into the limit switches. Values must be set inCNC2.INI before using.

lolim=X#Y# distance from MZ to XY lo limit switches less .1”hilim=X#Y#Z#W# distance from MZ to XYZW hi limit switches less .1”

ZW lo limits should not be specified since desired positions vary with tool length.

lobound=X#Y#Z#W# distance from MZ to XY table edge and tophibound=X#Y# distance from MZ to XY table edge

ZW hi boundaries should not be specified since desired positions vary with tool length.

Soft Limits check absolute positions command against the limit switch positions. If a position is commanded thatwould result in a limit switch being hit an limit error will be displayed and the move will not be run.

Boundaries check workspace positions. In G54 mode the Z head will not be allowed to leave the table. In G55mode the Z head might move off the table but the W head will be kept on the table.

ZW lo boundary checking is available if M37 is used. Use M37 to set Z0W0 to the table top. Set ZW hi limits andlo boundaries are then both set to 0. This allows movement between the limits and the table.

Limits and Boundaries may be enabled or disabled in the Settings Menu and in CNC2.INI using softlim=0 or 1and boundary=0 or 1.

Auto Simulate

Auto Simulate checks every file before it is run to insure it is within Limits and Boundaries and that it has nosyntax errors. Using Auto Simulate eliminates Syntax Error, Boundary, and Soft Limit aborts while cutting.It also provides a line status display showing current line/total lines while the program is run.

Batch Mode:

A program file may be run automatically from the DOS prompt or a batch file by specifying:

cnc /r=<filename>

where <filename> is the name of the file to be cut. CAUTION!! The machine will start automaticallywhen batch mode is used. If the file is completed successfully the program will be exited at the endof the run, otherwise the error code which stopped the run will be displayed. If running from a batchfile, remember that the other batch file commands will run automatically when the program is manuallyexited.

It is recommended that you do not use batch mode.

Instead use the M98 subprogram call command. This command will let you run several programs from onefile. Using the M5 dwell without specifying a dwell you can pause the program and prompt the operator.These commands will allow all the functionality of batch mode without leaving the program.

Repeat Command:

The last command or file name entered may be repeated by pushing the TAB key.Then push ENTER to run the repeated command.

Page 15: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Program Operation

Users Guide 2 - 9

Keypad:

CNC Controller Level 3 and above includes a keypad to allow transit and jog of the machine from up to 20 feetfrom the computer. Plug the keypad into the COM2: port on your computer or change settings in CNC2.INI toselect another available com port.

Active keys on the keypad:

Abort Abort movePause Pause moveRpt Repeat Last Program

.001” Select Transit Mode

.01” Select Jog .01”

.1” Select Jog .1”1” Select Jog 1”

Trns Select Transit Mode

Left Arrow Move XRight ArrowUp Arrow Move YDown Arrow

PgUp Move Z or UPgDwn

Home Move W or VEnd

*3 Toggle Between ZW and UV mode

Page 16: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 1

Command Reference:

Parameters in [Brackets] are optional. Level 1 commands are available in all versions. Level 2 commands areavailable only in CNC Controller Level 2.

Values:

XYZWIJ Axis Specification Axis values are specified with decimal point.[X#] [Y#] [Z#] etc. A value with no decimal is read as an integer value.Level 1 No value is equivalent to specifying 0.

Example:XYZ is equivalent to X0Y0Z0.

F Feed Velocity Velocity is stored separately for Linear XY, Linear ZW. andF# Arc’s Rapid and Feed Velocity is stored separatelyLevel 1 for Linear Moves

Independent velocities are stored based on the XYZW specifiedin the line containing the F# command.

Velocity is specified in inches per minute.Example:

F60 sets XY Feed Velocity to 60.G1 X F60 sets XY Feed Velocity to 60.G0 X1 Y1 Z1 F60 sets XY and ZW Rapid Velocity to 60.G2 X2 F60 sets arc feed rate to 60.

Specifying F# alone on a line sets XY Feed Velocity

[ Comment Used to add comments to programs. A closing bracket isoptional. Example:

[This is a comment]G0 X10 Y10 [This is too]

G Codes:

G0 Rapid Move Moves to the position specified at Rapid velocity.G0 [X#] [Y#] [Z#] [W#] G0 is modal. After a G0 is executed lines with no gcodeLevel 1 command are executed as a G0.

Example:X1Y1 is equivalent to G0 X1Y1 if mode is G0

G1 Feed Move Moves to the position specified at Feed velocity.G1 [X#] [Y#] [Z#] [W#] G1 is modal. After a G1 is executed lines with no gcodeLevel 1 command are executed as a G1.

Example:X1Y1 is equivalent to G1 X1Y1 if mode is G1

G2 Clockwise Arc Moves to the position specified at Feed velocity.G2 [X#] [Y#] [I#] [J#] I is the X distance to the center point.Level 1 J is the Y distance to the center point.

If no XY move is specified a full circle is cut.If no I or J is specified previous I J values are kept.

...[Z#] [W#] Helical Interpolation is Supported in Level 2 Only

G3 Counter Clockwise Arc Moves to the position specified at Feed velocity.G3 [X#] [Y#] [I#] [J#] I is the X distance to the center point.Level 1 J is the Y distance to the center point.

If no XY move is specified a full circle is cut.If no I or J is specified previous I J values are kept.

...[Z#] [W#] Helical Interpolation is Supported in Level 2 Only

Page 17: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 2

G4 Dwell Stops movement for the time specified by the X value.G4 X# There is no limit to delay time.Level 2 If no time is specified then the machine will be stopped until the

operator pushes ENTER. Place a comment after the dwell toprompt the operator.Example:

G4 [Ready To Start Section 2]Never use Dwell to stop the machine while changing parts!Instead program a single part and use the TAB key at theProgram prompt. This will repeat the last part cut.

G28 Return to machine zero Moves specified Axis’s to Lo Limit for XY - Hi Limit for ZWG28 [X][Y][Z][W] Moves specified Axis’s to CNC2.INI specs from limits.Level 1 Sets all Axis positions to 0.

All Axis’s are moved if none are specified.

G43 Tool Length Offset On Sets tool length offsets to the values set by the last M37G43 [Z][W][U][V] command.Level 2 G43 alone turns all offsets on.

G49 Tool Length Offset Off Cancels tool length offsets.G49 [Z][W][U][V] G49 alone turns all offsets off.Level 2

G54 G54 Workspace Select the Z head. If G54 is commanded fromG55, G56, or G57 mode, the Z head will be moved to thecurrent XY position.

G55 G55 Workspace Select the W head. If G55 is commanded fromG54, G56, or G57 mode, the W head will be moved to thecurrent XY position.

G56 G56 Workspace Select the U head. If G56 is commanded fromG54, G55, or G57 mode, the U head will be moved to thecurrent XY position.

G57 G57 Workspace Select the V head. If G57 is commanded fromG54, G55, or G56 mode, the V head will be moved to thecurrent XY position.

G81 Drill Cycle Moves to XY specified at Rapid velocity.G81 [X#] [Y#] [Z#] [W#] Moves to ZW specified at Feed velocity.Level 2 Moves to original ZW at Rapid velocity

G90 Absolute Mode Can be specified with other gcodes on any line.G90 XYZW values from the current line forward are read asLevel 1 absolute coordinates.

IJ values are always relative to the current XY position,not absolute positions, regardless of G90/G91 mode.

G91 Relative Mode Can be specified with other gcodes on any line.G91 XYZW values from the current line forward are read asLevel 1 relative movements from the current position.

Page 18: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 3

G92 Set Local Coordinates Used to specify a new coordinate system for runningG92 [X#] [Y#] [Z#] [W#] absolute mode programs.Level 1 Use G92 alone to restore the Machine Coordinates.

Specifying ‘G92 X0 Y0 Z0 W0’ sets the current position tozero.

Specifying ‘G92’ then restores the positions to their currentMachine Coordinate values.

G92.1 Shift MZ Coordinates Similar to G92 except that the coordinate system produced G92.1 [X#] [Y#] [Z#] [W#] shifts Machine Zero by the amount specified.Level 2 This is useful since a given local coordinate system can be

set without positioning the head to a certain positionfirst.

Specifying ‘G92 X10 Y10’ sets the absolute position X10 Y10to X0 Y0 in local coordinates.

G92.1 may also be used to restore a single axis to absolutecoordinates. G92.1 X0 leaves YZW local coordinates butsets X back to absolute coordinates.

G92.2 Shift LZ Coordinates Similar to G92.1 except that the coordinate system shiftG92.2 [X#] [Y#] [Z#] [W#] is added to the current Local Coordinates insteadLevel 2 of replacing them.

This is useful for ‘jogging’ a local position. If the Z head hasbeen set for running a G90 mode file but then needs toset to cut .010” deeper G92.2Z-.01 will accomplish thiswith a single command.

Can be useful as a macro assigned to F9-F12.

Page 19: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 4

L Codes:

L0 Ignored Ignored commands are not executed but not flagged as errors.L1 IgnoredL4 IgnoredL5 Ignored

L6 Set Acceleration Set axis accelerations to values specified in min/sec/sec.L6 [X#] [Y#] [Z#] [W#] Accelerations are preset in CNC2.INI and may be changedLevel 1 using L1.

L7 Set Arc Feed Rate Set arc feed rate to value specified by X.L7 X# Set to 0 for Auto Arc Feed ModeLevel 1

L10 Cut Array Sets up array cutting. Repeats all code following until the endL10 [R#] [C#] [X#] [Y#] of the file or another L10 is reached.Level 2 Code following L10 is run until end of file or another L10.

Program pointer is moved back to initial L10.Head is moved to the next column or row specified by XY at Cycle repeats until all array points have been cut.L10 specified without RCXY values can be used to end an arraycut. Lines that follow will not be repeated.

L11 Set Axis Mapping Allows remapping of axis inputs. Specify the axis’s that shouldL11 [X][Y][Z][W] receive the input from XYZW in that order.Level 2 Specify L11 alone to return to normal parsing.

For example:L11 XYWZ swaps the W and Z axis.L11 XYZZ move Z and W together.

L12 Set Axis Mapping Allows remapping of axis inputs. Specify the axis’s that shouldL12 [Z][W] receive the input from ZW in that order. This command worksLevel 2 like L11 except that the XY inputs are skipped.

Specify L12 alone to return to normal parsing.For example:

L11 WZ swaps the W and Z axis.L11 ZZ move Z and W together.

L13 IgnoredL14 IgnoredL15 IgnoredL16 Ignored

L20 Disable Soft Limits Disable Soft Limit and Boundary CheckingL20 Soft limits and Boundaries are used to define a cutting areaLevel 2 which is checked during parsing of a file or command.

This effectively keeps the machine from moving out of adefined area. L20 disables Soft Limit and Boundary checking

L21 Enable Soft Limits Enable Soft Limit and Boundary CheckingL21 [X1,X2] L21 X1 enables Boundaries onlyLevel 2 L21 X2 enables Soft Lims only.

L21 alone enable both.

L22 Set Lo Boundaries Set Lo Boundaries to values specified. If no values are givenL22 [X#] [Y#] [Z#] [W#] then all Lo Boundaries are set to CNC2.INI defaults.Level 2

Page 20: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 5

L23 Set Hi Boundaries Set Hi Boundaries to values specified. If no values are givenL23 [X#] [Y#] [Z#] [W#] then all Hi Boundaries are set to CNC2.INI defaults.Level 2

L28 Set Position Sets Machine Coordinates. Machine Coordinates specify theL28 [X#] [Y#] [Z#] [W#] fixed machine zero point for your machine.Level 1 L28 is normally used only to write a custom homing

program. L28 does not move the machine, but setsthe current position to the values specified.

Use G92 to set a local coordinate system for running absolutemode programs from any table position.

L33 IgnoredL55 Ignored

L90 One Time Absolute L90 is used in a command to specify G90 coordinateson one line without changing program mode to G90.

L91 One Time Relative L91 is used in a command to specify G91 coordinateson one line without changing program mode to G91.

L92 Cancel G92 Restore The current G92 Local Coordinate system is saved everyL92 time a program is started or a sub-program is called usingLevel 1 M98. When the program is finished the original G92 Local

Coordinate system is restored.This is not desirable if the program is being used to preset a

system configuration for other programs.L92 causes the normal G92 Coordinate restore to be skipped

after the program containing the L92 is finished.

L100 Toggle G00/G01 Useful as a macro for F9-F11

L101 Toggle G90/G91 Useful as a macro for F9-F11.

Page 21: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 6

M Codes:

M1 Auxiliary Output Controls auxiliary outputs. If # is non-zero output is turned onM1 [X#][Y#][Z#][W#] otherwise output is turned off.Level 2 Port and bit addresses are setup in CNC2.INI.

X=aux1 Y=aux3 Z=aux5 W=aux7DO NOT USE Auxiliary Outputs To Start Cutting Spindles!

M2 Auxiliary Output Controls auxiliary outputs. If # is non-zero output is turned onM2 [X#][Y#][Z#][W#] otherwise output is turned off.Level 2 Port and bit addresses are setup in CNC2.INI.

X=aux2 Y=aux4 Z=aux6 W=aux8DO NOT USE Auxiliary Outputs To Start Cutting Spindles!

M3 Set Home Position Stores current position of each axis specified. Values specifiedM3 [X][Y][Z][W] are ignored.Level 2

M4 Return To Home Moves each axis specified to the last M3 position stored.M3 [X][Y][Z][W] Values specified are ignored.Level 2 Example:

M3 ZW Return Z and W axis to M3 position.

M5 Dwell Stops movement for the time specified by the X value.M5 X# There is no limit to delay time.Level 2 If no time is specified then the machine will be stopped until the

operator pushes ENTER. Place a comment after the dwell toprompt the operator.Example:

M5 [Ready To Start Section 2]Never use Dwell to stop the machine while changing parts!Instead program a single part and use the TAB key at theProgram prompt. This will repeat the last part cut.

M11 Auxiliary Output On Controls auxiliary outputs. Channel specified by # is turned on.M11 C# Port and bit addresses are setup in CNC2.INI.Level 2 DO NOT USE Auxiliary Outputs To Start Cutting Spindles!

M12 Auxiliary Output Off Controls auxiliary outputs. Channel specified by # is turned offM12 C# Port and bit addresses are setup in CNC2.INI.Level 2 DO NOT USE Auxiliary Outputs To Start Cutting Spindles!

M28 Disable Limit Abort M28 is used to write your own home program instead of usingG28 to home the machine. CNC Controller normally aborts aprogram when a limit switch is encountered. Adding M28 to aG0 or G1 command disables the program abort and insteadstops the limited axis while allowing other axis’s to continue.Limit Cushions are disabled while using M28 so any move donewith M28 should be done slowly to avoid machine damage.M28 must be specified on each line separately.

Page 22: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 7

M29 Disable Limit Abort M29 is used to write your own home program instead of usingG28 to home the machine. CNC Controller normally aborts aprogram when a limit switch is encountered. Adding M29 to aG0 or G1 command disables the program abort and insteadstops the current Gcode line but continues on the following line.M29 must be specified on each line separately.

M37 Measure Tool M37 is used to set Tool Length Offsets.M37 [Z#][W#][U#][V#] The end of the tool is first set to a known position.

M37 is then specified to set the tool length offset.

For example:Jog the Z head to the spoilboard.Enter M37Z0 to set the Z work coordinate to 0

Once Tool Length Offsets are set Boundaries may be used toinsure that the table is not routed by accident.

Normally zero values are set to the top of the spoilboard. UseG92 to set material thickness if programs reference zerofrom top of material. This eliminates re-measuring toolsfor different thickness materials.

G43 and G49 are used to enable and disable offsets.

M98 Subprogram Call Run a subprogram. A subprogram may be any gcode file.M98 <file name> Control is passed back to the calling program when finished.

To run a G90 mode subprogram from any position on the tableuse G92X#Y#Z#W# to set the local coordinates at thebeginning of the file.

Page 23: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Command Reference

User Guide 3- 8

@ Commands:

@MZ Go To Machine Zero Moves at Rapid Rate to Machine Zero set by G28 or L28Level 2 ZWUV moves to MZ position.

XY moves to MZ position.

@LZ Go To Local Zero Moves at Rapid Rate To Local Zero set by G92Level 2 ZWUV moves to MZ positions.

XY moves to LZ positions

@START GoTo Program Start Moves To Start Position of Last Program Run.@ST Level 2 ZWUV moves to MZ positions.

XY moves to Program StartZWUV moves to Program Start

@RETRACT Go To Retract Lifts heads to absolute zeros or to value specified@RT in CNC2.INI

Page 24: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller System Configuration

User Guide 4 - 1

CAUTION!!Make sure you have some idea of what your doing before changing CNC2.INI. All input and output is controlledby these settings. Improper settings will cause limit switches to not work, wrong axis movement in the wrongdirections, and / or other bad and potentially dangerous or damaging misoperation.

Please call for help instead of experimenting if you are not very familiar with motion control concepts andcomputer configuration.

Use a text editor (such as EDIT.COM) to edit CNC2.INI. Change values for parameters as specified below.CNC2.INI is read every time the program is started. Make sure the file gets saved as ASCII text (withoutformatting).

Axis:

axis number of axis’s on machinepulse_12 pulse width for port 0x278 1=short 2=medium 3=longpulse_34 pulse width for port 0x378pulse_56 pulse width for port 0x3BCstepdiv set pulse accuracy. use 4 for 486dx 66mhz and faster. 2 or 0 for slower cpu’s

Channel:

<axis>xchan port channel for axis = 1 to 6 where <axis> is x,y,z,w,u, or v<axis>_dir_pos value of dir_bit (0 or 1)

only needed if an axis runs backwards (set to 0 to change)<axis>res resolution for x axis (steps/unit)<axis>vchg maximum instantaneous velocity change (steps/sec)<axis>acc acceleration for axis (steps/sec/sec)

Limits: these settings are not needed unless your limit switches work backwardsplace after the <axis>chan setting if needed

<axis>_lo_val value of input bit which corresponds to limit ‘closed’ (0 or 1)toggle it if limit works but display is backwards

<axis>_hi_val value of input bit which corresponds to limit ‘closed’ (0 or 1)toggle it if limit works but display is backwards

Velocity:

<axis>max maximum axis velocity (units/minute) <axis>feed axis feed velocity for G1 (units/minute)

<axis>rapid axis rapid velocity for G0 (units/minute)<axis>feed_lock 0,1, or 2<axis>rapid_lock 0,1, or 2arcfeed arc feed rate for G2, G3 (0 = auto mode)arcfeed_lock 0,1, or 2secinch feedrate limit for seconds/inch

some nc drivers specify feedrates in inch/sec.this value sets a lower limit for entries of this type.for example if secinch=10 then entering f2 results infeedrate being set to 2 ips (120 ipm) but f11sets feedrate to 11 ipm. set to 0 to force all entries to ipmor to 1000 to force all entries to ips.

Page 25: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller System Configuration

User Guide 4 - 2

G28 Settings:

g28 x#y#z#w# machine zero distance from switches (units)set to 9999 for axis’s that should not be homed

g28_dist search distance to switchesg28_rele release distance after switch closureg28_xysrch velocity for xy axis search for switches (units/min)g28_zwsrch velocity for zwuv axis search for switches (units/min)g28_touch velocity for slow calibration (units/min)

Auxiliary Outputs:

aux<#>_port port number of auxoutput 1 - 8 (0 or 1)aux<#>_bit bit of port to control for aux output 1 - 8 (0-7)aux<#>_off value of bit when aux output is off (0 or 1)

Soft Limits:

lolim X#Y# lo limit valueshilim X#Y#Z#W# hi limit valueslobound X#Y#Z#W# lo boundary valueshibound X#Y# hi boundary valuessoftlim 0=disable 1=enable soft limit checkingboundary 0=disable 1=enable boundary checkingautosim 0=disable 1=enable auto simulate

Arc Settings:

arc_err value (in inches) of allowable errors in arc specifications.Default value is .01. If you get radius errors from your filesincrease in .002 steps. If errors persist the problem with larger valuesthe problem is probably in your program. Arc Radius errors indicate that the distancefrom the start point to the center point is not the same as the distance from the endpoint to the center point.

arc_min value (in inches) for smallest arc radius to be cut as an arc. Arcs with radius smallerthan this value will be cut as a G1 move. Default value is .002.

arc_tol value (in steps) for full circle. If the distance from the start point to the end point (in steps)is less than arc_tol then a full circle will be cut. default value is 3 steps.

Workspace:

g55 x#y# distances from Z head to W headg56 x#y# distances from Z head to U headg57 x#y# distances from Z head to V head

retract z#w#u#v# specify heads to retract with @ commands

Data Path:

dir program directory if \cncpath default data path for program files and wildcard for FileFinder

ie. path=c:\cnc\data\*.tap

Page 26: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller System Configuration

User Guide 4 - 3

KeyPad Settings:

key_port address of COM port for keypadkey_irq interrupt setting for keypad

COM1 is 0x3F8,irq=4COM2 is 0x2F8,irq=3 *defaultCOM3 is 0x3E8,irq=4COM4 is 0x2Ef8,irq=3

Ports Settings: These settings are only used for non lpt port installations

addr_0 base address of 1st portaddr_1 base address of 2nd portout_addr_0 base address of 1st port if not using printer cardsout_addr_1 base address of 2nd port if not using printer cardsin_addr_0 address of limit inputs for port 0 if not using printer cardsin_addr_1 address of limit inputs for port 1 if not using printer cards<axis>_port assigns x to port 0 or 1<axis>_lo_bit bit of in_addr for axis lo limit switch (0-7)<axis>_hi_bit bit of in_addr for axis hi limit switch (0-7)x_step_bit bit of out_addr to pulse to step the x motor. (0-7)x_dir_bit bit of out_addr to control direction for x motor (0-7)

Page 27: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Error Codes

User Guide 5- 1

Error Codes:

Line too long Input line more than 80 characters

Unsupported G Code G Code in input line which is not supported.

Unsupported L Code L Code in input line which is not supported or ignored.

Unsupported M Code M Code in input line which is not supported.

Multiple Commands Input Line contains more than 1 command.

Syntax Non-supported code entered

Target Error Indexer did not reach programmed point.Contact Microsystems.

Arc Radius Distance from startpoint to center is not equal to distance from endpoint to center. Arc Radius errors can occur from running a G2 or G3 intended for G91 mode in G90 mode and visa versa.

Soft Limit Exceeded Move specified would result in the head being movedoutside the soft limits.

Boundary Exceeded Move specified would result in the head being movedoutside the workspace boundaries.

Acceleration Out Of Bounds Acceleration Rate Too High For ResolutionMaximum acc*res in steps is 65535

Abort - Limit Limit switch encountered while running

Abort - Esc Escape button pushed while running

Page 28: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Error Codes

User Guide 5- 2

Page 29: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC Controller Version 2.01.23 CNC2.INI Changes

Port specifications:

The default port addresses for motion using lpt cards are:

Port 0 0x278Port 1 0x378Port 2 0x3BC

These may be changed using:

portout=#,address # is the port number (0,1, or 2)Address is the new base port address (ie. 0x300)

Portout is also used to specify additional ports which will be used for auxiliary outputs.Port #’s 4, 5, 6, 7 are available for additional auxiliary outputs. Note that port 3 cannot be used.

Portin is used to specify auxiliary input ports. Ports 4, 5, 6, and 7 are available for auxiliary inputs.

portin=#,address # is the port number (4,5,6, or 7)Address is the input port address

Axisspec may be used instead of the older Xchan, Xres, Xacc specs.

axisspec=c#p#s#d#r#a#e#o# c# specifies a channel number for the axisIf c# is used p# s# and d# must not be used

c1 is equivalent to p0 s0 d1c2 is equivalent to p0 s4 d5c3 is equivalent to p1 s0 d1c4 is equivalent to p1 s4 d5c5 is equivalent to p2 s0 d1c6 is equivalent to p2 s4 d5

p# specifies an output port # for the axis (0,1,or 2)s# specifies the bit for the step signal (0-7)d# specifies the bit for the direction signal (0-7)r# specifies the resolution in steps per incha# specifies the acceleration in inches/minute/seco1 changes the polarity of the direction signale1 sets the step signal for negative edge triggered drives

Axislo is used if the channel specs are not used in the preceding Axisspec or if the lo limit switchis non-standard for channel specs. Axislo is not needed if standard channel specs are used inpreceding Axisspec line.

axislo=p# b# o# p# specifies the input port for the limit switch (0-3)b# specifies the bit on the port (0-7)o# sets the switch polarity (0 or 1)

Page 30: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

Axishi is used if the channel specs are not used in the preceding Axisspec or if the hi limit switchis non-standard for channel specs. Axislo is not needed if standard channel specs are used inpreceding Axisspec line.

axislo=p# b# o# p# specifies the input port for the limit switchb# specifies the bit on the porto# sets the switch polarity (0 or 1)

Auxout is used to specify an auxiliary input

auxout=c#p#b#o#d# c# is the channel number (1 – 32)Channel numbers should not be skipped

p# is the port number and refers to a port specified in a portin specb# is the bit number (0 – 7)o# changes the output polarity when specified as o1

Auxin is used to specify an auxiliary input

auxin=c#p#b#o#d# c# is the channel number (1 – 32)Channel numbers should not be skipped

p# is the port number and refers to a port specified in a portin specb# is the bit number (0 – 7)o# changes the input polarity when specified as o1d# specifies debounce. When the input is a switch, debounce should

be used. d100 is a typical value.

Signal is used to setup control pushbuttons. First setup an auxin line for the input. Then specify signal as follows to use the input channel as a control signal.

Signal=c# t# c# specifies the input channel to be used for the signalt# specifies the signal type

t101 Pause/Continuet102 Pauset103 Continuet110 Start Cycle

Page 31: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

LPT Card Pinouts

Base Port (ie. 0x278) 8 outputs

Bit Pin on DB250 21 32 43 54 65 76 87 9

Base Port+1 (ie. 0x279) 4 inputs

Bit Pin on DB254 135 126 107 11

Base Port+2 (ie. 0x27a) 4 inputs or outputs

Bit Pin on DB250 11 142 163 17

Page 32: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

To add a start cycle switch to an older cnc2.ini:

Delete all the current aux lines

Add the following lines:

Portin=4,0x??? (this may be 0x279,0x379,0x3bd)

Auxin=c1p4b#o# (bit will be either 4,5,6, or 7 – see pinouts above)(o# will be 0 or 1)

Signal=c1 t110

The inputs will be displayed in the lower right hand window on cnc20123.exe

You will see a single grey dot. When you push the button the dot should get bigger and turn yellow.

If nothing happens the the bit or port setting is wrong, or the switch is not wired in.

If the dot starts yellow but turns grey when you push the button then change the o# in the auxin line

Page 33: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port
Page 34: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

CNC ControllerTool Length Measure

Requirements:

CNC Controller 2.01.13 or higher.

If you have an earlier version the newest exe file can be obtained at our ftp site:

ftp://ftp.msys.net/cnc

Select the beta directory and download the cnc20???.exe file.Copy this file to your \cnc directory and name it cnc2.exe

Level 3

If you have a Level 1 or Level 2 system contact Microsystems for an upgrade.

Switch Position

A single pole switch must be mounted on the table at a location that can be reached byeach spidle to be measured. The spindles must be able to be centered above the switchwithout x or y limit switches being contacted.

Switch Wiring

The switch should be wired in parallel with the lo limit switches for each axis to bemeasured. When wired properly each the lo limit for each measured axis will be ‘on’when the measure switch is depressed.

Configuration

Copy the included G37 files into the \cnc directory.

G28 the machine

Use commands or transit keys to center the z head above the measure switch

Record the displayed X and Y positions.

Edit the include file TM, changing the X and Y values to the above values. The TM filecan then be used to move the Z head to the measure switch.

Transit X and Y to a suitable position to measure the table or spoil board height. With abit in the Z head transit the head down so that the bit is on the table. Accuracy here iscritical.

Run the included file G37CAL. It will lift the Z head, move to the measure switch, lowerthe Z head until the switch closes, and pause. Record the Z value displayed. Push Enterto continue.

Page 35: CNC Controller 2.01 - engineering.purdue.edu Controller Installation Users Guide 1 - 2 CNC.INI Settings: Many CNC.INI settings are similar except for the axis specifier or the port

Edit the included files ZCAL and WCAL, changing the value on the M37 line to therecorded value.

Operation

Every time a bit is changed, type G37Z (for Z head) or G37W (for W head) to measurethe bit length.