⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usrmotintf.h

📁 Source code for an Numeric Cmputer
💻 H
字号:
/********************************************************************* Description: usrmotintf.h*   Decls for interface functions (init, exit, read, write) for user*   processes which communicate with the real-time motion controller*   in emcmot.c**   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.14 $* $Author: jmkasunich $* $Date: 2005/11/24 03:41:39 $********************************************************************/#ifndef USRMOTINTF_H#define USRMOTINTF_H#include "motion.h"		/* emcmot_status_t,CMD */#ifdef __cplusplusextern "C" {#endif/* usrmotIniLoad() loads params (SHMEM_KEY) from   named ini file */    extern int usrmotIniLoad(const char *file);/* usrmotReadEmcmotStatus() gets the status info out of   the emcmot controller and puts it in arg */    extern int usrmotReadEmcmotStatus(emcmot_status_t * s);/* usrmotReadEmcmotConfig() gets the config info out of   the emcmot controller and puts it in arg */    extern int usrmotReadEmcmotConfig(emcmot_config_t * s);/* usrmotReadEmcmotDebug() gets the debug info out of   the emcmot controller and puts it in arg */    extern int usrmotReadEmcmotDebug(emcmot_debug_t * s);/* usrmotReadEmcmotError() gets the earliest queued error string out of   the emcmot controller and puts it in arg */    extern int usrmotReadEmcmotError(char *e);/* usrmotPrintEmcmotStatus() prints the status in s, using which   arg to select sub-prints */    extern void usrmotPrintEmcmotStatus(emcmot_status_t s, int which);/* usrmotPrintEmcmotConfig() prints the config in s, using which   arg to select sub-prints */    extern void usrmotPrintEmcmotConfig(emcmot_config_t s, int which);/* usrmotPrintEmcmotDebug() prints the debug in s, using which   arg to select sub-prints */    extern void usrmotPrintEmcmotDebug(emcmot_debug_t s, int which);/* values returned by usrmotWriteEmcmotCommand; negative values   are all errors */#define EMCMOT_COMM_OK 0	/* went through and honored */#define EMCMOT_COMM_ERROR_CONNECT -1	/* can't even connect */#define EMCMOT_COMM_ERROR_TIMEOUT -2	/* connected, but send timeout */#define EMCMOT_COMM_ERROR_COMMAND -3	/* sent, but can't run command now */#define EMCMOT_COMM_SPLIT_READ_TIMEOUT -4	/* can't read without split *//* usrmotWriteEmcmotCommand() writes the command to the emcmot process.   Return values are as per the #defines above */    extern int usrmotWriteEmcmotCommand(emcmot_command_t * c);/* usrmotInit() initializes communication with the emcmot process */    extern int usrmotInit(char *name);/* usrmotExit() terminates communication with the emcmot process */    extern int usrmotExit(void);/* usrmotLoadComp() loads the compensation data in file into the axis */    extern int usrmotLoadComp(int axis, const char *file);/* usrmotAlter() loads the alter value to modify the axis position */    extern int usrmotAlter(int axis, double alter);/* usrmotQueryAlter() sets the alter ptr to the current alter value */    extern int usrmotQueryAlter(int axis, double *alter);/* usrmotPrintComp() prints the axis compensation data for axis */    extern int usrmotPrintComp(int axis);    extern int usrmotSetIOWriteCount(unsigned short int count);    extern int usrmotSetIOReadCount(unsigned short int count);    extern int usrmotWriteIO(int index, unsigned char val);    extern unsigned char usrmotReadIO(int index);#ifdef __cplusplus}#endif#endif				/* USRMOTINTF_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -