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

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

?? taskintf.cc

?? Source code for an Numeric Cmputer
?? CC
?? 第 1 頁 / 共 3 頁
字號:
/********************************************************************* Description: taskintf.cc*   Interface functions for motion.**   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.37 $* $Author: cradek $* $Date: 2006/03/21 02:42:31 $********************************************************************/#include <math.h>		// isnan()#include <float.h>		// DBL_MAX#include <string.h>		// memcpy() strncpy()#include "usrmotintf.h"		// usrmotInit(), usrmotReadEmcmotStatus(),				// etc.#include "motion.h"		// emcmot_command_t,STATUS, etc.#include "emcglb.h"		// EMC_INIFILE#include "iniaxis.hh"#include "initraj.hh"/* define this to catch isnan errors, for rtlinux FPU register    problem testing */#define ISNAN_TRAP// MOTION INTERFACE/*! \todo FIXME - this decl was originally much later in the file, movedhere temporarily for debugging */static emcmot_status_t emcmotStatus;/*  Implementation notes:  Initing:  the emcmot interface needs to be inited once, but nml_traj_init()  and nml_servo_init() can be called in any order. Similarly, the emcmot  interface needs to be exited once, but nml_traj_exit() and nml_servo_exit()  can be called in any order. They can also be called multiple times. Flags  are used to signify if initing has been done, or if the final exit has  been called.  */static emcmot_command_t emcmotCommand;static int emcmotTrajInited = 0;	// non-zero means traj called initstatic int emcmotAxisInited[EMCMOT_MAX_AXIS] = { 0 };	// non-zero means axis called init__attribute__ ((unused))static int emcmotIoInited = 0;	// non-zero means io called initstatic int emcmotion_initialized = 0;	// non-zero means both						// emcMotionInit called.// saved value of velocity last sent out, so we don't send redundant requests// used by emcTrajSetVelocity(), emcMotionAbort()static double lastVel = -1.0;static double last_ini_maxvel = -1.0;// EMC_AXIS functions// local status data, not provided by emcmotstatic unsigned long localMotionHeartbeat = 0;static int localMotionCommandType = 0;static int localMotionEchoSerialNumber = 0;static unsigned char localEmcAxisAxisType[EMCMOT_MAX_AXIS];static double localEmcAxisUnits[EMCMOT_MAX_AXIS];static double localEmcMaxAcceleration = DBL_MAX;// axes are numbered 0..NUM-1/*  In emcmot, we need to set the cycle time for traj, and the interpolation  rate, in any order, but both need to be done.  */int emcAxisSetAxis(int axis, unsigned char axisType){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    localEmcAxisAxisType[axis] = axisType;    return 0;}int emcAxisSetUnits(int axis, double units){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    localEmcAxisUnits[axis] = units;    return 0;}/*! \todo Another #if 0 */#if 0int emcAxisSetGains(int axis, double p, double i, double d,		    double ff0, double ff1, double ff2,		    double bias, double maxError, double deadband){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_PID;    emcmotCommand.axis = axis;    emcmotCommand.pid.p = p;    emcmotCommand.pid.i = i;    emcmotCommand.pid.d = d;    emcmotCommand.pid.ff0 = ff0;    emcmotCommand.pid.ff1 = ff1;    emcmotCommand.pid.ff2 = ff2;    emcmotCommand.pid.bias = bias;    emcmotCommand.pid.maxError = maxError;    emcmotCommand.pid.deadband = deadband;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.pid.p) ||	isnan(emcmotCommand.pid.i) ||	isnan(emcmotCommand.pid.d) ||	isnan(emcmotCommand.pid.ff0) ||	isnan(emcmotCommand.pid.ff1) ||	isnan(emcmotCommand.pid.ff2) ||	isnan(emcmotCommand.pid.bias) ||	isnan(emcmotCommand.pid.maxError) ||	isnan(emcmotCommand.pid.deadband)) {	printf("isnan error in emcAxisSetGains\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}#endifint emcAxisSetBacklash(int axis, double backlash){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_BACKLASH;    emcmotCommand.axis = axis;    emcmotCommand.backlash = backlash;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.backlash)) {	printf("isnan error in emcAxisSetBacklash\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}/*! \todo Another #if 0 */#if 0int emcAxisSetCycleTime(int axis, double cycleTime){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    if (cycleTime <= 0.0) {	return -1;    }    emcmotCommand.command = EMCMOT_SET_SERVO_CYCLE_TIME;    emcmotCommand.cycleTime = cycleTime;    return usrmotWriteEmcmotCommand(&emcmotCommand);}int emcAxisSetInputScale(int axis, double scale, double offset){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_INPUT_SCALE;    emcmotCommand.axis = axis;    emcmotCommand.scale = scale;    emcmotCommand.offset = offset;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.scale) || isnan(emcmotCommand.offset)) {	printf("isnan eror in emcAxisSetInputScale\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}int emcAxisSetOutputScale(int axis, double scale, double offset){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_OUTPUT_SCALE;    emcmotCommand.axis = axis;    emcmotCommand.scale = scale;    emcmotCommand.offset = offset;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.scale) || isnan(emcmotCommand.offset)) {	printf("isnan eror in emcAxisSetOutputScale\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}#endif				/* #if 0 */// saved values of limits, since emcmot expects them to be set in// pairs and we set them individually.static double saveMinLimit[EMCMOT_MAX_AXIS];static double saveMaxLimit[EMCMOT_MAX_AXIS];int emcAxisSetMinPositionLimit(int axis, double limit){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_POSITION_LIMITS;    emcmotCommand.axis = axis;    emcmotCommand.maxLimit = saveMaxLimit[axis];    emcmotCommand.minLimit = limit;    saveMinLimit[axis] = limit;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.maxLimit) || isnan(emcmotCommand.minLimit)) {	printf("isnan error in emcAxisSetMinPosition\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}int emcAxisSetMaxPositionLimit(int axis, double limit){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_POSITION_LIMITS;    emcmotCommand.axis = axis;    emcmotCommand.minLimit = saveMinLimit[axis];    emcmotCommand.maxLimit = limit;    saveMaxLimit[axis] = limit;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.maxLimit) || isnan(emcmotCommand.minLimit)) {	printf("isnan error in emcAxisSetMaxPosition\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}/*! \todo Another #if 0 */#if 0// saved values of limits, since emcmot expects them to be set in// pairs and we set them individually.static double saveMinOutput[EMCMOT_MAX_AXIS];static double saveMaxOutput[EMCMOT_MAX_AXIS];int emcAxisSetMinOutputLimit(int axis, double limit){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_OUTPUT_LIMITS;    emcmotCommand.axis = axis;    emcmotCommand.maxLimit = saveMaxOutput[axis];    emcmotCommand.minLimit = limit;    saveMinOutput[axis] = limit;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.maxLimit) || isnan(emcmotCommand.minLimit)) {	printf("isnan error in emcAxisSetMinOutputLimit\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}int emcAxisSetMaxOutputLimit(int axis, double limit){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_OUTPUT_LIMITS;    emcmotCommand.axis = axis;    emcmotCommand.minLimit = saveMinOutput[axis];    emcmotCommand.maxLimit = limit;    saveMaxOutput[axis] = limit;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.maxLimit) || isnan(emcmotCommand.minLimit)) {	printf("isnan error in emcAxisSetMaxOutputLimit\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}#endifint emcAxisSetFerror(int axis, double ferror){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_MAX_FERROR;    emcmotCommand.axis = axis;    emcmotCommand.maxFerror = ferror;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.maxFerror)) {	printf("isnan error in emcAxisSetFerror\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}int emcAxisSetMinFerror(int axis, double ferror){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_MIN_FERROR;    emcmotCommand.axis = axis;    emcmotCommand.minFerror = ferror;#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.minFerror)) {	printf("isnan error in emcAxisSetMinFerror\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}int emcAxisSetHomingParams(int axis, double home, double offset,			   double search_vel, double latch_vel,			   int use_index, int ignore_limits){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_HOMING_PARAMS;    emcmotCommand.axis = axis;    emcmotCommand.home = home;    emcmotCommand.offset = offset;    emcmotCommand.search_vel = search_vel;    emcmotCommand.latch_vel = latch_vel;    emcmotCommand.flags = 0;    if (use_index) {	emcmotCommand.flags |= HOME_USE_INDEX;    }    if (ignore_limits) {	emcmotCommand.flags |= HOME_IGNORE_LIMITS;    }#ifdef ISNAN_TRAP    if (isnan(emcmotCommand.home) ||	isnan(emcmotCommand.offset) ||	isnan(emcmotCommand.search_vel) ||	isnan(emcmotCommand.latch_vel)) {	printf("isnan error in emcAxisSetHoming\n");	return -1;    }#endif    return usrmotWriteEmcmotCommand(&emcmotCommand);}/*! \todo Another #if 0 */#if 0/*! \todo FIXME - to be deleted eventually, these are configured thru HAL */int emcAxisSetStepParams(int axis, double setup_time, double hold_time){    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    emcmotCommand.command = EMCMOT_SET_STEP_PARAMS;    emcmotCommand.axis = axis;    emcmotCommand.setup_time = setup_time;    emcmotCommand.hold_time = hold_time;    return usrmotWriteEmcmotCommand(&emcmotCommand);}#endifint emcAxisSetMaxVelocity(int axis, double vel){    if (axis < 0 || axis >= EMC_AXIS_MAX) {	return 0;    }    if (vel < 0.0) {	vel = 0.0;    }    AXIS_MAX_VELOCITY[axis] = vel;    emcmotCommand.command = EMCMOT_SET_JOINT_VEL_LIMIT;    emcmotCommand.axis = axis;    emcmotCommand.vel = vel;    return usrmotWriteEmcmotCommand(&emcmotCommand);}int emcAxisSetMaxAcceleration(int axis, double acc){    if (axis < 0 || axis >= EMC_AXIS_MAX) {	return 0;    }    if (acc < 0.0) {	acc = 0.0;    }    AXIS_MAX_ACCELERATION[axis] = acc;    emcmotCommand.command = EMCMOT_SET_JOINT_ACC_LIMIT;    emcmotCommand.axis = axis;    emcmotCommand.acc = acc;    return usrmotWriteEmcmotCommand(&emcmotCommand);}/* This function checks to see if any axis or the traj has   been inited already.  At startup, if none have been inited,   usrmotIniLoad and usrmotInit must be called first.  At   shutdown, after all have been halted, the usrmotExit must   be called.*/static int AxisOrTrajInited(void){    int axis;    for (axis = 0; axis < EMCMOT_MAX_AXIS; axis++) {	if (emcmotAxisInited[axis]) {	    return 1;	}    }    if (emcmotTrajInited) {	return 1;    }    return 0;}int emcAxisInit(int axis){    int retval = 0;    if (axis < 0 || axis >= EMCMOT_MAX_AXIS) {	return 0;    }    // init emcmot interface    if (!AxisOrTrajInited()) {	usrmotIniLoad(EMC_INIFILE);	if (0 != usrmotInit("emc2_task")) {	    return -1;	}    }    emcmotAxisInited[axis] = 1;    if (0 != iniAxis(axis, EMC_INIFILE)) {	retval = -1;    }    return retval;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
人人爽香蕉精品| 国产精品人成在线观看免费| 日韩一区二区三| 国产日韩精品一区| 日韩电影在线观看电影| 成人中文字幕电影| 日日摸夜夜添夜夜添亚洲女人| 日韩一级大片在线| 亚洲精品免费看| 国产精品1024久久| 欧美一级理论性理论a| 一区二区三区鲁丝不卡| 国产成人免费在线| 精品第一国产综合精品aⅴ| 一区二区三区色| 99精品视频一区| 国产欧美一区二区三区在线看蜜臀| 调教+趴+乳夹+国产+精品| 99精品国产视频| 欧美激情一区二区三区在线| 91国偷自产一区二区三区观看| 久久99精品久久久| 在线综合视频播放| 亚洲福利一二三区| 色狠狠桃花综合| 最新欧美精品一区二区三区| 国产不卡在线一区| 久久久久久黄色| 国产精品资源网站| 337p日本欧洲亚洲大胆色噜噜| 日韩国产高清在线| 69堂成人精品免费视频| 午夜精品久久久久影视| 欧美日韩一区二区三区不卡| 亚洲综合激情另类小说区| 亚洲色图19p| 色88888久久久久久影院野外 | 欧美熟乱第一页| 亚洲视频精选在线| 亚洲精品一二三| 色综合咪咪久久| 亚洲一区二区影院| 欧美三级视频在线| 婷婷中文字幕一区三区| 欧美一级欧美三级| 国产一区二区精品在线观看| 国产亚洲精品bt天堂精选| 成人午夜激情在线| 亚洲精品乱码久久久久久黑人| 在线观看欧美黄色| 秋霞午夜鲁丝一区二区老狼| 欧美精品一区二区三区蜜臀| 欧美手机在线视频| 亚洲天堂av老司机| 欧美午夜不卡视频| 蜜臀久久99精品久久久画质超高清| 日韩三级视频在线看| 国产成人夜色高潮福利影视| 最新国产精品久久精品| 欧美午夜精品一区二区三区| 日本va欧美va精品发布| 国产亚洲精久久久久久| 色八戒一区二区三区| 久久精品久久99精品久久| 国产精品色哟哟网站| 欧美日韩中文另类| 国产精品一区免费在线观看| 亚洲欧美日韩在线| 日韩精品中文字幕在线不卡尤物 | 久久先锋影音av鲁色资源网| 色哦色哦哦色天天综合| 日韩国产在线观看| 国产精品国模大尺度视频| 欧美日韩在线三区| 国产精品夜夜嗨| 亚洲电影第三页| 国产三级一区二区| 欧美日韩精品免费观看视频| 国产成人午夜99999| 亚洲超丰满肉感bbw| 国产精品久久久久桃色tv| 在线播放亚洲一区| 91丝袜高跟美女视频| 欧洲亚洲国产日韩| 亚洲日本在线看| 久久一区二区三区四区| 欧美午夜精品一区| av电影天堂一区二区在线观看| 日韩精品国产精品| 一区二区三区四区激情| 国产亚洲精品aa午夜观看| 日韩免费看的电影| 欧美特级限制片免费在线观看| 成人综合婷婷国产精品久久免费| 美国欧美日韩国产在线播放| 亚洲午夜av在线| 亚洲人成伊人成综合网小说| 国产午夜亚洲精品理论片色戒| 欧美一区日本一区韩国一区| 在线一区二区三区| 91麻豆.com| 99久久精品国产导航| 国产91丝袜在线18| 国产精品456露脸| 精品亚洲免费视频| 另类欧美日韩国产在线| 午夜av电影一区| 性感美女极品91精品| 亚洲一区二区三区四区在线| 亚洲影院在线观看| 成人av动漫在线| 国产成人av一区二区三区在线| 久久99国内精品| 美女被吸乳得到大胸91| 麻豆国产91在线播放| 美美哒免费高清在线观看视频一区二区| 欧美日韩大陆在线| 欧美巨大另类极品videosbest | 国产一区二区女| 久久69国产一区二区蜜臀| 日本sm残虐另类| 国产一区二区伦理片| 国产乱码精品一区二区三区忘忧草| 国产在线不卡一区| 国产成人免费网站| 91看片淫黄大片一级在线观看| 99视频精品在线| 91免费版在线看| 欧美日韩亚洲综合一区二区三区| 在线观看网站黄不卡| 欧美唯美清纯偷拍| 欧美一区二区不卡视频| 久久人人爽人人爽| 国产精品传媒入口麻豆| 亚洲精品高清在线观看| 天天av天天翘天天综合网 | 欧美日韩精品一区二区| 欧美伦理电影网| 精品免费日韩av| 国产欧美日韩三区| 一区二区三区在线播| 亚洲不卡一区二区三区| 极品瑜伽女神91| 99精品久久免费看蜜臀剧情介绍| 欧美亚洲动漫精品| 欧美变态口味重另类| 国产精品电影院| 午夜精品一区二区三区三上悠亚| 日产国产欧美视频一区精品| 国产精品乱人伦| 亚洲大片免费看| 国产精品一区专区| 欧美性做爰猛烈叫床潮| 欧美成人伊人久久综合网| 国产精品久久久久久亚洲毛片 | 在线亚洲+欧美+日本专区| 欧美精品乱码久久久久久按摩| 久久这里只有精品首页| 亚洲乱码精品一二三四区日韩在线| 日韩黄色小视频| 成人国产视频在线观看| 6080午夜不卡| 亚洲天堂av一区| 国模娜娜一区二区三区| 欧美中文字幕不卡| 国产日本欧美一区二区| 无吗不卡中文字幕| 成人精品一区二区三区四区| 欧美一级日韩一级| 99久久久久免费精品国产| 欧美本精品男人aⅴ天堂| 一区二区三区加勒比av| 国产盗摄女厕一区二区三区| 欧美日韩国产在线播放网站| 国产精品美女久久久久aⅴ国产馆| 日韩精品一二区| 91国偷自产一区二区开放时间 | 亚洲一区二区三区四区的| 久久精品国产久精国产爱| 91久久精品网| 国产精品久久久久永久免费观看 | 色婷婷亚洲精品| 亚洲免费av在线| 国产精品乱码一区二三区小蝌蚪| 麻豆精品国产91久久久久久| 欧美在线小视频| 国产精品电影院| 成人深夜视频在线观看| 欧美成人伊人久久综合网| 日韩国产在线观看| 欧美久久一区二区| 亚洲线精品一区二区三区| 99久久综合狠狠综合久久| 国产三级精品三级在线专区| 狠狠色丁香婷婷综合| 精品日本一线二线三线不卡| 日本不卡1234视频| 久久精工是国产品牌吗| 91精品免费在线| 青青草国产成人av片免费|