NOO19 G91 G1 X#10011 F300
NOO21 G91 G1 Y#10012 F300
NOO23 G91 G1 Z#10013 F300
Tool changes are handled by a tool change script defined in the ToolChange.cfg file. This file should be edited in a standard Windows Text Editor. During a Tool Change, any valid GCode Block sequence can be executed. There are separate commands for picking up and putting back each tool so that each tool can be picked/placed at any location. If a tool is called for and there is not a valid tool section in the ToolChange.cfg file, then the last valid tool section defined will be executed.
Example of a basic tool change script for Tool 1.
PLACE0=M05 (Turn Off Spindle)
PLACE1=G4 P4 (Pause for Spindle wind down)
PLACE2=G0 Z0.5 (Raise Z above Zero)
PLACE3=G0 X7.000 Y4.770 (Move to a location for manual tool change)
PLACE4=M0 (Wait for user to change tool and continue)
PICKUP0=M03 (Turn on Spindle)
PICKUP1=G4 P3 (Wait for Spindle wind up)
Example of an advanced tool change script for Tool 1.
PLACE0=G49 (Turn Off TLO's)
PLACE1=M05 (Turn Off Spindle)
PLACE2=G4 P4 (Pause for Spindle wind down)
PLACE3=G0 Z-.5 (Place tool in tool Holder - multiple movements)
PLACE4=G0 X7.000 Y4.770 (Place tool in tool Holder - multiple movements)
PLACE5=G0 Z-1.960 (Place tool in tool Holder - multiple movements)
PLACE6=G0 X8.036 Y4.770 (Place tool in tool Holder - multiple movements)
PLACE7=G0 Z-.5 (Place tool in tool Holder - multiple movements)
PICKUP0=G49 (Turn Off TLO's)
PICKUP1=G0 Z-.5 (Pick Up tool from tool Holder - multiple movements)
PICKUP2=G0 X8.036 Y4.770 (Pick Up tool from tool Holder - multiple movements)
PICKUP3=G0 Z-1.960 (Pick Up tool from tool Holder - multiple movements)
PICKUP4=G0 X7.000 Y4.770 (Pick Up tool from tool Holder - multiple movements)
PICKUP5=G0 Z-.5 (Pick Up tool from tool Holder - multiple movements)
PICKUP6=M3 (Turn on Spindle)
PICKUP7=G4 P3 (Wait for Spindle wind up)
PICKUP8=G43 H1 (Use tool Length Offset for Tool 1)
Measuring and Using Tool Length Offsets
Tool Length Offsets (TLO's) are easily measured using the optional DeskCNC Digitizing Probe/Tool Sensor. There are several methods for machining with TLO's. Below lists just one method.
TLO's are measured using the M96 or M97 codes. M96 moves to the Tool Sensor Location defined in menu Setup - Machine Setup - Digitizing Probe. M97 does not move to location but rather moves directly 'down' to the tool sensor. M97 is used when the tool sensor is manually moved/placed under the tool for measurement. M96 is used when the tool sensor is semi-permanently mounted to a fixed location on the machines table.
1. If using M96, set the tool sensor location in menu Setup - Machine Setup - Tool Sensor - X/Y Location along with the Tool Sensor Height. The Sensor Height is relative for this method of calculating TLO's so it does not have to be entered exactly. Make certain that the Default Lim Polarity is set to Normally Closed when using the Digitizing Probe or Tool Sensor.
2. Tool Changes are executed using a Tx M6 combination. A tool needs to be loaded for the M96/M97 commands to function. Enter T1M6 in the MDI box and press Enter. The Tool 1 'Tool Change Script' will be executed (Tool Change Scripting). Tool 1 should now be in the Spindle.
3. Place the Tool Sensor under the tool and Enter M97 in the MDI box. TLO's are measured using the current feedrate. Enter a new feedrate (F) if warranted.
4. The Spindle will lower the Tool to the Sensor and record the TLO. The TLO will be active. The TLO for Tool 1 will NOT be saved in the Tool Library until you save the Tool Library from menu Setup - Tool Library - Save. You can measure all tools and then save the entire table.
5. Once a TLO has been measured, it will need to be active when machining. This is done with the G43 Hx command where x is the tool number. The G43 Hx may be placed in the Tool Change Script.
6. When the Spindle is Zeroed, the Active TLO is used.
Using TLO's when machining:
1. Place the first tool used in your GCode file in the Spindle. Do this be entering T1M6 (assumes Tool 1) in the MDI box. The tool change script for Tool 1 will be executed. The Tool Change Script should include the G43 H1 command to make the TLO for tool 1 active. The TLO readout in DeskCNC will display the current TLO.
2. Zero the tool to the part material. The Z Coordinate will reflect the active TLO.
3. Run the GCode file. All subsequent tool calls will place the tip of each tool at the proper Z Height according to their TLO.
Using the Homing Commands
Homing the machine can be carried out by using the G27, G28, or G30 Home Commands. Homing can also be executed through a Homing Script defined through menu - Setup - Machine Setup - Home. The Homing Script will execute any valid GCode Blocks when the Home Buttons are pressed. The Homing Script can perform a Hard Home (to physical Home Switches) or Soft Home (move to position) functions. Home Switches should be Normally Closed if used.
G27 - Verify Home:
G27 is used to verify table position and perform an Emergency Stop if table position tolerances are beyond specification. G27 will Home to a switch, record the switch location, and calculate the difference from this measured Home Location to the set Home Position. G27 should only be used after the machine has been Homed using G30. No Home Offset is performed during the G27 call.
Syntax of G27 is...
G27 X0.001 Y0.002 Z0.003 F10
Where the axis values define the acceptable tolerance for table position error. The example above will Home all 3 axes simultaneously to the Home Switches. G27 is only available when doing a Hard Home to physical switches. If an axis is not called out in the G27 command, then that axis is ignored during execution. For example, G27 X0.001 Z0.005 will only home/verify the XZ axes. The axis value defines the acceptable tolerance. In the example, the X axis tolerance is set to 0.001. If the table position is off be more than 0.001 then the G27 command will put the machine in E-Stop.
G28 - Soft Home:
G28 is used to move to a known location. The G28 position is set in the Work Coordinate Offset Table under menu Setup - Work Coordinate Offsets. G28 will simply move to this location.
G30 - Hard Home:
G30 is used to Home to physical Home Switches. G30 will Home to a switch, set the Home position, and then move to an Offset Location. If an axis is not called out in the G30 command, then that axis is ignored during execution. For example.
G30 X.5 Z.25 F20
will Home the X and Z axes simultaneously at a feedrate of 20. The position of the XZ coordinates will be set from values entered in menu Setup - Machine Setup - Axes Setup - Home Position. The axis values set the Home Offset. After the machine finds the Home Switches, the XZ axis will move to position 0.5 and 0.25 respectively.
Using the Homing Script:
Any valid GCode Block sequence can be executed when a Home Button is pressed. The Homing sequence is defined for each axis separately as well as for the 'All' button. Homing Scripts are defined in menu Setup - Machine Setup - Home. One example of Homing using the All button follows...
M5 (Turn Off Spindle)
G92.2 G54 (Zero Work Coordinate Offsets)
G30 X.5 F100 (Home the X Axis at a fast feedrate and offset by 0.5)
G30 X.5 F1 (Re-Home the X Axis at a slower feedrate and offset)
G30 Y.5 F100 (Home the Y Axis at a fast feedrate and offset by 0.5)
G30 Y.5 F1 (Re-Home the Y Axis at a slower feedrate and offset)
G30 Z.5 F100 (Home the Z Axis at a fast feedrate and offset by 0.5)
G30 Z.5 F1 (Re-Home the Z Axis at a slower feedrate and offset)
The probe is a 5 way normally closed contact switch. It is used to
record precision measurements from surfaces. Includes 2mm ( .079 in)
dia Ruby ball measuring tip for long and accurate life. Commonly scans
20,000 points per hour, with around 10,000,000 points between
Compatible with CNC controllers with a probe input capability. Works
with programs such as DeskCNC, TurboCNC, Mach2, EMC, MaxNC, and many others.
When used with DeskCNC controller and software, a surface scan is
automatically compensated for the probe tip radius, filtered to adjust
for the stepwise measurement methods, smoothed, and saved as an .STL CAD
file. The .STL Cad file can be opened in Cad programs for modification
and combination with other geometry. DeskCNC can directly input the
.stl file for remachining with user defined tools and machining
strategies. Most 3D CAM programs can create CNC programs from the
DeskCNC .stl files.
Includes flat base and stylus for use as an electronic Tool length
measurement device. Requires probe compatible software to collect