亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
日韩国产在线观看一区| 国产精品免费久久| 日韩av在线播放中文字幕| 制服丝袜中文字幕一区| 蜜臀av亚洲一区中文字幕| 欧美一区二区观看视频| 久久99精品视频| 国产清纯白嫩初高生在线观看91 | 午夜精品免费在线| 欧美精品久久一区| 激情文学综合插| 国产亚洲精品aa| 91影视在线播放| 香蕉久久夜色精品国产使用方法 | 99re热这里只有精品视频| 亚洲欧美在线观看| 欧美喷潮久久久xxxxx| 激情文学综合网| 国产精品国产自产拍高清av王其| 91麻豆精东视频| 五月激情六月综合| 国产性做久久久久久| 色先锋资源久久综合| 日韩av网站免费在线| 国产欧美一区视频| 中文字幕一区二区三区精华液| 色先锋资源久久综合| 美国十次综合导航| 中文字幕亚洲综合久久菠萝蜜| 欧美日韩中文一区| 国产精品18久久久久久久久久久久 | 成人中文字幕合集| 日韩精品久久理论片| 国产精品久久久久久久久免费丝袜| 欧美三片在线视频观看| 国产美女精品在线| 日韩综合小视频| 亚洲欧洲日韩女同| 精品国产一区二区三区av性色| 91小视频免费观看| 韩国一区二区在线观看| 亚洲一级二级在线| 国产精品国产自产拍高清av王其| 欧美一三区三区四区免费在线看 | 国产一区999| 三级久久三级久久久| 国产精品久久久久国产精品日日| 7777精品伊人久久久大香线蕉的| 91视频精品在这里| 国产精品99久久久久久久vr| 日本亚洲欧美天堂免费| 一区二区三区日韩欧美| 国产欧美综合在线观看第十页| 91精品国产黑色紧身裤美女| 91国内精品野花午夜精品| 国产成人午夜精品影院观看视频 | 国产最新精品精品你懂的| 午夜久久久影院| 亚洲精品乱码久久久久久| 亚洲国产精品精华液2区45| 欧美xxx久久| 欧美一级午夜免费电影| 欧美久久高跟鞋激| 在线观看欧美精品| 色欧美日韩亚洲| 99re成人精品视频| 91免费观看在线| a4yy欧美一区二区三区| 成人综合婷婷国产精品久久| 国产一区不卡视频| 国产成人av网站| 菠萝蜜视频在线观看一区| 国产成人精品网址| 成人午夜激情片| 99re8在线精品视频免费播放| 成人sese在线| 色悠久久久久综合欧美99| 欧美性大战xxxxx久久久| 欧美在线综合视频| 欧美日本在线看| 91精品国产乱码久久蜜臀| 日韩三级在线免费观看| 欧美成人a视频| 久久精品人人做人人爽人人| 久久久精品天堂| 国产精品情趣视频| 亚洲人成网站色在线观看| 亚洲伦理在线免费看| 伊人夜夜躁av伊人久久| 亚洲午夜电影在线| 日本成人在线电影网| 激情六月婷婷综合| 成人自拍视频在线| 精品视频一区 二区 三区| 91麻豆精品91久久久久久清纯 | 国产喷白浆一区二区三区| 国产精品成人免费在线| 亚洲免费在线电影| 日本免费新一区视频| 国产精品77777| 91传媒视频在线播放| 日韩欧美激情一区| 国产精品美女久久久久久2018 | 日韩欧美激情在线| 国产精品第一页第二页第三页| 亚洲午夜久久久久久久久电影网 | 亚洲国产va精品久久久不卡综合| 秋霞午夜av一区二区三区| 国产精品99久久久久久久vr| 91一区二区三区在线观看| 91精品午夜视频| 日本一区二区综合亚洲| 亚洲一区二区不卡免费| 国产精品系列在线观看| 欧美视频精品在线观看| 国产婷婷色一区二区三区四区 | 色综合中文字幕| 日韩欧美自拍偷拍| 中文字幕一区二区日韩精品绯色| 丝袜美腿亚洲综合| 成人av午夜电影| 91精品国产欧美日韩| 中文字幕在线观看不卡| 久久精品av麻豆的观看方式| 色偷偷久久人人79超碰人人澡 | 欧美高清在线视频| 奇米影视一区二区三区| 色久优优欧美色久优优| 国产日韩视频一区二区三区| 午夜精品久久久久| 91亚洲午夜精品久久久久久| 精品精品国产高清a毛片牛牛 | 欧美tickling挠脚心丨vk| 亚洲最色的网站| 成人免费av在线| 精品国产乱码久久| 性做久久久久久免费观看| 成人久久视频在线观看| 欧美sm极限捆绑bd| 香蕉加勒比综合久久| 一本到高清视频免费精品| 国产欧美一区二区三区在线看蜜臀 | 日本丶国产丶欧美色综合| www久久精品| 麻豆精品视频在线观看视频| 色吊一区二区三区| 自拍偷自拍亚洲精品播放| 成人少妇影院yyyy| 久久久久久久电影| 国产原创一区二区| 日韩三级在线观看| 免费xxxx性欧美18vr| 欧美日韩国产高清一区二区三区| 亚洲男人的天堂网| 色综合久久久久综合体桃花网| 国产精品区一区二区三| 国产精品一二一区| 久久久久久毛片| 国产电影精品久久禁18| 久久久久久9999| 国产一区二区三区高清播放| 欧美va在线播放| 激情综合色播激情啊| 日韩欧美在线123| 麻豆91免费观看| 日韩精品在线网站| 国产精品伊人色| 国产日韩影视精品| 99久久免费国产| 亚洲蜜臀av乱码久久精品蜜桃| 91蝌蚪porny| 亚洲一区二区黄色| 欧美日韩精品一区二区三区蜜桃 | 欧美日韩久久久| 日本色综合中文字幕| 精品久久国产老人久久综合| 精品一区二区三区的国产在线播放| 日韩精品一区二区三区swag | 国产精品国产三级国产普通话99 | 日韩不卡一区二区三区| 日韩久久精品一区| 国产不卡视频一区二区三区| 国产精品传媒视频| 欧美亚洲尤物久久| 日本亚洲天堂网| 国产亚洲欧美一区在线观看| 成人不卡免费av| 亚洲一线二线三线视频| 在线成人午夜影院| 国产一区不卡在线| 亚洲精品乱码久久久久久久久| 欧美人妇做爰xxxⅹ性高电影| 毛片av中文字幕一区二区| 久久精品欧美日韩精品 | 日本女优在线视频一区二区| ww亚洲ww在线观看国产| 91亚洲精品久久久蜜桃| 亚洲国产精品嫩草影院| 欧美精品一区二区三区视频| 97精品久久久午夜一区二区三区|