📄 canon.hh
字号:
should result in an error condition in the controller. */extern void TURN_PROBE_OFF();extern void TURN_PROBE_ON();extern void UNCLAMP_AXIS(CANON_AXIS axis);/* Unclamp the given axis. If the machining center does not have a clampfor that axis, this command should result in an error condition in thecontroller. *//* NURB Functions */extern void NURB_KNOT_VECTOR(); /* double knot values, -1.0 signals done */extern void NURB_CONTROL_POINT(int i, double x, double y, double z, double w);extern void NURB_FEED(double sStart, double sEnd);/* Block delete */extern void SET_BLOCK_DELETE(bool enabled);/* Command to set the internal reference of block delete.The ON value for enabled will cause the interpreter to discard linesthat start with the "/" character. */extern bool GET_BLOCK_DELETE(void);/* Command to get the internal reference of optional block delete. *//* Program Functions */extern void OPTIONAL_PROGRAM_STOP();/* If the machining center has an optional stop switch, and it is onwhen this command is read from a program, stop executing the programat this point, but be prepared to resume with the next line of theprogram. If the machining center does not have an optional stopswitch, or commands are being executed with a stop after each onealready (such as when the interpreter is being used with keyboardinput), this command has no effect. */extern void SET_OPTIONAL_PROGRAM_STOP(bool state);/* Command to set the internal reference of optional program stop.Any non-zero value for state will cause the execution to stop onoptional stops. */extern bool GET_OPTIONAL_PROGRAM_STOP();/* Command to get the internal reference of optional program stop. */extern void PROGRAM_END();/* If a program is being read, stop executing the program and be preparedto accept a new program or to be shut down. */extern void PROGRAM_STOP();/* If this command is read from a program, stop executing the program atthis point, but be prepared to resume with the next line of theprogram. If commands are being executed with a stop after each onealready (such as when the interpreter is being used with keyboardinput), this command has no effect. *//* Commands to set/reset output bits and analog values */extern void SET_MOTION_OUTPUT_BIT(int index);extern void CLEAR_MOTION_OUTPUT_BIT(int index);extern void SET_AUX_OUTPUT_BIT(int index);extern void CLEAR_AUX_OUTPUT_BIT(int index);extern void SET_MOTION_OUTPUT_VALUE(int index, double value);extern void SET_AUX_OUTPUT_VALUE(int index, double value);/* Commands to wait for, query input bits and analog values */#define DIGITAL_INPUT 1#define ANALOG_INPUT 0#define WAIT_MODE_IMMEDIATE 0#define WAIT_MODE_RISE 1#define WAIT_MODE_FALL 2#define WAIT_MODE_HIGH 3#define WAIT_MODE_LOW 4extern void WAIT(int index, /* index of the motion exported input */ int input_type, /* 1=DIGITAL_INPUT or 0=ANALOG_INPUT */ int wait_type, /* 0 - immediate, 1 - rise, 2 - fall, 3 - be high, 4 - be low */ int timeout); /* time to wait [in seconds], if the input didn't change the value -1 is returned *//* WAIT - program execution is stopped until the input selected by index changed to the needed state (specified by wait_type). Return value: either wait_type if timeout didn't occur, or -1 otherwise. *//*************************************************************************//* Canonical "Give me information" functions for the interpreter to callIn general, returned values are valid only if any canonical do it commandsthat may have been called for have been executed to completion. If a functionreturns a valid value regardless of execution, that is noted in the commentsbelow.*//* The interpreter is not using this function// Returns the system angular unit factor, in units / degreeextern double GET_EXTERNAL_ANGLE_UNIT_FACTOR();*/// Returns the system feed rateextern double GET_EXTERNAL_FEED_RATE();// Returns the system value for flood coolant, zero = off, non-zero = onextern int GET_EXTERNAL_FLOOD();/* The interpreter is not using this function// Returns the system length unit factor, in units / mmextern double GET_EXTERNAL_LENGTH_UNIT_FACTOR();*/// Returns the system length unit typeCANON_UNITS GET_EXTERNAL_LENGTH_UNIT_TYPE();extern double GET_EXTERNAL_LENGTH_UNITS();extern double GET_EXTERNAL_ANGLE_UNITS();// Returns the system value for mist coolant, zero = off, non-zero = onextern int GET_EXTERNAL_MIST();// Returns the current motion control modeextern CANON_MOTION_MODE GET_EXTERNAL_MOTION_CONTROL_MODE();// Returns the current motion path-following toleranceextern double GET_EXTERNAL_MOTION_CONTROL_TOLERANCE();/* The interpreter is not using these six GET_EXTERNAL_ORIGIN functions// returns the current a-axis origin offsetextern double GET_EXTERNAL_ORIGIN_A();// returns the current b-axis origin offsetextern double GET_EXTERNAL_ORIGIN_B();// returns the current c-axis origin offsetextern double GET_EXTERNAL_ORIGIN_C();// returns the current x-axis origin offsetextern double GET_EXTERNAL_ORIGIN_X();// returns the current y-axis origin offsetextern double GET_EXTERNAL_ORIGIN_Y();// returns the current z-axis origin offsetextern double GET_EXTERNAL_ORIGIN_Z();*/// 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.extern void GET_EXTERNAL_PARAMETER_FILE_NAME(char *filename, int max_size);// returns the currently active planeextern CANON_PLANE GET_EXTERNAL_PLANE();// returns the current a-axis positionextern double GET_EXTERNAL_POSITION_A();// returns the current b-axis positionextern double GET_EXTERNAL_POSITION_B();// returns the current c-axis positionextern double GET_EXTERNAL_POSITION_C();// returns the current x-axis positionextern double GET_EXTERNAL_POSITION_X();// returns the current y-axis positionextern double GET_EXTERNAL_POSITION_Y();// returns the current z-axis positionextern double GET_EXTERNAL_POSITION_Z();// returns the current u-axis positionextern double GET_EXTERNAL_POSITION_U();// returns the current v-axis positionextern double GET_EXTERNAL_POSITION_V();// returns the current w-axis positionextern double GET_EXTERNAL_POSITION_W();// Returns the machine A-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_A();// Returns the machine B-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_B();// Returns the machine C-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_C();// Returns the machine X-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_X();// Returns the machine Y-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_Y();// Returns the machine Z-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_Z();// Returns the machine U-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_U();// Returns the machine V-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_V();// Returns the machine W-axis position at the last probe trip.extern double GET_EXTERNAL_PROBE_POSITION_W();// Returns the value for any analog non-contact probing.extern double GET_EXTERNAL_PROBE_VALUE();// Returns zero if queue is not empty, non-zero if the queue is empty// This always returns a valid valueextern int GET_EXTERNAL_QUEUE_EMPTY();// Returns the system value for spindle speed in rpmextern double GET_EXTERNAL_SPEED();// Returns the system value for direction of spindle turningextern CANON_DIRECTION GET_EXTERNAL_SPINDLE();// returns current tool length offsetextern double GET_EXTERNAL_TOOL_LENGTH_XOFFSET();extern double GET_EXTERNAL_TOOL_LENGTH_ZOFFSET();// Returns number of slots in carouselextern int GET_EXTERNAL_TOOL_MAX();// 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.extern int GET_EXTERNAL_TOOL_SLOT();// Returns the system value for the selected slot. That one will be the next// valid tool after a toolchange (m6). Return value -1 means there is no// selected tool.extern int GET_EXTERNAL_SELECTED_TOOL_SLOT();// Returns the CANON_TOOL_TABLE structure associated with the tool// in the given pocketextern CANON_TOOL_TABLE GET_EXTERNAL_TOOL_TABLE(int pocket);// Returns the system traverse rateextern double GET_EXTERNAL_TRAVERSE_RATE();// Returns the enabled/disabled status for feed override, spindle// override, adaptive feed, and feed holdextern int GET_EXTERNAL_FEED_OVERRIDE_ENABLE();extern int GET_EXTERNAL_SPINDLE_OVERRIDE_ENABLE();extern int GET_EXTERNAL_ADAPTIVE_FEED_ENABLE();extern int GET_EXTERNAL_FEED_HOLD_ENABLE();// Functions to query digital/analog Inputsextern int GET_EXTERNAL_DIGITAL_INPUT(int index);/* returns current value of the digital input selected by index.*/extern double GET_EXTERNAL_ANALOG_INPUT(int index);/* returns current value of the analog input selected by index.*/// Returns the mask of axes present in the systemextern int GET_EXTERNAL_AXIS_MASK();extern FILE *_outfile; /* where to print, set in main */extern CANON_TOOL_TABLE _tools[]; /* in canon.cc */extern int _tool_max; /* in canon.cc */extern char _parameter_file_name[]; /* in canon.cc */#define PARAMETER_FILE_NAME_LENGTH 100#define USER_DEFINED_FUNCTION_NUM 100typedef void (*USER_DEFINED_FUNCTION_TYPE) (int num, double arg1, double arg2);extern USER_DEFINED_FUNCTION_TYPE USER_DEFINED_FUNCTION[USER_DEFINED_FUNCTION_NUM];extern int USER_DEFINED_FUNCTION_ADD(USER_DEFINED_FUNCTION_TYPE func, int num); /* to be called by emcTaskPlanExecute when done interpreting. This causes the * last segment to be output, if it has been held to do segment merging */extern void FINISH(void);#endif /* ifndef CANON_HH */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -