Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

rs274ngc.hh File Reference

#include <stdio.h>
#include "canon.hh"

Include dependency graph for rs274ngc.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  block_struct
struct  setup_struct

Defines

#define AND   &&
#define IS   ==
#define ISNT   !=
#define MAX(x, y)   ((x) > (y) ? (x) : (y))
#define NOT   !
#define OR   ||
#define SET_TO   =
#define TRUE   1
#define FALSE   0
#define RS274NGC_TEXT_SIZE   256
#define TOLERANCE_INCH   0.0002
#define TOLERANCE_MM   0.002
#define TOLERANCE_CONCAVE_CORNER   0.01
#define TINY   1e-12
#define UNKNOWN   1e-20
#define TWO_PI   6.2831853071795864
#define PI   3.1415926535897932
#define PI2   1.5707963267948966
#define RS274NGC_ACTIVE_G_CODES   12
 array sizes. More...

#define RS274NGC_ACTIVE_M_CODES   7
#define RS274NGC_ACTIVE_SETTINGS   3
#define RS274NGC_PARAMETER_FILE_NAME_DEFAULT   "rs274ngc.var"
 name of parameter file for saving/restoring interpreter variables. More...

#define RS274NGC_PARAMETER_FILE_BACKUP_SUFFIX   ".bak"
#define MAX_EMS   4
 max number of m codes on one line. More...

#define MM_PER_INCH   25.4
 English - Metric conversion (long number keeps error buildup down). More...

#define INCH_PER_MM   0.039370078740157477
#define OFF   0
 on-off switch settings. More...

#define ON   1
#define UNITS_PER_MINUTE   0
 feed_mode. More...

#define INVERSE_TIME   1
#define RIGHT   1
 cutter radius compensation mode, OFF already defined to 0 not using CANON_SIDE since interpreter handles cutter radius comp. More...

#define LEFT   2
#define RS274NGC_MAX_PARAMETERS   5400
 number of parameters in parameter table. More...

#define ABS   1
 unary operations These are not enums because the "&" operator is used in reading the operation names and is illegal with an enum. More...

#define ACOS   2
#define ASIN   3
#define ATAN   4
#define COS   5
#define EXP   6
#define FIX   7
#define FUP   8
#define LN   9
#define ROUND   10
#define SIN   11
#define SQRT   12
#define TAN   13
#define NO_OPERATION   0
 binary operations. More...

#define DIVIDED_BY   1
#define MODULO   2
#define POWER   3
#define TIMES   4
#define AND2   5
#define EXCLUSIVE_OR   6
#define MINUS   7
#define NON_EXCLUSIVE_OR   8
#define PLUS   9
#define RIGHT_BRACKET   10
#define G_0   0
 G Codes are symbolic to be dialect-independent in source code. More...

#define G_1   10
#define G_2   20
#define G_3   30
#define G_4   40
#define G_10   100
#define G_17   170
#define G_18   180
#define G_19   190
#define G_20   200
#define G_21   210
#define G_28   280
#define G_30   300
#define G_38_2   382
#define G_40   400
#define G_41   410
#define G_42   420
#define G_43   430
#define G_49   490
#define G_53   530
#define G_54   540
#define G_55   550
#define G_56   560
#define G_57   570
#define G_58   580
#define G_59   590
#define G_59_1   591
#define G_59_2   592
#define G_59_3   593
#define G_61   610
#define G_61_1   611
#define G_64   640
#define G_80   800
#define G_81   810
#define G_82   820
#define G_83   830
#define G_84   840
#define G_85   850
#define G_86   860
#define G_87   870
#define G_88   880
#define G_89   890
#define G_90   900
#define G_91   910
#define G_92   920
#define G_92_1   921
#define G_92_2   922
#define G_92_3   923
#define G_93   930
#define G_94   940
#define G_98   980
#define G_99   990

Typedefs

typedef int ON_OFF
typedef block_struct block
typedef blockblock_pointer
typedef setup_struct setup
typedef setupsetup_pointer
typedef int(* read_function_pointer )(char *, int *, block_pointer, double *)
 pointer to function that reads. More...


Enumerations

enum  DISTANCE_MODE { MODE_ABSOLUTE, MODE_INCREMENTAL }
enum  RETRACT_MODE { R_PLANE, OLD_Z }

Functions

int rs274ngc_close ()
 close the currently open NC code file. More...

int rs274ngc_execute (const char *command=0)
 execute a line of NC code. More...

int rs274ngc_exit ()
 stop running. More...

int rs274ngc_init ()
 get ready to run. More...

int rs274ngc_load_tool_table ()
 load a tool table. More...

int rs274ngc_open (const char *filename)
 open a file of NC code. More...

int rs274ngc_read (const char *mdi=0)
 read the mdi or the next line of the open NC code file. More...

int rs274ngc_reset ()
 reset yourself. More...

int rs274ngc_restore_parameters (const char *filename)
 restore interpreter variables from a file. More...

int rs274ngc_save_parameters (const char *filename, const double parameters[])
 save interpreter variables to file. More...

int rs274ngc_synch ()
 synchronize your internal model with the external world. More...

void rs274ngc_active_g_codes (int *codes)
 copy active G codes into array [0]..[11]. More...

void rs274ngc_active_m_codes (int *codes)
 copy active M codes into array [0]..[6]. More...

void rs274ngc_active_settings (double *settings)
 copy active F, S settings into array [0]..[2]. More...

void rs274ngc_error_text (int error_code, char *error_text, int max_size)
 copy the text of the error message whose number is error_code into the error_text array, but stop at max_size if the text is longer. More...

void rs274ngc_file_name (char *file_name, int max_size)
 copy the name of the currently open file into the file_name array, but stop at max_size if the name is longer. More...

int rs274ngc_line_length ()
 return the length of the most recently read line. More...

void rs274ngc_line_text (char *line_text, int max_size)
 copy the text of the most recently read line into the line_text array, but stop at max_size if the text is longer. More...

int rs274ngc_sequence_number ()
 return the current sequence number (how many lines read). More...

void rs274ngc_stack_name (int stack_index, char *function_name, int max_size)
 copy the function name from the stack_index'th position of the function call stack at the time of the most recent error into the function name string, but stop at max_size if the name is longer. More...

int rs274ngc_ini_load (const char *filename)
 Get the parameter file name from the ini file. More...

int rs274ngc_line ()
const char * rs274ngc_command ()
const char * rs274ngc_file ()


Define Documentation

#define AND   &&
 

********************

Definition at line 22 of file rs274ngc.hh.

#define IS   ==
 

Definition at line 23 of file rs274ngc.hh.

#define ISNT   !=
 

Definition at line 24 of file rs274ngc.hh.

Referenced by adjust_error_handling(), check_g_codes(), check_other_codes(), close_and_downcase(), convert_arc(), convert_axis_offsets(), convert_comment(), convert_cutter_compensation_on(), convert_cycle_g84(), convert_cycle_g86(), convert_cycle_g87(), convert_cycle_g88(), convert_cycle_xy(), convert_cycle_yz(), convert_cycle_zx(), convert_distance_mode(), convert_g(), convert_home(), convert_length_units(), convert_m(), convert_probe(), convert_set_plane(), convert_stop(), convert_straight(), convert_straight_comp1(), enhance_block(), execute_binary1(), execute_binary2(), execute_block(), find_ends(), find_straight_length(), interpret_from_file(), interpret_from_keyboard(), main(), read_a(), read_atan(), read_b(), read_c(), read_comment(), read_d(), read_f(), read_g(), read_h(), read_i(), read_j(), read_k(), read_l(), read_line_number(), read_m(), read_p(), read_parameter(), read_parameter_setting(), read_q(), read_r(), read_real_expression(), read_real_number(), read_s(), read_t(), read_text(), read_tool_file(), read_unary(), read_x(), read_y(), read_z(), report_error(), rs274ngc_close(), rs274ngc_execute(), rs274ngc_line_text(), rs274ngc_open(), rs274ngc_read(), rs274ngc_restore_parameters(), rs274ngc_save_parameters(), rs274ngc_stack_name(), and rs274ngc_synch().

#define MAX x,
     ((x) > (y) ? (x) : (y))
 

Definition at line 25 of file rs274ngc.hh.

Referenced by inverse_time_rate_arc(), inverse_time_rate_arc2(), inverse_time_rate_as(), and inverse_time_rate_straight().

#define NOT   !
 

Definition at line 26 of file rs274ngc.hh.

Referenced by enhance_block().

#define OR   ||
 

Definition at line 27 of file rs274ngc.hh.

#define SET_TO   =
 

Definition at line 28 of file rs274ngc.hh.

#define TRUE   1
 

Definition at line 31 of file rs274ngc.hh.

#define FALSE   0
 

Definition at line 35 of file rs274ngc.hh.

#define RS274NGC_TEXT_SIZE   256
 

Definition at line 38 of file rs274ngc.hh.

Referenced by convert_stop(), interpret_from_file(), interpret_from_keyboard(), read_text(), report_error(), rs274ngc_exit(), rs274ngc_init(), and rs274ngc_open().

#define TOLERANCE_INCH   0.0002
 

numerical constants

Definition at line 41 of file rs274ngc.hh.

Referenced by convert_arc2(), convert_arc_comp1(), and convert_arc_comp2().

#define TOLERANCE_MM   0.002
 

Definition at line 42 of file rs274ngc.hh.

Referenced by convert_arc2(), convert_arc_comp1(), and convert_arc_comp2().

#define TOLERANCE_CONCAVE_CORNER   0.01
 

Definition at line 43 of file rs274ngc.hh.

Referenced by convert_arc_comp2(), and convert_straight_comp2().

#define TINY   1e-12
 

Definition at line 45 of file rs274ngc.hh.

Referenced by arc_data_r().

#define UNKNOWN   1e-20
 

Definition at line 46 of file rs274ngc.hh.

Referenced by convert_arc(), convert_cutter_compensation_off(), convert_stop(), convert_straight(), find_ends(), and rs274ngc_init().

#define TWO_PI   6.2831853071795864
 

Definition at line 47 of file rs274ngc.hh.

Referenced by convert_arc_comp2(), convert_straight_comp2(), and find_turn().

#define PI   3.1415926535897932
 

Definition at line 50 of file rs274ngc.hh.

Referenced by convert_arc_comp2(), convert_straight_comp2(), execute_unary(), and read_atan().

#define PI2   1.5707963267948966
 

Definition at line 54 of file rs274ngc.hh.

Referenced by arc_data_comp_r(), arc_data_r(), convert_arc_comp2(), and convert_straight_comp2().

#define RS274NGC_ACTIVE_G_CODES   12
 

array sizes.

Definition at line 58 of file rs274ngc.hh.

Referenced by main(), and rs274ngc_active_g_codes().

#define RS274NGC_ACTIVE_M_CODES   7
 

Definition at line 59 of file rs274ngc.hh.

Referenced by main(), and rs274ngc_active_m_codes().

#define RS274NGC_ACTIVE_SETTINGS   3
 

Definition at line 60 of file rs274ngc.hh.

Referenced by main(), and rs274ngc_active_settings().

#define RS274NGC_PARAMETER_FILE_NAME_DEFAULT   "rs274ngc.var"
 

name of parameter file for saving/restoring interpreter variables.

Definition at line 63 of file rs274ngc.hh.

Referenced by rs274ngc_exit(), and rs274ngc_init().

#define RS274NGC_PARAMETER_FILE_BACKUP_SUFFIX   ".bak"
 

Definition at line 64 of file rs274ngc.hh.

Referenced by rs274ngc_save_parameters().

#define MAX_EMS   4
 

max number of m codes on one line.

Definition at line 67 of file rs274ngc.hh.

Referenced by check_m_codes().

#define MM_PER_INCH   25.4
 

English - Metric conversion (long number keeps error buildup down).

Definition at line 70 of file rs274ngc.hh.

Referenced by convert_length_units().

#define INCH_PER_MM   0.039370078740157477
 

Definition at line 71 of file rs274ngc.hh.

Referenced by convert_length_units().

#define OFF   0
 

on-off switch settings.

Definition at line 74 of file rs274ngc.hh.

Referenced by adjust_error_handling(), check_other_codes(), convert_arc(), convert_axis_offsets(), convert_cutter_compensation_off(), convert_cutter_compensation_on(), convert_cycle(), convert_cycle_xy(), convert_cycle_yz(), convert_cycle_zx(), convert_home(), convert_length_units(), convert_m(), convert_probe(), convert_set_plane(), convert_stop(), convert_straight(), find_ends(), init_block(), main(), read_a(), read_b(), read_c(), read_i(), read_j(), read_k(), read_r(), read_real_number(), read_x(), read_y(), read_z(), rs274ngc_init(), rs274ngc_open(), rs274ngc_read(), and rs274ngc_synch().

#define ON   1
 

Definition at line 75 of file rs274ngc.hh.

Referenced by adjust_error_handling(), check_other_codes(), convert_arc(), convert_axis_offsets(), convert_cycle_xy(), convert_cycle_yz(), convert_cycle_zx(), convert_m(), convert_probe(), convert_setup(), convert_stop(), enhance_block(), execute_block(), find_ends(), interpret_from_file(), interpret_from_keyboard(), main(), read_a(), read_b(), read_c(), read_i(), read_j(), read_k(), read_r(), read_real_number(), read_text(), read_x(), read_y(), read_z(), report_error(), rs274ngc_init(), rs274ngc_open(), rs274ngc_read(), rs274ngc_synch(), and write_m_codes().

#define UNITS_PER_MINUTE   0
 

feed_mode.

Definition at line 78 of file rs274ngc.hh.

Referenced by convert_arc(), convert_feed_mode(), convert_stop(), convert_straight(), and rs274ngc_init().

#define INVERSE_TIME   1
 

Definition at line 79 of file rs274ngc.hh.

Referenced by convert_arc(), convert_arc2(), convert_arc_comp1(), convert_arc_comp2(), convert_feed_mode(), convert_probe(), convert_straight(), convert_straight_comp1(), convert_straight_comp2(), execute_block(), and write_g_codes().

#define RIGHT   1
 

cutter radius compensation mode, OFF already defined to 0 not using CANON_SIDE since interpreter handles cutter radius comp.

Definition at line 83 of file rs274ngc.hh.

Referenced by arc_data_comp_ijk(), arc_data_comp_r(), convert_arc_comp1(), convert_arc_comp2(), convert_cutter_compensation(), convert_cutter_compensation_on(), convert_straight_comp1(), convert_straight_comp2(), and write_g_codes().

#define LEFT   2
 

Definition at line 84 of file rs274ngc.hh.

Referenced by arc_data_comp_ijk(), arc_data_comp_r(), convert_arc_comp1(), convert_arc_comp2(), convert_cutter_compensation(), convert_cutter_compensation_on(), convert_straight_comp1(), convert_straight_comp2(), and write_g_codes().

#define RS274NGC_MAX_PARAMETERS   5400
 

number of parameters in parameter table.

Definition at line 87 of file rs274ngc.hh.

Referenced by read_parameter(), read_parameter_setting(), rs274ngc_restore_parameters(), and rs274ngc_save_parameters().

#define ABS   1
 

unary operations These are not enums because the "&" operator is used in reading the operation names and is illegal with an enum.

Definition at line 93 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define ACOS   2
 

Definition at line 94 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define ASIN   3
 

Definition at line 95 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define ATAN   4
 

Definition at line 96 of file rs274ngc.hh.

Referenced by read_operation_unary(), and read_unary().

#define COS   5
 

Definition at line 97 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define EXP   6
 

Definition at line 98 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define FIX   7
 

Definition at line 99 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define FUP   8
 

Definition at line 100 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define LN   9
 

Definition at line 101 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define ROUND   10
 

Definition at line 102 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define SIN   11
 

Definition at line 103 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define SQRT   12
 

Definition at line 104 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define TAN   13
 

Definition at line 105 of file rs274ngc.hh.

Referenced by execute_unary(), and read_operation_unary().

#define NO_OPERATION   0
 

binary operations.

Definition at line 109 of file rs274ngc.hh.

#define DIVIDED_BY   1
 

Definition at line 110 of file rs274ngc.hh.

Referenced by execute_binary1(), and read_operation().

#define MODULO   2
 

Definition at line 111 of file rs274ngc.hh.

Referenced by execute_binary1(), and read_operation().

#define POWER   3
 

Definition at line 112 of file rs274ngc.hh.

Referenced by execute_binary1(), precedence(), and read_operation().

#define TIMES   4
 

Definition at line 113 of file rs274ngc.hh.

Referenced by execute_binary1(), and read_operation().

#define AND2   5
 

Definition at line 114 of file rs274ngc.hh.

Referenced by execute_binary(), execute_binary2(), precedence(), read_operation(), read_r(), and read_real_value().

#define EXCLUSIVE_OR   6
 

Definition at line 115 of file rs274ngc.hh.

Referenced by execute_binary2(), and read_operation().

#define MINUS   7
 

Definition at line 116 of file rs274ngc.hh.

Referenced by execute_binary2(), and read_operation().

#define NON_EXCLUSIVE_OR   8
 

Definition at line 117 of file rs274ngc.hh.

Referenced by execute_binary2(), and read_operation().

#define PLUS   9
 

Definition at line 118 of file rs274ngc.hh.

Referenced by execute_binary2(), and read_operation().

#define RIGHT_BRACKET   10
 

Definition at line 119 of file rs274ngc.hh.

Referenced by precedence(), read_operation(), read_r(), read_real_expression(), and read_real_value().

#define G_0   0
 

G Codes are symbolic to be dialect-independent in source code.

Definition at line 122 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_motion(), convert_straight(), convert_straight_comp1(), and convert_straight_comp2().

#define G_1   10
 

Definition at line 123 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_motion(), convert_stop(), convert_straight(), convert_straight_comp1(), and convert_straight_comp2().

#define G_2   20
 

Definition at line 124 of file rs274ngc.hh.

Referenced by arc_data_comp_ijk(), arc_data_comp_r(), arc_data_ijk(), arc_data_r(), check_other_codes(), convert_arc_comp1(), convert_arc_comp2(), and convert_motion().

#define G_3   30
 

Definition at line 125 of file rs274ngc.hh.

Referenced by arc_data_comp_ijk(), arc_data_comp_r(), arc_data_ijk(), arc_data_r(), check_other_codes(), convert_arc_comp1(), convert_arc_comp2(), and convert_motion().

#define G_4   40
 

Definition at line 126 of file rs274ngc.hh.

Referenced by check_g_codes(), check_other_codes(), convert_g(), and convert_modal_0().

#define G_10   100
 

Definition at line 127 of file rs274ngc.hh.

Referenced by check_g_codes(), check_other_codes(), convert_modal_0(), and enhance_block().

#define G_17   170
 

Definition at line 128 of file rs274ngc.hh.

Referenced by convert_set_plane(), and write_g_codes().

#define G_18   180
 

Definition at line 129 of file rs274ngc.hh.

Referenced by convert_set_plane(), and write_g_codes().

#define G_19   190
 

Definition at line 130 of file rs274ngc.hh.

Referenced by convert_set_plane(), and write_g_codes().

#define G_20   200
 

Definition at line 131 of file rs274ngc.hh.

Referenced by convert_length_units(), and write_g_codes().

#define G_21   210
 

Definition at line 132 of file rs274ngc.hh.

Referenced by convert_length_units(), and write_g_codes().

#define G_28   280
 

Definition at line 133 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_home(), convert_modal_0(), and enhance_block().

#define G_30   300
 

Definition at line 134 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_home(), convert_modal_0(), and enhance_block().

#define G_38_2   382
 

Definition at line 135 of file rs274ngc.hh.

Referenced by convert_motion(), and convert_probe().

#define G_40   400
 

Definition at line 136 of file rs274ngc.hh.

Referenced by convert_cutter_compensation(), and write_g_codes().

#define G_41   410
 

Definition at line 137 of file rs274ngc.hh.

Referenced by check_other_codes(), convert_cutter_compensation(), and write_g_codes().

#define G_42   420
 

Definition at line 138 of file rs274ngc.hh.

Referenced by check_other_codes(), convert_cutter_compensation(), and write_g_codes().

#define G_43   430
 

Definition at line 139 of file rs274ngc.hh.

Referenced by check_other_codes(), convert_tool_length_offset(), and write_g_codes().

#define G_49   490
 

Definition at line 140 of file rs274ngc.hh.

Referenced by convert_tool_length_offset(), and write_g_codes().

#define G_53   530
 

Definition at line 141 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_modal_0(), convert_straight(), and find_ends().

#define G_54   540
 

Definition at line 142 of file rs274ngc.hh.

#define G_55   550
 

Definition at line 143 of file rs274ngc.hh.

#define G_56   560
 

Definition at line 144 of file rs274ngc.hh.

#define G_57   570
 

Definition at line 145 of file rs274ngc.hh.

#define G_58   580
 

Definition at line 146 of file rs274ngc.hh.

#define G_59   590
 

Definition at line 147 of file rs274ngc.hh.

#define G_59_1   591
 

Definition at line 148 of file rs274ngc.hh.

#define G_59_2   592
 

Definition at line 149 of file rs274ngc.hh.

#define G_59_3   593
 

Definition at line 150 of file rs274ngc.hh.

#define G_61   610
 

Definition at line 151 of file rs274ngc.hh.

Referenced by convert_control_mode(), and write_g_codes().

#define G_61_1   611
 

Definition at line 152 of file rs274ngc.hh.

Referenced by convert_control_mode(), and write_g_codes().

#define G_64   640
 

Definition at line 153 of file rs274ngc.hh.

Referenced by convert_control_mode(), and write_g_codes().

#define G_80   800
 

Definition at line 154 of file rs274ngc.hh.

Referenced by check_other_codes(), convert_motion(), enhance_block(), and rs274ngc_init().

#define G_81   810
 

Definition at line 155 of file rs274ngc.hh.

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

#define G_82   820
 

Definition at line 156 of file rs274ngc.hh.

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

#define G_83   830
 

Definition at line 157 of file rs274ngc.hh.

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

#define G_84   840
 

Definition at line 158 of file rs274ngc.hh.

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

#define G_85   850
 

Definition at line 159 of file rs274ngc.hh.

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

#define G_86   860
 

Definition at line 160 of file rs274ngc.hh.

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

#define G_87   870
 

Definition at line 161 of file rs274ngc.hh.

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

#define G_88   880
 

Definition at line 162 of file rs274ngc.hh.

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

#define G_89   890
 

Definition at line 163 of file rs274ngc.hh.

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

#define G_90   900
 

Definition at line 164 of file rs274ngc.hh.

Referenced by check_g_codes(), check_other_codes(), convert_distance_mode(), convert_motion(), and write_g_codes().

#define G_91   910
 

Definition at line 165 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_distance_mode(), and write_g_codes().

#define G_92   920
 

Definition at line 166 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_axis_offsets(), convert_modal_0(), and enhance_block().

#define G_92_1   921
 

Definition at line 167 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_axis_offsets(), and convert_modal_0().

#define G_92_2   922
 

Definition at line 168 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_axis_offsets(), and convert_modal_0().

#define G_92_3   923
 

Definition at line 169 of file rs274ngc.hh.

Referenced by check_g_codes(), convert_axis_offsets(), and convert_modal_0().

#define G_93   930
 

Definition at line 170 of file rs274ngc.hh.

Referenced by convert_feed_mode(), and write_g_codes().

#define G_94   940
 

Definition at line 171 of file rs274ngc.hh.

Referenced by convert_feed_mode(), and write_g_codes().

#define G_98   980
 

Definition at line 172 of file rs274ngc.hh.

Referenced by convert_retract_mode(), and write_g_codes().

#define G_99   990
 

Definition at line 173 of file rs274ngc.hh.

Referenced by convert_retract_mode(), and write_g_codes().


Typedef Documentation

typedef int ON_OFF
 

Definition at line 185 of file rs274ngc.hh.

typedef struct block_struct block
 

typedef block* block_pointer
 

Definition at line 230 of file rs274ngc.hh.

typedef struct setup_struct setup
 

The current_x, current_y, and current_z are the location of the tool in the current coordinate system. current_x and current_y differ from program_x and program_y when cutter radius compensation is on. current_z is the position of the tool tip in program coordinates when tool length compensation is using the actual tool length; it is the position of the spindle when tool length is zero.

In a setup, the axis_offset values are set by g92 and the origin_offset values are set by g54 - g59.3. The net origin offset uses both values and is not represented here

typedef setup* setup_pointer
 

Definition at line 333 of file rs274ngc.hh.

typedef int(* read_function_pointer)(char *, int *, block_pointer, double *)
 

pointer to function that reads.

Definition at line 336 of file rs274ngc.hh.

Referenced by read_one_item().


Enumeration Type Documentation

enum DISTANCE_MODE
 

distance_mode

Enumeration values:
MODE_ABSOLUTE 
MODE_INCREMENTAL 

Definition at line 180 of file rs274ngc.hh.

enum RETRACT_MODE
 

retract_mode for cycles

Enumeration values:
R_PLANE 
OLD_Z 

Definition at line 183 of file rs274ngc.hh.


Function Documentation

int rs274ngc_close  
 

close the currently open NC code file.

rs274ngc_close

Returned Value: int (RS274NGC_OK)

Side Effects: The NC-code file is closed if open. The _setup world model is reset.

Called By: external programs

Definition at line 11144 of file rs274ngc_pre.cc.

Referenced by main().

int rs274ngc_execute const char *    command = 0
 

execute a line of NC code.

NO ARGUMENTS

Definition at line 11179 of file rs274ngc_pre.cc.

int rs274ngc_exit  
 

stop running.

NO ARGUMENTS

Definition at line 11233 of file rs274ngc_pre.cc.

Referenced by main().

int rs274ngc_init  
 

get ready to run.

NO ARGUMENTS

Definition at line 11273 of file rs274ngc_pre.cc.

Referenced by main().

int rs274ngc_load_tool_table  
 

load a tool table.

NO ARGUMENTS

Definition at line 11429 of file rs274ngc_pre.cc.

Referenced by rs274ngc_synch().

int rs274ngc_open const char *    filename
 

open a file of NC code.

string: the name of the input NC-program file

Parameters:
filename  ARGUMENTS

Definition at line 11495 of file rs274ngc_pre.cc.

int rs274ngc_read const char *    command = 0
 

read the mdi or the next line of the open NC code file.

may be NULL or a string to read

Parameters:
command  ARGUMENTS

Definition at line 11580 of file rs274ngc_pre.cc.

int rs274ngc_reset  
 

reset yourself.

rs274ngc_reset

Returned Value: int (RS274NGC_OK)

Side Effects: See below

Called By: external programs rs274ngc_close rs274ngc_exit rs274ngc_open

This function resets the parts of the _setup model having to do with reading and interpreting one line. It does not affect the parts of the model dealing with a file being open; rs274ngc_open and rs274ngc_close do that.

There is a hierarchy of resetting the interpreter. Each of the following calls does everything the ones above it do.

rs274ngc_reset() rs274ngc_close() rs274ngc_init()

In addition, rs274ngc_synch and rs274ngc_restore_parameters (both of which are called by rs274ngc_init) change the model.

Definition at line 11643 of file rs274ngc_pre.cc.

Referenced by rs274ngc_close(), rs274ngc_exit(), and rs274ngc_open().

int rs274ngc_restore_parameters const char *    filename
 

restore interpreter variables from a file.

name of parameter file to read

Parameters:
filename  ARGUMENTS

Definition at line 11689 of file rs274ngc_pre.cc.

int rs274ngc_save_parameters const char *    filename,
const double    parameters[]
 

save interpreter variables to file.

parameters to save

Parameters:
filename  ARGUMENTS
parameters  name of file to write

Definition at line 11787 of file rs274ngc_pre.cc.

Referenced by rs274ngc_exit().

int rs274ngc_synch  
 

synchronize your internal model with the external world.

NO ARGUMENTS

Definition at line 11884 of file rs274ngc_pre.cc.

Referenced by rs274ngc_init().

void rs274ngc_active_g_codes int *    codes
 

copy active G codes into array [0]..[11].

array of codes to copy into

Parameters:
codes  ARGUMENTS

Definition at line 11940 of file rs274ngc_pre.cc.

void rs274ngc_active_m_codes int *    codes
 

copy active M codes into array [0]..[6].

array of codes to copy into

Parameters:
codes  ARGUMENTS

Definition at line 11965 of file rs274ngc_pre.cc.

void rs274ngc_active_settings double *    settings
 

copy active F, S settings into array [0]..[2].

array of settings to copy into

Parameters:
settings  ARGUMENTS

Definition at line 11990 of file rs274ngc_pre.cc.

void rs274ngc_error_text int    error_code,
char *    error_text,
int    max_size
 

copy the text of the error message whose number is error_code into the error_text array, but stop at max_size if the text is longer.

maximum number of characters to copy

Parameters:
error_code  ARGUMENTS
error_text  code number of error
max_size  char array to copy error text into

Definition at line 12020 of file rs274ngc_pre.cc.

void rs274ngc_file_name char *    file_name,
int    max_size
 

copy the name of the currently open file into the file_name array, but stop at max_size if the name is longer.

maximum number of characters to copy

Parameters:
file_name  ARGUMENTS
max_size  string: to copy file name into

Definition at line 12052 of file rs274ngc_pre.cc.

int rs274ngc_line_length  
 

return the length of the most recently read line.

rs274ngc_line_length

Returned Value: the length of the most recently read line

Side Effects: none

Called By: external programs

Definition at line 12074 of file rs274ngc_pre.cc.

Referenced by main().

void rs274ngc_line_text char *    line_text,
int    max_size
 

copy the text of the most recently read line into the line_text array, but stop at max_size if the text is longer.

maximum number of characters to copy

Parameters:
line_text  ARGUMENTS
max_size  string: to copy line into

Definition at line 12095 of file rs274ngc_pre.cc.

int rs274ngc_sequence_number  
 

return the current sequence number (how many lines read).

rs274ngc_sequence_number

Returned Value: the current interpreter sequence number (how many lines read since the last time the sequence number was reset to zero, which happens only when rs274ngc_init or rs274ngc_open is called).

Side Effects: none

Called By: external programs

Definition at line 12127 of file rs274ngc_pre.cc.

Referenced by main(), and rs274ngc_line().

void rs274ngc_stack_name int    stack_index,
char *    function_name,
int    max_size
 

copy the function name from the stack_index'th position of the function call stack at the time of the most recent error into the function name string, but stop at max_size if the name is longer.

maximum number of characters to copy

Parameters:
stack_index  ARGUMENTS
function_name  index into stack of function names
max_size  string: to copy function name into

Definition at line 12156 of file rs274ngc_pre.cc.

int rs274ngc_ini_load const char *    filename
 

Get the parameter file name from the ini file.

int rs274ngc_line   [inline, static]
 

Definition at line 436 of file rs274ngc.hh.

References rs274ngc_sequence_number().

const char* rs274ngc_command   [inline, static]
 

Definition at line 437 of file rs274ngc.hh.

References rs274ngc_line_text().

const char* rs274ngc_file   [inline, static]
 

Definition at line 438 of file rs274ngc.hh.

References rs274ngc_file_name().


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