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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? iocontrol.cc

?? CNC 的開(kāi)放碼,EMC2 V2.2.8版
?? CC
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/********************************************************************* Description: IoControl.cc*           Simply accepts NML messages sent to the IO controller*           outputs those to a HAL pin,*           and sends back a "Done" message.***  ENABLE logic:  this module exports three HAL pins related to ENABLE.*  The first is emc-enable-in.  It is an input from the HAL, when FALSE,*  EMC will go into the STOPPED state (regardless of the state of*  the other two pins).  When it goes TRUE, EMC will go into the*  ESTOP_RESET state (also known as READY).**  The second HAL pin is an output to the HAL.  It is controlled by*  the NML messages ESTOP_ON and ESTOP_OFF, which normally result from*  user actions at the GUI.  For the simplest system, loop user-enable-out *  back to emc-enable-in in the HAL.  The GUI controls user-enable-out, and EMC*  responds to that once it is looped back.**  If external ESTOP inputs are desired, they can be*  used in a classicladder rung, in series with user-enable-out.*  It will look like this:**  -----|UEO|-----|EEST|--+--|EEI|--+--(EEI)----*                         |         |*                         +--|URE|--+*  UEO=user-enable-out*  EEST=external ESTOP circuitry*  EEI=machine is enabled*  URE=user request enable**  This will work like this: EMC will be enabled (by EEI, emc-enabled-in),*  only if UEO, EEST and EEI are closed. *  If any of UEO (user requested stop) or EEST (external estop) have been*  opened, then EEI will open aswell.*  After restoring normal condition (UEO and EEST closed), an aditional*  URE (user-request-enable) is needed, this is either sent by the GUI*  (using the EMC_AUX_ESTOP_RESET NML message), or by a hardware button*  connected to the ladder driving URE.**  NML messages are sent usually from the user hitting F1 on the GUI.*  *   Derived from a work by Fred Proctor & Will Shackleford** Author:* License: GPL Version 2* System: Linux*    * Copyright (c) 2004 All rights reserved.** Last change: * $Revision: 1.45 $* $Author: cradek $* $Date: 2007/06/16 16:04:02 $********************************************************************/#include <stdio.h>#include <string.h>#include <stdlib.h>#include <signal.h>#include "hal.h"		/* access to HAL functions/definitions */#include "rtapi.h"		/* rtapi_print_msg */#include "rcs.hh"		/* RCS_CMD_CHANNEL */#include "emc.hh"		/* EMC NML */#include "emc_nml.hh"#include "emcglb.h"		/* EMC_NMLFILE, EMC_INIFILE, TOOL_TABLE_FILE */#include "inifile.hh"		/* INIFILE */#include "initool.hh"		/* iniTool() */#include "nml_oi.hh"#include "timer.hh"#include "rcs_print.hh"static RCS_CMD_CHANNEL *emcioCommandBuffer = 0;static RCS_CMD_MSG *emcioCommand = 0;static RCS_STAT_CHANNEL *emcioStatusBuffer = 0;static EMC_IO_STAT emcioStatus;static NML *emcErrorBuffer = 0;struct iocontrol_str {    hal_bit_t *user_enable_out;	/* output, TRUE when EMC wants stop */    hal_bit_t *emc_enable_in;	/* input, TRUE on any external stop */    hal_bit_t *user_request_enable;	/* output, used to reset ENABLE latch */    hal_bit_t *coolant_mist;	/* coolant mist output pin */    hal_bit_t *coolant_flood;	/* coolant flood output pin */    hal_bit_t *lube;		/* lube output pin */    hal_bit_t *lube_level;	/* lube level input pin */    // the following pins are needed for toolchanging    //tool-prepare    hal_bit_t *tool_prepare;	/* output, pin that notifies HAL it needs to prepare a tool */    hal_s32_t *tool_prep_number;/* output, pin that holds the tool number to be prepared, only valid when tool-prepare=TRUE */    hal_s32_t *tool_number;     /* output, pin that holds the tool number currently in the spindle */    hal_bit_t *tool_prepared;	/* input, pin that notifies that the tool has been prepared */    //tool-change    hal_bit_t *tool_change;	/* output, notifies a tool-change should happen (emc should be in the tool-change position) */    hal_bit_t *tool_changed;	/* input, notifies tool has been changed */    // note: spindle control has been moved to motion} * iocontrol_data;			//pointer to the HAL-struct//static iocontrol_struct *iocontrol_data;	static int comp_id;				/* component ID *//********************************************************************** Description: emcIoNmlGet()*		Attempts to connect to NML buffers and set the relevant*		pointers.** Return Value: Zero on success or -1 if can not connect to a buffer.** Side Effects: None.** Called By: main()*********************************************************************/static int emcIoNmlGet(){    int retval = 0;    /* Try to connect to EMC IO command buffer */    if (emcioCommandBuffer == 0) {	emcioCommandBuffer =	    new RCS_CMD_CHANNEL(emcFormat, "toolCmd", "tool", EMC_NMLFILE);	if (!emcioCommandBuffer->valid()) {	    rtapi_print_msg(RTAPI_MSG_ERR,			    "emcToolCmd buffer not available\n");	    delete emcioCommandBuffer;	    emcioCommandBuffer = 0;	    retval = -1;	} else {	    /* Get our command data structure */	    emcioCommand = emcioCommandBuffer->get_address();	}    }    /* try to connect to EMC IO status buffer */    if (emcioStatusBuffer == 0) {	emcioStatusBuffer =	    new RCS_STAT_CHANNEL(emcFormat, "toolSts", "tool",				 EMC_NMLFILE);	if (!emcioStatusBuffer->valid()) {	    rtapi_print_msg(RTAPI_MSG_ERR,			    "toolSts buffer not available\n");	    delete emcioStatusBuffer;	    emcioStatusBuffer = 0;	    retval = -1;	} else {	    /* initialize and write status */	    emcioStatus.heartbeat = 0;	    emcioStatus.command_type = 0;	    emcioStatus.echo_serial_number = 0;	    emcioStatus.status = RCS_DONE;	    emcioStatusBuffer->write(&emcioStatus);	}    }    /* try to connect to EMC error buffer */    if (emcErrorBuffer == 0) {	emcErrorBuffer =	    new NML(nmlErrorFormat, "emcError", "tool", EMC_NMLFILE);	if (!emcErrorBuffer->valid()) {	    rtapi_print_msg(RTAPI_MSG_ERR,			    "emcError buffer not available\n");	    delete emcErrorBuffer;	    emcErrorBuffer = 0;	    retval = -1;	}    }    return retval;}static int iniLoad(const char *filename){    IniFile inifile;    const char *inistring;    char version[LINELEN], machine[LINELEN];    /* Open the ini file */    if (inifile.Open(filename) == false) {	return -1;    }    if (NULL != (inistring = inifile.Find("DEBUG", "EMC"))) {	/* copy to global */	if (1 != sscanf(inistring, "%i", &EMC_DEBUG)) {	    EMC_DEBUG = 0;	}    } else {	/* not found, use default */	EMC_DEBUG = 0;    }    if (EMC_DEBUG & EMC_DEBUG_VERSIONS) {	if (NULL != (inistring = inifile.Find("VERSION", "EMC"))) {	    if(sscanf(inistring, "$Revision: %s", version) != 1) {		strncpy(version, "unknown", LINELEN-1);	    }	} else {	    strncpy(version, "unknown", LINELEN-1);	}	if (NULL != (inistring = inifile.Find("MACHINE", "EMC"))) {	    strncpy(machine, inistring, LINELEN-1);	} else {	    strncpy(machine, "unknown", LINELEN-1);	}	rtapi_print("iocontrol: machine: '%s'  version '%s'\n", machine, version);    }    if (NULL != (inistring = inifile.Find("NML_FILE", "EMC"))) {	strcpy(EMC_NMLFILE, inistring);    } else {	// not found, use default    }    double temp;    temp = EMC_IO_CYCLE_TIME;    if (NULL != (inistring = inifile.Find("CYCLE_TIME", "EMCIO"))) {	if (1 == sscanf(inistring, "%lf", &EMC_IO_CYCLE_TIME)) {	    // found it	} else {	    // found, but invalid	    EMC_IO_CYCLE_TIME = temp;	    rtapi_print		("invalid [EMCIO] CYCLE_TIME in %s (%s); using default %f\n",		 filename, inistring, EMC_IO_CYCLE_TIME);	}    } else {	// not found, using default	rtapi_print	    ("[EMCIO] CYCLE_TIME not found in %s; using default %f\n",	     filename, EMC_IO_CYCLE_TIME);    }    // close it    inifile.Close();    return 0;}/********************************************************************** Description: loadToolTable(const char *filename, CANON_TOOL_TABLE toolTable[])*		Loads the tool table from file filename into toolTable[] array.*		  Array is CANON_TOOL_MAX + 1 entries, since 0 is included.** Return Value: Zero on success or -1 if file not found.** Side Effects: Default setting used if the parameter not found in*		the ini file.** Called By: main()*********************************************************************/static int loadToolTable(const char *filename,			 CANON_TOOL_TABLE toolTable[]){    int t;    FILE *fp;    char buffer[CANON_TOOL_ENTRY_LEN];    const char *name;    // check filename    if (filename[0] == 0) {	name = TOOL_TABLE_FILE;    } else {	// point to name provided	name = filename;    }    //AJ: for debug reasons    //rtapi_print("loadToolTable called with %s\n", filename);    // open tool table file    if (NULL == (fp = fopen(name, "r"))) {	// can't open file	return -1;    }    // clear out tool table    for (t = 0; t <= CANON_TOOL_MAX; t++) {	// unused tools are 0, 0.0, 0.0	toolTable[t].id = 0;	toolTable[t].zoffset = 0.0;	toolTable[t].diameter = 0.0;        toolTable[t].xoffset = 0.0;        toolTable[t].frontangle = 0.0;        toolTable[t].backangle = 0.0;        toolTable[t].orientation = 0;    }    /*       Override 0's with codes from tool file       File format is:       <header>       <pocket # 0..CANON_TOOL_MAX> <FMS id> <length> <diameter>       ...     */    // read and discard header    if (NULL == fgets(buffer, 256, fp)) {	// nothing in file at all	rtapi_print("IO: toolfile exists, but is empty\n");	fclose(fp);	return -1;    }    while (!feof(fp)) {	int pocket;	int id;	double zoffset;  // AKA length        double xoffset;	double diameter;        double frontangle, backangle;        int orientation;	// just read pocket, ID, and length offset	if (NULL == fgets(buffer, CANON_TOOL_ENTRY_LEN, fp)) {	    break;	}        if (sscanf(buffer, "%d %d %lf %lf %lf %lf %lf %d",                   &pocket, &id, &zoffset, &xoffset, &diameter,                   &frontangle, &backangle, &orientation) == 8) {            if (pocket < 0 || pocket > CANON_TOOL_MAX) {                printf("skipping tool: bad pocket number %d\n", pocket);                continue;            } else {                /* lathe tool */                toolTable[pocket].id = id;                toolTable[pocket].zoffset = zoffset;                toolTable[pocket].xoffset = xoffset;                toolTable[pocket].diameter = diameter;                toolTable[pocket].frontangle = frontangle;                toolTable[pocket].backangle = backangle;                toolTable[pocket].orientation = orientation;            }        } else if (sscanf(buffer, "%d %d %lf %lf",                   &pocket, &id, &zoffset, &diameter) == 4) {            if (pocket < 0 || pocket > CANON_TOOL_MAX) {                printf("skipping tool: bad pocket number %d\n", pocket);                continue;            } else {                /* mill tool */                toolTable[pocket].id = id;                toolTable[pocket].zoffset = zoffset;                toolTable[pocket].diameter = diameter;                // these aren't used on a mill                toolTable[pocket].frontangle = toolTable[pocket].backangle = 0.0;                toolTable[pocket].xoffset = 0.0;                toolTable[pocket].orientation = 0;            }        } else {            /* invalid line. skip it silently */            continue;        }    }    // close the file    fclose(fp);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产区一区| 日韩国产成人精品| 国产精品久久久久久久久免费桃花| 欧美电影免费观看高清完整版在线| 欧美精品xxxxbbbb| 欧美一卡2卡三卡4卡5免费| 欧美日本国产一区| 欧美一区二区成人| 日韩一级欧美一级| 亚洲精品一区二区三区香蕉| 精品精品国产高清a毛片牛牛 | 欧美日本韩国一区| 欧美日韩视频第一区| 欧美精品丝袜久久久中文字幕| 91精品国产综合久久香蕉麻豆| 88在线观看91蜜桃国自产| 日韩一级二级三级| 久久亚洲二区三区| 亚洲欧洲美洲综合色网| 亚洲免费在线电影| 亚洲福中文字幕伊人影院| 五月综合激情婷婷六月色窝| 免费不卡在线视频| 国产精品一级黄| 99久久精品免费看国产免费软件| 色999日韩国产欧美一区二区| 欧美吻胸吃奶大尺度电影| 91精品一区二区三区久久久久久| 欧美mv日韩mv国产网站| 国产精品欧美一级免费| 一区二区三区欧美日韩| 日本精品一级二级| 91精品国产全国免费观看| 欧美不卡一二三| 中文字幕乱码亚洲精品一区| 亚洲男女一区二区三区| 秋霞影院一区二区| 高清国产一区二区三区| 欧美午夜免费电影| 久久婷婷成人综合色| 国产精品国产成人国产三级| 亚洲一卡二卡三卡四卡| 久久69国产一区二区蜜臀| av一本久道久久综合久久鬼色| 欧美日韩国产天堂| 欧美国产激情一区二区三区蜜月| 亚洲午夜一二三区视频| 国产美女精品在线| 欧美日韩在线精品一区二区三区激情| 日韩精品在线一区二区| 国产精品久久免费看| 日韩国产一区二| 99re视频精品| 精品福利av导航| 亚洲综合色丁香婷婷六月图片| 精品一区二区三区免费毛片爱| av亚洲产国偷v产偷v自拍| 91精品国产欧美日韩| 中文字幕一区二区三区四区| 蜜桃精品在线观看| 91黄色免费看| 国产精品色眯眯| 久久国产生活片100| 91搞黄在线观看| 国产三级欧美三级日产三级99| 午夜精品一区在线观看| 成人h动漫精品一区二| 日韩视频免费直播| 亚洲午夜久久久久| 91在线观看高清| 国产视频一区二区在线观看| 日韩avvvv在线播放| 色婷婷av一区二区三区之一色屋| 久久九九99视频| 久久69国产一区二区蜜臀| 欧美日本乱大交xxxxx| 亚洲精品中文在线影院| 国产91精品免费| 日韩欧美亚洲国产精品字幕久久久 | 欧美亚洲国产怡红院影院| 国产女人aaa级久久久级| 免费在线一区观看| 欧美性欧美巨大黑白大战| 中文字幕一区二区三区四区不卡| 国产伦精一区二区三区| 精品欧美乱码久久久久久| 秋霞电影网一区二区| 欧美视频日韩视频在线观看| 亚洲图片另类小说| 北岛玲一区二区三区四区| 欧美激情艳妇裸体舞| 国产精品资源在线| 国产视频一区二区在线| 激情欧美一区二区| 精品剧情在线观看| 男女视频一区二区| 日韩一区二区三免费高清| 日韩和欧美一区二区三区| 欧美专区在线观看一区| 亚洲小说欧美激情另类| 欧美日韩午夜精品| 婷婷开心久久网| 欧美一区二区美女| 麻豆国产精品777777在线| 91精品国产福利| 久久狠狠亚洲综合| 精品国产乱码久久久久久老虎 | 成人国产一区二区三区精品| 国产亚洲欧美色| 风间由美性色一区二区三区| 日本一区二区三区四区在线视频| 国产成人免费在线观看不卡| 国产精品美女一区二区| av在线这里只有精品| 一区二区三区四区乱视频| 欧美体内she精视频| 水蜜桃久久夜色精品一区的特点| 7777精品伊人久久久大香线蕉完整版 | 亚洲中国最大av网站| 欧美三级一区二区| 日本 国产 欧美色综合| 亚洲精品在线三区| 成人小视频在线观看| 综合色中文字幕| 欧美视频完全免费看| 美女网站一区二区| 国产三级精品三级在线专区| 99精品视频中文字幕| 亚洲第一精品在线| 欧美成人官网二区| eeuss鲁一区二区三区| 亚洲成人av电影在线| 亚洲精品一区二区三区福利| www.亚洲色图| 亚洲aaa精品| 久久久久综合网| 色综合久久综合网| 蜜臀精品久久久久久蜜臀 | 久久99国产精品久久99 | 国产裸体歌舞团一区二区| 最新国产の精品合集bt伙计| 欧美丝袜丝交足nylons| 捆绑紧缚一区二区三区视频| 久久精品这里都是精品| 色婷婷综合久久久中文一区二区 | 色综合天天综合在线视频| 丝袜a∨在线一区二区三区不卡 | 日本亚洲欧美天堂免费| 久久精品一区二区三区不卡| 91麻豆免费视频| 精品一区二区三区免费视频| 亚洲免费观看高清完整版在线观看| 欧美日韩国产综合一区二区 | 午夜精品福利一区二区蜜股av| 日韩欧美中文一区二区| 99国产一区二区三精品乱码| 日韩一区精品视频| 国产精品麻豆久久久| 欧美高清视频www夜色资源网| 国产成人免费视| 日韩av电影免费观看高清完整版| 国产精品麻豆网站| 日韩精品一区在线| 欧美三片在线视频观看| 成人小视频在线观看| 日本成人在线视频网站| 亚洲精品高清在线观看| 国产亚洲短视频| 7777精品伊人久久久大香线蕉| 91在线视频18| 国产精品自在欧美一区| 丝袜亚洲另类丝袜在线| 成人欧美一区二区三区| 久久久久久电影| 欧美一卡2卡3卡4卡| 欧美日韩午夜在线| 色狠狠色噜噜噜综合网| 国产91综合一区在线观看| 麻豆一区二区三区| 无吗不卡中文字幕| 亚洲一二三四在线观看| 国产精品国产成人国产三级| 国产亚洲福利社区一区| 欧美成人乱码一区二区三区| 欧美日韩国产123区| 色8久久人人97超碰香蕉987| 不卡欧美aaaaa| 成人综合婷婷国产精品久久免费| 国精产品一区一区三区mba视频 | 成人福利在线看| 国产一区二区三区四| 精品在线一区二区| 麻豆视频观看网址久久| 日韩中文字幕麻豆| 天堂在线一区二区| 亚洲国产成人av| 亚洲一区二区三区小说| 一二三四社区欧美黄| 一区二区三区在线视频观看58| 国产精品久久久久久久久果冻传媒|