亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rs274ngc_pre.cc

?? 數控系統中的解釋器源代碼
?? CC
?? 第 1 頁 / 共 5 頁
字號:
/* rs274ngc.cc      This rs274ngc.cc file contains the source code for (1) the kernel ofseveral rs274ngc interpreters and (2) two of the four sets of interfacefunctions declared in canon.hh:1. interface functions to call to tell the interpreter what to do.   These all return a status value.2. interface functions to call to get information from the interpreter.Kernel functions call each other. A few kernel functions are called byinterface functions.Interface function names all begin with "rs274ngc_".Error handling is by returning a status value of either a non-errorcode (RS274NGC_OK, RS274NGC_EXIT, etc.) or some specific error codefrom each function where there is a possibility of error.  If an erroroccurs, processing is always stopped, and control is passed back upthrough the function call hierarchy to an interface function; theerror code is also passed back up. The stack of functions called isalso recorded. The external program calling an interface function maythen handle the error further as it sees fit.Since returned values are usually used as just described to handle thepossibility of errors, an alternative method of passing calculatedvalues is required. In general, if function A needs a value forvariable V calculated by function B, this is handled by passing apointer to V from A to B, and B calculates and sets V.There are a lot of functions named read_XXXX. All such functions readcharacters from a string using a counter. They all reset the counterto point at the character in the string following the last one used bythe function. The counter is passed around from function to functionby using pointers to it. The first character read by each of thesefunctions is expected to be a member of some set of characters (oftena specific character), and each function checks the first character.This version of the interpreter not saving input lines. A list of alllines will be needed in future versions to implement loops, andprobably for other purposes.This version does not use any additional memory as it runs. Nomemory is allocated by the source code.This version does not suppress superfluous commands, such as a commandto start the spindle when the spindle is already turning, or a commandto turn on flood coolant, when flood coolant is already on.  When theinterpreter is being used for direct control of the machining center,suppressing superfluous commands might confuse the user and could bedangerous, but when it is used to translate from one file to another,suppression can produce more concise output. Future versions mightinclude an option for suppressing superfluous commands.This file has been arranged typographically so that it may be usedfor compiling fifteen different executables. The file may be compiledas is for a six-axis interpreter. The file may be pre-preprocessedinto "pre.cc" by "prepre" (a lex-based pre-processor). Allfifteen executables may be compiled from the pre.cc file. The specialtypography items are:1. Any line with the comment /^AA^/, /^BB^/, or /^CC^/ at the end(where ^ is replaced by *).2. Calls to the canonical functions STRAIGHT_FEED, STRAIGHT_TRAVERSE,STRAIGHT_PROBE, and ARC_FEED. These are always set on two lineswith the rotary axes on the second line:3. Calls to the canonical function SET_ORIGIN_OFFSETS.  These arealways set on six lines, with one argument per line.4. Anywhere else AA, BB, or CC appears followed by an underscore.The pre-preprocessor looks for these items of typography and, in the outputfile (pre.cc), resets them appropriately marked with #ifdef and #endif.The rest of the text is put into the output file unchanged.The compiler flags are:1. -DAA to have an A-axis2. -DBB to have a B-axis3. -DCC to have a C-axis4. -DALL_AXES to have a 3-, 4-, or 5-axis interpreter use all threerotary axes in canonical function calls. In those calls, the valuefor a rotary axis not compiled into an interpreter is always zero.5. -DAXIS_ERROR to have a 3-, 4-, or 5-axis interpreter signal an errorif the input RS274 code has a value for an axis not compiled in. Ifthis flag is not used, the interpreter will read and ignore values foraxes not compiled in.*//* comment added by wpin on 2003-04-14modified G02,G03,for helix L number	G02(03) X... Y... Z... L...:L number is a integer,1 means 0~360,2 means 360~720,so on.added G code for G11,g12,g13,G14,g25	G11: X...  Y... Z...: coordinate of each axis will be multiplied by the x(y,z) number	G12: canel all axis mirror	G25 jumping_line_number: none condition jump	G25 loop_begin_line.loop_end_line: loop from beging_line to end_line once.		also the loop_begin_line will be execute	G25 loop_begin_line.loop_end_line.loop_times:loop from beging_line to end_line		loop_time timesstatic int fSyncLine(FILE * fileFp , int syncLine)static int read_g25(char * line,int * counter, block_pointer block, SysParmeter * parameters)static int pre_compile(char * line)fSyncLine : while on file explantion mode,and when wanting jump to a labeled line,	these function will rewind the file pointer and then seek the pointer at the	exact line which line sequence number is syncLine.read_g25 : inprete the N25 code,for none condition jumping and loopingpre_complie : called by rs274ngc_read. explain G11,G12,G13,G14,G25 codes .	otherwise,G11--G14 was explained in convert_g function and work in read_* function*//****************************************************************************///#define LATHE#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <ctype.h>#include "rs274ngc.hh"#include "rs274ngc_return.hh"#include "rs274ngc_errors.cc"#include "rcs.hh"               // RCS_LINKED_LIST#include "interpl.hh"           // NML_INTERP_LIST, interp_list#ifdef LATHE_FLAG#include "profdata.hh"#endif#include "gmcode.hh"#include "message.hh"#include "Compensation.hh"//#define DEBUG_EMC#ifdef DEBUG_EMC#include <stdarg.h>#include <sys/types.h>#include <sys/time.h>#include <time.h>#include <unistd.h>#define LOG(level, fmt, args...) \       doLog("%02d(%d):%s:%d -- " fmt "\n", \       level, getpid(), __FILE__, __LINE__ , ## args)#define logDebug(fmt, args...) LOG(0, fmt, ## args)static FILE *log_file;#define LOG_FILE "log/cnc_log"void doLog(char *fmt, ...){    struct timeval tv;    struct tm *tm;    va_list ap;    va_start(ap, fmt);    if(log_file == NULL)      {	 log_file = fopen(LOG_FILE, "a");      }    if(log_file == NULL)      {         fprintf(stderr, "(%d)Unable to open log file:%s\n",                  getpid(), LOG_FILE);         exit(1);      }    gettimeofday(&tv, NULL);    tm = localtime(&tv.tv_sec);    fprintf(log_file, "%04d%02d%02d-%02d:%02d:%02d.%03d ",	    tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,	    tm->tm_hour, tm->tm_min, tm->tm_sec,	    tv.tv_usec/1000);    vfprintf(log_file, fmt, ap);    fflush(log_file);    va_end(ap);}#else#define logDebug(fmt, args...) if(0)#endif#define TEMP_QUEUE_LEN 	20static inline int  IS_QUEUE_FULL() 	{	if ((temp_list.len()) >= TEMP_QUEUE_LEN) 		{		return  NCE_COMPENSATION_QUEUE_FULL;				}	//printf ("add queue\n");	return RS274NGC_OK;}	   			/*The _setup model includes a stack array for the names of functioncalls. This stack is written into if an error occurs. Just before eachfunction returns an error code, it writes its name in the nextavailable string, initializes the following string, and incrementsthe array index. The following four macros do the work.The size of the stack array is 50. An error in the middle of a verycomplex expression would cause the ERP and CHP macros to write past thebounds of the array if a check were not provided. No real programwould contain such a thing, but the check is included to make themacros totally crash-proof. If the function call stack is deeper than49, the top of the stack will be missing.*/static int fSyncLine(FILE * fileFp , int syncLine);static int GetFilePosFormNumber(FILE * fileFp , int syncLine,FilePosition fpos);static int read_g25(char * line,int * counter, block_pointer block, SysParmeter * parameters) ;static int pre_compile(char * line);static int interp_reset();static int init_system_parameters(SysParmeter *pars);static int get_system_parameters(int index,double *value);static int write_system_parameters(int index,double value);#ifdef LATHE_FLAGstatic void cncLatheCompensation (setup_pointer settings);int   CNC_MainProgOfSpeCylce(setup_pointer settings,Special_Cycle        *pSpeCycle);int  read_sequence_number(setup_pointer settings, Special_Cycle        *pSpeCycle);static int convert_profile_arc(int move, block_pointer block, setup_pointer settings);static int convert_paralle_cycle(int motion, block_pointer block,  setup_pointer settings);static int InitSpeCycleArg(int motion, block_pointer block,  setup_pointer settings);static int G70init(int motion, block_pointer block,  setup_pointer settings);static int convert_profile(int motion, block_pointer block,  setup_pointer settings);static int execute_Parallel_axis(int motion, block_pointer block,  setup_pointer settings);static int execute_Parallel_prof(block_pointer block,  setup_pointer settings); static int convert_profile_straight(int move, block_pointer block,  setup_pointer settings);static int pre_block(block_pointer block, setup_pointer settings);static int BuildArgOfProfile(Special_Cycle *pSpeCycle,int move);#endif/*Function prototypes for all static functions*/static int arc_data_comp_ijk(int move, int side, double tool_radius,  double current_x, double current_y, double end_x, double end_y,  double i_number, double j_number, double * center_x, double * center_y,  int * turn, double tolerance);static int arc_data_comp_r(int move, int side, double tool_radius,  double current_x, double current_y, double end_x, double end_y,  double big_radius, double * center_x, double * center_y, int * turn);static int arc_data_ijk(int move, double current_x, double current_y,  double end_x, double end_y, double i_number, double j_number,  double * center_x, double * center_y, int * turn, double tolerance);static int arc_data_r(int move, double current_x, double current_y,  double end_x, double end_y, double radius, double * center_x,  double * center_y, int * turn);static int check_g_codes(block_pointer block, setup_pointer settings);static int check_items(block_pointer block, setup_pointer settings);static int check_m_codes(block_pointer block);static int check_other_codes(block_pointer block);static int close_and_downcase(block_pointer block, char * line);static int convert_arc(int move, block_pointer block, setup_pointer settings);static int convert_arc2(int move, block_pointer block,  setup_pointer settings, double * current1, double * current2,  double * current3, double end1, double end2,  double end3#ifdef AA, double AA_end#endif#ifdef BB, double BB_end#endif#ifdef CC, double CC_end#endif, double offset1,  double offset2);static int convert_arc_comp1(int move, block_pointer block,  setup_pointer settings, double end_x, double end_y,  double end_z#ifdef AA, double AA_end#endif#ifdef BB, double BB_end#endif#ifdef CC, double CC_end#endif);static int convert_arc_comp2(int move, block_pointer block,  setup_pointer settings, double end_x, double end_y,  double end_z#ifdef AA, double AA_end#endif#ifdef BB, double BB_end#endif#ifdef CC, double CC_end#endif);static int convert_axis_offsets(int g_code, block_pointer block,  setup_pointer settings);static int convert_comment(char * comment);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美激情在线| 国产在线看一区| 国产一区二区精品久久99| 不卡av在线免费观看| 欧美色图12p| 综合久久综合久久| 99精品欧美一区| 精品国产欧美一区二区| 亚洲免费大片在线观看| 国产不卡一区视频| xnxx国产精品| 首页综合国产亚洲丝袜| 色天天综合色天天久久| 亚洲欧洲一区二区在线播放| 国产一区二区网址| 久久综合色8888| 久久精品国产精品青草| 欧美久久一区二区| 日韩精品色哟哟| 欧美日韩一区二区电影| 亚洲综合图片区| 91小视频免费观看| 亚洲欧洲精品一区二区三区不卡| 国产一区二区精品在线观看| 精品理论电影在线观看| 久久99精品国产麻豆婷婷| 日韩午夜精品电影| 久久99精品久久久久久动态图| 日韩欧美123| 精品一区在线看| 久久综合久色欧美综合狠狠| 国产一区二区美女| 国产日韩v精品一区二区| 成人一区二区视频| 中文字幕在线观看不卡| 一本一道久久a久久精品| 一区二区三区中文字幕| 色妹子一区二区| 亚洲综合色丁香婷婷六月图片| 色婷婷精品久久二区二区蜜臀av| 亚洲欧美日韩国产综合| 欧美亚洲综合网| 亚洲电影你懂得| 欧美一区二区网站| 国产一区二区在线电影| 国产精品毛片a∨一区二区三区| www.日韩精品| 亚洲午夜久久久久| 日韩欧美一级二级三级久久久| 久99久精品视频免费观看| 国产欧美视频一区二区三区| 93久久精品日日躁夜夜躁欧美| 亚洲影院理伦片| 欧美tickling网站挠脚心| 国产老妇另类xxxxx| 日韩av电影天堂| 久久欧美中文字幕| 色吧成人激情小说| 麻豆精品视频在线观看视频| 26uuu精品一区二区| 色老综合老女人久久久| 免费观看在线色综合| 欧美国产日韩亚洲一区| 欧美视频日韩视频| 国产精品亚洲专一区二区三区 | 国产成人综合在线播放| 国产精品久久久久久久久果冻传媒| 色综合天天天天做夜夜夜夜做| 视频一区二区中文字幕| 久久精子c满五个校花| 在线精品国精品国产尤物884a| 免费在线视频一区| 亚洲青青青在线视频| 日韩欧美综合一区| 99国产精品久| 国产剧情一区二区| 亚洲超碰精品一区二区| 中文字幕的久久| 日韩欧美自拍偷拍| 色妞www精品视频| 国产一本一道久久香蕉| 日韩精品1区2区3区| 亚洲人成在线观看一区二区| 精品捆绑美女sm三区| 欧美日韩亚洲另类| 99久久99久久综合| 国产剧情一区在线| 精品一区二区三区视频在线观看| 一个色综合网站| 亚洲三级免费观看| 国产亚洲欧美在线| 久久综合久久鬼色中文字| 欧美男人的天堂一二区| 91美女片黄在线观看| 国产另类ts人妖一区二区| 蜜桃av一区二区在线观看| 亚洲成人动漫精品| 一区二区三区日本| 综合av第一页| 亚洲天堂网中文字| 成人免费在线观看入口| 亚洲国产精品成人综合| 久久色成人在线| 欧美精品一区二区久久久| 欧美一区二区成人| 欧美一级搡bbbb搡bbbb| 欧美精品久久久久久久多人混战| 91国产福利在线| 欧美性极品少妇| 精品视频在线免费| 在线不卡中文字幕| 91精品国产综合久久久久久漫画 | 日韩国产在线观看一区| 亚洲国产一区二区视频| 亚洲一区二区三区四区在线| 亚洲裸体在线观看| 亚洲激情av在线| 亚洲综合在线免费观看| 洋洋av久久久久久久一区| 亚洲日本青草视频在线怡红院 | 欧美sm极限捆绑bd| 精品久久国产老人久久综合| 欧美成人伊人久久综合网| 久久一留热品黄| 国产日本亚洲高清| 中文字幕日韩欧美一区二区三区| 日韩久久一区二区| 天天色天天操综合| 美腿丝袜亚洲三区| 成人av电影观看| 在线观看视频91| 日韩欧美国产电影| 国产精品素人视频| 亚洲激情自拍视频| 久久国产精品免费| 国产成人在线视频免费播放| 成人午夜看片网址| 欧美日韩一区中文字幕| 日韩一级片网址| 国产精品伦理一区二区| 亚洲视频图片小说| 日韩国产在线观看一区| 国产精品18久久久久久久久| 99久久免费精品高清特色大片| 欧美视频在线一区| 久久综合九色综合欧美98| 亚洲欧洲av一区二区三区久久| 亚洲一区二区精品3399| 国产原创一区二区| 欧美日韩午夜在线视频| 国产亚洲成年网址在线观看| 一区二区三区免费| 国内外成人在线| 欧美私模裸体表演在线观看| 日韩一区二区三区免费观看| 1区2区3区欧美| 久国产精品韩国三级视频| 91麻豆国产精品久久| 日韩精品一区二区三区swag| 亚洲视频一区二区免费在线观看| 久久er精品视频| 欧美日韩在线免费视频| 精品国产乱码久久| 亚洲一区二区欧美| www.亚洲色图| 久久久精品天堂| 丝袜美腿亚洲一区| 成人激情免费网站| 久久久www成人免费毛片麻豆 | 日本不卡123| 91视频免费播放| 久久久精品日韩欧美| av中文字幕不卡| 精品乱人伦小说| 午夜伊人狠狠久久| 91老司机福利 在线| 久久精品视频一区二区| 麻豆精品在线播放| 51精品久久久久久久蜜臀| 亚洲综合一区二区三区| 播五月开心婷婷综合| 欧美激情综合在线| 国产一本一道久久香蕉| 日韩欧美国产一二三区| 日韩黄色小视频| 欧美久久久久久久久久| 亚洲一卡二卡三卡四卡五卡| 色国产精品一区在线观看| 国产精品美女久久久久久久 | 国产视频一区不卡| 九九在线精品视频| 精品国产成人在线影院| 日本不卡高清视频| 日韩欧美国产一区在线观看| 日本亚洲三级在线| 欧美一二区视频| 黄色资源网久久资源365| 欧美大片一区二区| 激情综合网激情| 欧美激情一区二区|