Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

canon.hh File Reference

#include <stdio.h>

Include dependency graph for canon.hh:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  CANON_VECTOR
struct  CANON_POSITION
struct  CANON_TOOL_TABLE

Defines

#define CANON_PLANE_XY   1
#define CANON_PLANE_YZ   2
#define CANON_PLANE_XZ   3
#define CANON_UNITS_INCHES   1
#define CANON_UNITS_MM   2
#define CANON_UNITS_CM   3
#define CANON_EXACT_STOP   1
#define CANON_EXACT_PATH   2
#define CANON_CONTINUOUS   3
#define CANON_SYNCHED   1
#define CANON_INDEPENDENT   2
#define CANON_STOPPED   1
#define CANON_CLOCKWISE   2
#define CANON_COUNTERCLOCKWISE   3
#define CANON_WORKPIECE   1
#define CANON_XYZ   2
#define CANON_SIDE_RIGHT   1
#define CANON_SIDE_LEFT   2
#define CANON_SIDE_OFF   3
#define CANON_AXIS_X   1
#define CANON_AXIS_Y   2
#define CANON_AXIS_Z   3
#define CANON_AXIS_A   4
#define CANON_AXIS_B   5
#define CANON_AXIS_C   6
#define CANON_TOOL_MAX   128
#define CANON_TOOL_ENTRY_LEN   256
#define PARAMETER_FILE_NAME_LENGTH   100

Typedefs

typedef int CANON_PLANE
 FILE. More...

typedef int CANON_UNITS
typedef int CANON_MOTION_MODE
typedef int CANON_SPEED_FEED_MODE
typedef int CANON_DIRECTION
typedef int CANON_FEED_REFERENCE
typedef int CANON_SIDE
typedef int CANON_AXIS

Functions

void INIT_CANON ()
void SET_ORIGIN_OFFSETS (double x, double y, double z)
void USE_LENGTH_UNITS (CANON_UNITS u)
void SELECT_PLANE (CANON_PLANE pl)
void SET_TRAVERSE_RATE (double rate)
void STRAIGHT_TRAVERSE (double x, double y, double z)
void SET_FEED_RATE (double rate)
void SET_FEED_REFERENCE (CANON_FEED_REFERENCE reference)
void SET_MOTION_CONTROL_MODE (CANON_MOTION_MODE mode)
void SET_CUTTER_RADIUS_COMPENSATION (double radius)
void START_CUTTER_RADIUS_COMPENSATION (int direction)
void STOP_CUTTER_RADIUS_COMPENSATION ()
void START_SPEED_FEED_SYNCH ()
void STOP_SPEED_FEED_SYNCH ()
void ARC_FEED (double first_end, double second_end, double first_axis, double second_axis, int rotation, double axis_end_point)
void STRAIGHT_FEED (double x, double y, double z)
void STRAIGHT_PROBE (double x, double y, double z)
void STOP ()
void DWELL (double seconds)
void SPINDLE_RETRACT_TRAVERSE ()
void START_SPINDLE_CLOCKWISE ()
void START_SPINDLE_COUNTERCLOCKWISE ()
void SET_SPINDLE_SPEED (double r)
void STOP_SPINDLE_TURNING ()
void SPINDLE_RETRACT ()
void ORIENT_SPINDLE (double orientation, CANON_DIRECTION direction)
void LOCK_SPINDLE_Z ()
void USE_SPINDLE_FORCE ()
void USE_NO_SPINDLE_FORCE ()
void USE_TOOL_LENGTH_OFFSET (double length)
void CHANGE_TOOL (int slot)
void SELECT_TOOL (int i)
void CLAMP_AXIS (CANON_AXIS axis)
void COMMENT (char *s)
void DISABLE_FEED_OVERRIDE ()
void ENABLE_FEED_OVERRIDE ()
void DISABLE_SPEED_OVERRIDE ()
void ENABLE_SPEED_OVERRIDE ()
void FLOOD_OFF ()
void FLOOD_ON ()
void MESSAGE (char *s)
void MIST_OFF ()
void MIST_ON ()
void PALLET_SHUTTLE ()
void TURN_PROBE_OFF ()
void TURN_PROBE_ON ()
void UNCLAMP_AXIS (CANON_AXIS axis)
void NURB_KNOT_VECTOR ()
void NURB_CONTROL_POINT (int i, double x, double y, double z, double w)
void NURB_FEED (double sStart, double sEnd)
void OPTIONAL_PROGRAM_STOP ()
void PROGRAM_END ()
void PROGRAM_STOP ()
double GET_EXTERNAL_FEED_RATE ()
 Returns the system feed rate. More...

int GET_EXTERNAL_FLOOD ()
 Returns the system value for flood coolant, zero = off, non-zero = on. More...

CANON_UNITS GET_EXTERNAL_LENGTH_UNIT_TYPE ()
 Returns the system length unit type. More...

int GET_EXTERNAL_MIST ()
 Returns the system value for mist coolant, zero = off, non-zero = on. More...

CANON_MOTION_MODE GET_EXTERNAL_MOTION_CONTROL_MODE ()
 Returns the current motion control mode. More...

void GET_EXTERNAL_PARAMETER_FILE_NAME (char *filename, int max_size)
 returns nothing but copies the name of the parameter file into the filename array, stopping at max_size if the name is longer An empty string may be placed in filename. More...

CANON_PLANE GET_EXTERNAL_PLANE ()
 returns the currently active plane. More...

double GET_EXTERNAL_POSITION_X ()
 returns the current x-axis position. More...

double GET_EXTERNAL_POSITION_Y ()
 returns the current y-axis position. More...

double GET_EXTERNAL_POSITION_Z ()
 returns the current z-axis position. More...

double GET_EXTERNAL_PROBE_POSITION_X ()
 Returns the machine X-axis position at the last probe trip. More...

double GET_EXTERNAL_PROBE_POSITION_Y ()
 Returns the machine Y-axis position at the last probe trip. More...

double GET_EXTERNAL_PROBE_POSITION_Z ()
 Returns the machine Z-axis position at the last probe trip. More...

double GET_EXTERNAL_PROBE_VALUE ()
 Returns the value for any analog non-contact probing. More...

int GET_EXTERNAL_QUEUE_EMPTY ()
 Returns zero if queue is not empty, non-zero if the queue is empty This always returns a valid value. More...

double GET_EXTERNAL_SPEED ()
 Returns the system value for spindle speed in rpm. More...

CANON_DIRECTION GET_EXTERNAL_SPINDLE ()
 Returns the system value for direction of spindle turning. More...

double GET_EXTERNAL_TOOL_LENGTH_OFFSET ()
 returns current tool length offset. More...

int GET_EXTERNAL_TOOL_MAX ()
 Returns number of slots in carousel. More...

int GET_EXTERNAL_TOOL_SLOT ()
 Returns the system value for the carousel slot in which the tool currently in the spindle belongs. Return value zero means there is no tool in the spindle. More...

CANON_TOOL_TABLE GET_EXTERNAL_TOOL_TABLE (int pocket)
 Returns the CANON_TOOL_TABLE structure associated with the tool in the given pocket. More...

double GET_EXTERNAL_TRAVERSE_RATE ()
 Returns the system traverse rate. More...


Variables

FILE * _outfile = NULL
CANON_TOOL_TABLE _tools []
int _tool_max
char _parameter_file_name []


Define Documentation

#define CANON_PLANE_XY   1
 

Definition at line 28 of file canon.hh.

Referenced by ARC_FEED(), convert_arc(), convert_cutter_compensation_on(), convert_cycle(), convert_cycle_xy(), convert_set_plane(), convert_stop(), cycle_feed(), cycle_traverse(), SELECT_PLANE(), and write_g_codes().

#define CANON_PLANE_YZ   2
 

Definition at line 29 of file canon.hh.

Referenced by ARC_FEED(), convert_arc(), convert_cycle(), convert_cycle_yz(), convert_set_plane(), cycle_feed(), cycle_traverse(), and SELECT_PLANE().

#define CANON_PLANE_XZ   3
 

Definition at line 30 of file canon.hh.

Referenced by convert_arc(), convert_cycle(), convert_cycle_zx(), convert_set_plane(), SELECT_PLANE(), and write_g_codes().

#define CANON_UNITS_INCHES   1
 

Definition at line 33 of file canon.hh.

Referenced by convert_arc2(), convert_arc_comp1(), convert_arc_comp2(), convert_length_units(), USE_LENGTH_UNITS(), and write_g_codes().

#define CANON_UNITS_MM   2
 

Definition at line 34 of file canon.hh.

Referenced by convert_cycle_g83(), convert_length_units(), convert_probe(), STRAIGHT_PROBE(), and USE_LENGTH_UNITS().

#define CANON_UNITS_CM   3
 

Definition at line 35 of file canon.hh.

#define CANON_EXACT_STOP   1
 

Definition at line 38 of file canon.hh.

Referenced by convert_control_mode(), and SET_MOTION_CONTROL_MODE().

#define CANON_EXACT_PATH   2
 

Definition at line 39 of file canon.hh.

Referenced by convert_control_mode(), convert_cycle_xy(), convert_cycle_yz(), convert_cycle_zx(), SET_MOTION_CONTROL_MODE(), and write_g_codes().

#define CANON_CONTINUOUS   3
 

Definition at line 40 of file canon.hh.

Referenced by convert_control_mode(), SET_MOTION_CONTROL_MODE(), and write_g_codes().

#define CANON_SYNCHED   1
 

Definition at line 43 of file canon.hh.

Referenced by convert_cycle_g84().

#define CANON_INDEPENDENT   2
 

Definition at line 44 of file canon.hh.

Referenced by rs274ngc_init().

#define CANON_STOPPED   1
 

Definition at line 47 of file canon.hh.

Referenced by convert_m(), convert_stop(), convert_tool_change(), START_SPINDLE_CLOCKWISE(), START_SPINDLE_COUNTERCLOCKWISE(), STOP_SPINDLE_TURNING(), and write_m_codes().

#define CANON_CLOCKWISE   2
 

Definition at line 48 of file canon.hh.

Referenced by convert_cycle_g84(), convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), convert_m(), ORIENT_SPINDLE(), START_SPINDLE_CLOCKWISE(), and write_m_codes().

#define CANON_COUNTERCLOCKWISE   3
 

Definition at line 49 of file canon.hh.

Referenced by convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), convert_m(), and START_SPINDLE_COUNTERCLOCKWISE().

#define CANON_WORKPIECE   1
 

Definition at line 52 of file canon.hh.

Referenced by SET_FEED_REFERENCE().

#define CANON_XYZ   2
 

Definition at line 53 of file canon.hh.

Referenced by rs274ngc_init().

#define CANON_SIDE_RIGHT   1
 

Definition at line 56 of file canon.hh.

Referenced by START_CUTTER_RADIUS_COMPENSATION().

#define CANON_SIDE_LEFT   2
 

Definition at line 57 of file canon.hh.

Referenced by START_CUTTER_RADIUS_COMPENSATION().

#define CANON_SIDE_OFF   3
 

Definition at line 58 of file canon.hh.

#define CANON_AXIS_X   1
 

Definition at line 61 of file canon.hh.

Referenced by CLAMP_AXIS(), and UNCLAMP_AXIS().

#define CANON_AXIS_Y   2
 

Definition at line 62 of file canon.hh.

Referenced by CLAMP_AXIS(), and UNCLAMP_AXIS().

#define CANON_AXIS_Z   3
 

Definition at line 63 of file canon.hh.

Referenced by CLAMP_AXIS(), and UNCLAMP_AXIS().

#define CANON_AXIS_A   4
 

Definition at line 64 of file canon.hh.

Referenced by CLAMP_AXIS(), and UNCLAMP_AXIS().

#define CANON_AXIS_B   5
 

Definition at line 65 of file canon.hh.

Referenced by UNCLAMP_AXIS().

#define CANON_AXIS_C   6
 

Definition at line 66 of file canon.hh.

Referenced by CLAMP_AXIS(), and UNCLAMP_AXIS().

#define CANON_TOOL_MAX   128
 

Tools are numbered 1..CANON_TOOL_MAX, with tool 0 meaning no tool.

Definition at line 128 of file canon.hh.

Referenced by rs274ngc_load_tool_table().

#define CANON_TOOL_ENTRY_LEN   256
 

Definition at line 129 of file canon.hh.

#define PARAMETER_FILE_NAME_LENGTH   100
 

in canon.cc

Definition at line 811 of file canon.hh.

Referenced by designate_parameter_file().


Typedef Documentation

typedef int CANON_PLANE
 

FILE.

canon.hh

This is the header file that all applications that use the canonical commands for three- to six-axis machining should include.

Three mutually orthogonal (in a right-handed system) X, Y, and Z axes are always present. In addition, there may be zero to three rotational axes: A (parallel to the X-axis), B (parallel to the Y-axis), and C (parallel to the Z-axis).

In the functions that use rotational axes, the axis value is that of a wrapped linear axis, in degrees.

It is assumed in these activities that the spindle tip is always at some location called the "current location," and the controller always knows where that is. It is also assumed that there is always a "selected plane" which must be the XY-plane, the YZ-plane, or the ZX-plane of the machine.

Definition at line 27 of file canon.hh.

Referenced by convert_cycle(), convert_cycle_g81(), convert_cycle_g82(), convert_cycle_g83(), convert_cycle_g84(), convert_cycle_g85(), convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), convert_cycle_g89(), convert_cycle_xy(), convert_cycle_yz(), convert_cycle_zx(), cycle_feed(), cycle_traverse(), GET_EXTERNAL_PLANE(), MIST_OFF(), and SELECT_PLANE().

typedef int CANON_UNITS
 

Definition at line 32 of file canon.hh.

Referenced by CLAMP_AXIS(), GET_EXTERNAL_LENGTH_UNIT_TYPE(), and USE_LENGTH_UNITS().

typedef int CANON_MOTION_MODE
 

Definition at line 37 of file canon.hh.

Referenced by COMMENT(), convert_cycle_xy(), convert_cycle_yz(), convert_cycle_zx(), GET_EXTERNAL_MOTION_CONTROL_MODE(), SET_MOTION_CONTROL_MODE(), and STRAIGHT_TRAVERSE().

typedef int CANON_SPEED_FEED_MODE
 

Definition at line 42 of file canon.hh.

Referenced by convert_cycle_g84().

typedef int CANON_DIRECTION
 

Definition at line 46 of file canon.hh.

Referenced by convert_cycle_g84(), convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), GET_EXTERNAL_FEED_RATE(), GET_EXTERNAL_SPINDLE(), ORIENT_SPINDLE(), and STRAIGHT_PROBE().

typedef int CANON_FEED_REFERENCE
 

Definition at line 51 of file canon.hh.

Referenced by SET_FEED_REFERENCE(), and USE_LENGTH_UNITS().

typedef int CANON_SIDE
 

Definition at line 55 of file canon.hh.

typedef int CANON_AXIS
 

Definition at line 60 of file canon.hh.

Referenced by CLAMP_AXIS(), DWELL(), STRAIGHT_PROBE(), and UNCLAMP_AXIS().


Function Documentation

void INIT_CANON  
 

reads world model data into the canonical interface

Definition at line 716 of file canon_pre.cc.

Referenced by rs274ngc_init().

void SET_ORIGIN_OFFSETS double    x,
double    y,
double    z
 

Representation

Definition at line 187 of file canon_pre.cc.

void USE_LENGTH_UNITS CANON_UNITS    in_unit
 

Offset the origin to the point with absolute coordinates x, y, z, a, b, and c. Values of x, y, z, a, b, and c are real numbers. The units are whatever length units are being used at the time this command is given.

Definition at line 250 of file canon_pre.cc.

References CANON_FEED_REFERENCE.

void SELECT_PLANE CANON_PLANE    in_plane
 

Use the specified units for length. Conceptually, the units must be either inches or millimeters.

Definition at line 377 of file canon_pre.cc.

void SET_TRAVERSE_RATE double    rate
 

Free Space Motion

Definition at line 287 of file canon_pre.cc.

void STRAIGHT_TRAVERSE double    x,
double    y,
double    z
 

Set the traverse rate that will be used when the spindle traverses. It is expected that no cutting will occur while a traverse move is being made.

Definition at line 293 of file canon_pre.cc.

References CANON_MOTION_MODE.

void SET_FEED_RATE double    rate
 

Machining Attributes

Definition at line 344 of file canon_pre.cc.

void SET_FEED_REFERENCE CANON_FEED_REFERENCE    reference
 

SET_FEED_RATE sets the feed rate that will be used when the spindle is told to move at the currently set feed rate. The rate is either: 1. the rate of motion of the tool tip in the workpiece coordinate system, which is used when the feed_reference mode is "CANON_WORKPIECE", or 2. the rate of motion of the tool tip in the XYZ axis system, ignoring motion of other axes, which is used when the feed_reference mode is "CANON_XYZ".

The units of the rate are:

1. If the feed_reference mode is CANON_WORKPIECE: length units (inches or millimeters according to the setting of CANON_UNITS) per minute along the programmed path as seen by the workpiece.

2. If the feed_reference mode is CANON_XYZ: A. For motion including one rotational axis only: degrees per minute. B. For motion including two rotational axes only: degrees per minute In this case, the rate applies to the axis with the larger angle to cover, and the second rotational axis rotates so that it has always completed the same proportion of its required motion as has the rotational axis to which the feed rate applies. C. For motion involving one or more of the XYZ axes (with or without simultaneous rotational axis motion): length units (inches or millimeters according to the setting of CANON_UNITS) per minute along the programmed XYZ path.

Definition at line 350 of file canon_pre.cc.

void SET_MOTION_CONTROL_MODE CANON_MOTION_MODE    mode
 

This sets the feed_reference mode to either CANON_WORKPIECE or CANON_XYZ.

The CANON_WORKPIECE mode is more natural and general, since the rate at which the tool passes through the material must be controlled for safe and effective machining. For machines with more than the three standard XYZ axes, however, computing the feed rate may be time-consuming because the trajectories that result from motion in four or more axes may be complex. Computation of path lengths when only XYZ motion is considered is quite simple for the two standard motion types (straight lines and helical arcs).

Some programming languages (rs274kt, in particular) use CANON_XYZ mode. In these languages, the task of dealing with the rate at which the tool tip passes through material is pushed back on the NC-program generator, where the computation of path lengths is (almost always in 1995) an off-line activity where speed of calculation is not critical.

In CANON_WORKPIECE mode, some motions cannot be carried out as fast as the programmed feed rate would require because axis motions tend to cancel each other. For example, an arc in the YZ-plane can exactly cancel a rotation around the A-axis, so that the location of the tool tip with respect to the workpiece does not change at all during the motion; in this case, the motion should take no time, which is impossible at any finite rate of axis motion. In such cases, the axes should be moved as fast as possible consistent with accurate machining.

It would be possible to omit the SET_FEED_REFERENCE command from the canonical commands and operate always in one mode or the other, letting the interpreter issue SET_FEED_RATE commands, if necessary to compensate if the NC language being interpreted used the other mode.

This would create two disadvantages when the feed_reference mode assumed by the canonical commands differed from that assumed by the NC language being interpreted:

1. The output code could have a lot of SET_FEED_RATE commands not found in the input code; this is a relatively minor consideration.

2. If the interpreter reads a program in language which uses the CANON_XYZ mode and writes canonical commands in the CANON_WORKPIECE mode, both the interpreter and the executor of the output canonical commands would have to perform a lot of complex calculations. With the SET_FEED_REFERENCE command available, both do only simple calculations for the same motions.

Definition at line 356 of file canon_pre.cc.

void SET_CUTTER_RADIUS_COMPENSATION double    radius
 

This sets the motion control mode to one of: CANON_EXACT_STOP, CANON_EXACT_PATH, or CANON_CONTINUOUS.

Definition at line 386 of file canon_pre.cc.

void START_CUTTER_RADIUS_COMPENSATION int    side
 

Set the radius to use when performing cutter radius compensation.

Definition at line 389 of file canon_pre.cc.

void STOP_CUTTER_RADIUS_COMPENSATION  
 

Conceptually, the direction must be left (meaning the cutter stays to the left of the programmed path) or right.

Definition at line 395 of file canon_pre.cc.

void START_SPEED_FEED_SYNCH  
 

Do not apply cutter radius compensation when executing spindle translation commands.

Definition at line 398 of file canon_pre.cc.

Referenced by convert_cycle_g84().

void STOP_SPEED_FEED_SYNCH  
 

Definition at line 401 of file canon_pre.cc.

Referenced by convert_cycle_g84().

void ARC_FEED double    first_end,
double    second_end,
double    first_axis,
double    second_axis,
int    rotation,
double    axis_end_point
 

Machining Functions

Definition at line 406 of file canon_pre.cc.

void STRAIGHT_FEED double    x,
double    y,
double    z
 

if (_active_plane IS CANON_PLANE_XZ)

Definition at line 473 of file canon_pre.cc.

void STRAIGHT_PROBE double    x,
double    y,
double    z
 

This models backing the probe off 0.01 inch or 0.254 mm from the probe point towards the previous location after the probing, if the probe point is not the same as the previous point -- which it should not be.

Definition at line 528 of file canon_pre.cc.

References CANON_AXIS, and CANON_DIRECTION.

void STOP  
 

Perform a probing operation. This is a temporary addition to the canonical machining functions and its semantics are not defined. When the operation is finished, all axes should be back where they started.

void DWELL double    seconds
 

void PARAMETRIC_2D_CURVE_FEED(FunctionPtr f1, FunctionPtr f2, double start_parameter_value, double end_parameter_value) {}

void PARAMETRIC_3D_CURVE_FEED(FunctionPtr xfcn, FunctionPtr yfcn, FunctionPtr zfcn, double start_parameter_value, double end_parameter_value) {}

Definition at line 619 of file canon_pre.cc.

References CANON_AXIS.

void SPINDLE_RETRACT_TRAVERSE  
 

Spindle Functions

Definition at line 623 of file canon_pre.cc.

void START_SPINDLE_CLOCKWISE  
 

Retract the spindle at traverse rate to the fully retracted position.

Definition at line 626 of file canon_pre.cc.

Referenced by convert_cycle_g84(), convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), and convert_m().

void START_SPINDLE_COUNTERCLOCKWISE  
 

Turn the spindle clockwise at the currently set speed rate. If the spindle is already turning that way, this command has no effect.

Definition at line 633 of file canon_pre.cc.

Referenced by convert_cycle_g84(), convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), and convert_m().

void SET_SPINDLE_SPEED double    rpm
 

Turn the spindle counterclockwise at the currently set speed rate. If the spindle is already turning that way, this command has no effect.

Definition at line 640 of file canon_pre.cc.

void STOP_SPINDLE_TURNING  
 

Set the spindle speed that will be used when the spindle is turning. This is usually given in rpm and refers to the rate of spindle rotation. If the spindle is already turning and is at a different speed, change to the speed given with this command.

Definition at line 646 of file canon_pre.cc.

Referenced by convert_cycle_g84(), convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), convert_m(), and convert_stop().

void SPINDLE_RETRACT  
 

Stop the spindle from turning. If the spindle is already stopped, this command may be given, but it will have no effect.

Definition at line 652 of file canon_pre.cc.

void ORIENT_SPINDLE double    orientation,
CANON_DIRECTION    direction
 

Definition at line 655 of file canon_pre.cc.

void LOCK_SPINDLE_Z  
 

void USE_SPINDLE_FORCE  
 

void USE_NO_SPINDLE_FORCE  
 

Definition at line 661 of file canon_pre.cc.

void USE_TOOL_LENGTH_OFFSET double    length
 

Tool Functions

Definition at line 666 of file canon_pre.cc.

void CHANGE_TOOL int    slot
 

Definition at line 669 of file canon_pre.cc.

void SELECT_TOOL int    slot
 

It is assumed that each cutting tool in the machine is assigned to a slot (intended to correspond to a slot number in a tool carousel). This command results in the tool currently in the spindle (if any) being returned to its slot, and the tool from the slot designated by slot_number (if any) being inserted in the spindle.

If there is no tool in the slot designated by the slot argument, there will be no tool in the spindle after this command is executed and no error condition will result in the controller. Similarly, if there is no tool in the spindle when this command is given, no tool will be returned to the carousel and no error condition will result in the controller, whether or not a tool was previously selected in the program.

It is expected that when the machine tool controller is initialized, the designated slot for a tool already in the spindle will be established. This may be done in any manner deemed fit, including (for, example) recording that information in a persistent, crash-proof location so it is always available from the last time the machine was run, or having the operator enter it. It is expected that the machine tool controller will remember that information as long as it is not re-initialized; in particular, it will be remembered between programs.

For the purposes of this command, the tool includes the tool holder.

For machines which can carry out a select_tool command separately from a change_tool command, the select_tool command must have been given before the change_tool command, and the value of slot must be the slot number of the selected tool.

Definition at line 675 of file canon_pre.cc.

void CLAMP_AXIS CANON_AXIS    axis
 

Misc Functions

Definition at line 681 of file canon_pre.cc.

References CANON_UNITS.

void COMMENT char *    s
 

Clamp the given axis. If the machining center does not have a clamp for that axis, this command should result in an error condition in the controller.

An attempt to move an axis while it is clamped should result in an error condition in the controller.

Definition at line 689 of file canon_pre.cc.

References CANON_MOTION_MODE.

void DISABLE_FEED_OVERRIDE  
 

This function has no physical effect. If commands are being printed or logged, the comment command is printed or logged, including the string which is the value of comment_text. This serves to allow formal comments at specific locations in programs or command files.

Definition at line 692 of file canon_pre.cc.

Referenced by convert_m().

void ENABLE_FEED_OVERRIDE  
 

Definition at line 698 of file canon_pre.cc.

Referenced by convert_m(), and convert_stop().

void DISABLE_SPEED_OVERRIDE  
 

Definition at line 695 of file canon_pre.cc.

Referenced by convert_m().

void ENABLE_SPEED_OVERRIDE  
 

Definition at line 701 of file canon_pre.cc.

Referenced by convert_m(), and convert_stop().

void FLOOD_OFF  
 

Definition at line 704 of file canon_pre.cc.

Referenced by convert_m(), and convert_stop().

void FLOOD_ON  
 

Turn flood coolant off.

Definition at line 710 of file canon_pre.cc.

Referenced by convert_m().

void MESSAGE char *    s
 

Turn flood coolant on.

Definition at line 720 of file canon_pre.cc.

void MIST_OFF  
 

Definition at line 723 of file canon_pre.cc.

References CANON_PLANE.

Referenced by convert_m(), and convert_stop().

void MIST_ON  
 

Turn mist coolant off.

Definition at line 729 of file canon_pre.cc.

Referenced by convert_m().

void PALLET_SHUTTLE  
 

Turn mist coolant on.

Definition at line 735 of file canon_pre.cc.

Referenced by convert_stop().

void TURN_PROBE_OFF  
 

If the machining center has a pallet shuttle mechanism (a mechanism which switches the position of two pallets), this command should cause that switch to be made. If either or both of the pallets are missing, this will not result in an error condition in the controller.

If the machining center does not have a pallet shuttle, this command should result in an error condition in the controller.

Definition at line 738 of file canon_pre.cc.

Referenced by convert_probe().

void TURN_PROBE_ON  
 

Definition at line 741 of file canon_pre.cc.

Referenced by convert_probe().

void UNCLAMP_AXIS CANON_AXIS    axis
 

Definition at line 744 of file canon_pre.cc.

void NURB_KNOT_VECTOR  
 

NURB Functions

void NURB_CONTROL_POINT int    i,
double    x,
double    y,
double    z,
double    w
 

double knot values, -1.0 signals done

void NURB_FEED double    sStart,
double    sEnd
 

void OPTIONAL_PROGRAM_STOP  
 

Program Functions

Definition at line 758 of file canon_pre.cc.

Referenced by convert_stop().

void PROGRAM_END  
 

If the machining center has an optional stop switch, and it is on when this command is read from a program, stop executing the program at this point, but be prepared to resume with the next line of the program. If the machining center does not have an optional stop switch, or commands are being executed with a stop after each one already (such as when the interpreter is being used with keyboard input), this command has no effect.

Definition at line 761 of file canon_pre.cc.

Referenced by convert_stop().

void PROGRAM_STOP  
 

Program Functions

Definition at line 755 of file canon_pre.cc.

Referenced by convert_cycle_g88(), and convert_stop().

double GET_EXTERNAL_FEED_RATE  
 

Returns the system feed rate.

Returns the system feed rate

Definition at line 785 of file canon_pre.cc.

References CANON_DIRECTION.

Referenced by rs274ngc_synch().

int GET_EXTERNAL_FLOOD  
 

Returns the system value for flood coolant, zero = off, non-zero = on.

Returns the system flood coolant setting zero = off, non-zero = on

Definition at line 791 of file canon_pre.cc.

Referenced by rs274ngc_synch().

CANON_UNITS GET_EXTERNAL_LENGTH_UNIT_TYPE  
 

Returns the system length unit type.

Returns the system length unit type

Definition at line 803 of file canon_pre.cc.

Referenced by rs274ngc_init(), and rs274ngc_synch().

int GET_EXTERNAL_MIST  
 

Returns the system value for mist coolant, zero = off, non-zero = on.

Returns the system mist coolant setting zero = off, non-zero = on

Definition at line 809 of file canon_pre.cc.

References _tool_max.

Referenced by rs274ngc_synch().

CANON_MOTION_MODE GET_EXTERNAL_MOTION_CONTROL_MODE  
 

Returns the current motion control mode.

Definition at line 815 of file canon_pre.cc.

Referenced by convert_cycle_xy(), convert_cycle_yz(), convert_cycle_zx(), and rs274ngc_synch().

void GET_EXTERNAL_PARAMETER_FILE_NAME char *    file_name,
int    max_size
 

returns nothing but copies the name of the parameter file into the filename array, stopping at max_size if the name is longer An empty string may be placed in filename.

maximum number of characters to copy

Parameters:
max_size  string: to copy file name into

Definition at line 867 of file canon_pre.cc.

CANON_PLANE GET_EXTERNAL_PLANE  
 

returns the currently active plane.

Definition at line 877 of file canon_pre.cc.

Referenced by rs274ngc_synch().

double GET_EXTERNAL_POSITION_X  
 

returns the current x-axis position.

returns the current x-axis position

Definition at line 907 of file canon_pre.cc.

Referenced by rs274ngc_synch(), and set_probe_data().

double GET_EXTERNAL_POSITION_Y  
 

returns the current y-axis position.

returns the current y-axis position

Definition at line 913 of file canon_pre.cc.

Referenced by rs274ngc_synch(), and set_probe_data().

double GET_EXTERNAL_POSITION_Z  
 

returns the current z-axis position.

returns the current z-axis position

Definition at line 919 of file canon_pre.cc.

Referenced by rs274ngc_synch(), and set_probe_data().

double GET_EXTERNAL_PROBE_POSITION_X  
 

Returns the machine X-axis position at the last probe trip.

returns the x-axis position at the last probe trip. This is only valid once the probe command has executed to completion.

Definition at line 953 of file canon_pre.cc.

Referenced by set_probe_data().

double GET_EXTERNAL_PROBE_POSITION_Y  
 

Returns the machine Y-axis position at the last probe trip.

returns the y-axis position at the last probe trip. This is only valid once the probe command has executed to completion.

Definition at line 960 of file canon_pre.cc.

Referenced by set_probe_data().

double GET_EXTERNAL_PROBE_POSITION_Z  
 

Returns the machine Z-axis position at the last probe trip.

returns the z-axis position at the last probe trip. This is only valid once the probe command has executed to completion.

Definition at line 967 of file canon_pre.cc.

Referenced by set_probe_data().

double GET_EXTERNAL_PROBE_VALUE  
 

Returns the value for any analog non-contact probing.

It is not expected this will ever be called.

Definition at line 975 of file canon_pre.cc.

Referenced by set_probe_data().

int GET_EXTERNAL_QUEUE_EMPTY  
 

Returns zero if queue is not empty, non-zero if the queue is empty This always returns a valid value.

In the stand-alone interpreter, there is no queue, so it is always empty

Definition at line 982 of file canon_pre.cc.

Referenced by rs274ngc_read().

double GET_EXTERNAL_SPEED  
 

Returns the system value for spindle speed in rpm.

Returns the system value for spindle speed in rpm

Definition at line 988 of file canon_pre.cc.

Referenced by rs274ngc_synch().

CANON_DIRECTION GET_EXTERNAL_SPINDLE  
 

Returns the system value for direction of spindle turning.

Returns the system value for direction of spindle turning

Definition at line 994 of file canon_pre.cc.

Referenced by rs274ngc_synch().

double GET_EXTERNAL_TOOL_LENGTH_OFFSET  
 

returns current tool length offset.

int GET_EXTERNAL_TOOL_MAX  
 

Returns number of slots in carousel.

Returns maximum number of tools

Definition at line 1008 of file canon_pre.cc.

Referenced by rs274ngc_synch().

int GET_EXTERNAL_TOOL_SLOT  
 

Returns the system value for the carousel slot in which the tool currently in the spindle belongs. Return value zero means there is no tool in the spindle.

Returns the system value for the carousel slot in which the tool currently in the spindle belongs. Return value zero means there is no tool in the spindle.

Definition at line 1002 of file canon_pre.cc.

Referenced by rs274ngc_synch().

CANON_TOOL_TABLE GET_EXTERNAL_TOOL_TABLE int    pocket
 

Returns the CANON_TOOL_TABLE structure associated with the tool in the given pocket.

Returns the CANON_TOOL_TABLE structure associated with the tool in the given pocket

Definition at line 1015 of file canon_pre.cc.

double GET_EXTERNAL_TRAVERSE_RATE  
 

Returns the system traverse rate.

Returns the system traverse rate

Definition at line 1021 of file canon_pre.cc.

Referenced by rs274ngc_synch().


Variable Documentation

FILE * _outfile = NULL
 

Definition at line 84 of file canon_pre.cc.

Referenced by ARC_FEED(), print_nc_line_number(), SET_ORIGIN_OFFSETS(), STRAIGHT_FEED(), STRAIGHT_PROBE(), and STRAIGHT_TRAVERSE().

CANON_TOOL_TABLE _tools[]
 

Not static. Driver reads

Definition at line 808 of file canon.hh.

int _tool_max
 

in canon.cc

Definition at line 809 of file canon.hh.

Referenced by GET_EXTERNAL_MIST().

char _parameter_file_name[]
 

in canon.cc

Definition at line 810 of file canon.hh.


Generated on Mon Feb 11 21:31:16 2002 for rs274ngc by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001