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

📄 runtime.h

📁 美国Delta Tau公司PMAC多轴运动控制卡的VC++示例程序
💻 H
📖 第 1 页 / 共 3 页
字号:
typedef BOOL (CALLBACK *DPRAMPENABLED) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRWARNFERROR) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRFATALFERROR) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRAMPFAULT) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRONPOSITIONLIMIT) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRHOMECOMPLETE) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRINPOSITION) ( DWORD dwDevice, int mtr );
typedef double (CALLBACK *DPRGETTARGETPOS) ( DWORD dwDevice, int motor, double posscale );
typedef double (CALLBACK *DPRGETBIASPOS) ( DWORD dwDevice, int motor, double posscale );
typedef long (CALLBACK *DPRTIMEREMINMOVE) ( DWORD dwDevice, int cs );
typedef long (CALLBACK *DPRTIMEREMINTATS) ( DWORD dwDevice, int cs );


// Logical query functions
typedef PROGRAM (CALLBACK *DPRGETPROGRAMMODE) ( DWORD dwDevice, int csn );
typedef MOTIONMODE (CALLBACK *DPRGETMOTIONMODE) ( DWORD dwDevice, int csn );

////////////////////////////////////////////////////////////////////////////
// DPR Control Panel functions
////////////////////////////////////////////////////////////////////////////
typedef BOOL (CALLBACK *DPRCONTROLPANEL) ( DWORD dwDevice, long on );
typedef void (CALLBACK *DPRSETJOGPOSBIT) ( DWORD dwDevice, long motor, long onoff );
typedef long (CALLBACK *DPRGETJOGPOSBIT) ( DWORD dwDevice, long motor );
typedef void (CALLBACK *DPRSETJOGNEGBIT) ( DWORD dwDevice, long motor, long onoff );
typedef long (CALLBACK *DPRGETJOGNEGBIT) ( DWORD dwDevice, long motor );
typedef void (CALLBACK *DPRSETJOGRETURNBIT) ( DWORD dwDevice, long motor, long onoff );
typedef long (CALLBACK *DPRGETJOGRETURNBIT) ( DWORD dwDevice, long motor );
typedef void (CALLBACK *DPRSETRUNBIT) ( DWORD dwDevice, long cs, long onoff );
typedef long (CALLBACK *DPRGETRUNBIT) ( DWORD dwDevice, long cs );
typedef void (CALLBACK *DPRSETSTOPBIT) ( DWORD dwDevice, long cs, long onoff );
typedef long (CALLBACK *DPRGETSTOPBIT) ( DWORD dwDevice, long cs );
typedef void (CALLBACK *DPRSETHOMEBIT) ( DWORD dwDevice, long cs, long onoff );
typedef long (CALLBACK *DPRGETHOMEBIT) ( DWORD dwDevice, long cs );
typedef void (CALLBACK *DPRSETHOLDBIT) ( DWORD dwDevice, long cs, long onoff );
typedef long (CALLBACK *DPRGETHOLDBIT) ( DWORD dwDevice, long cs );
typedef long (CALLBACK *DPRGETSTEPBIT) ( DWORD dwDevice, long cs );
typedef void (CALLBACK *DPRSETSTEPBIT) ( DWORD dwDevice, long cs, long onoff );
typedef long (CALLBACK *DPRGETREQUESTBIT) ( DWORD dwDevice, long mtrcrd );
typedef void (CALLBACK *DPRSETREQUESTBIT) ( DWORD dwDevice, long mtrcrd, long onoff );
typedef long (CALLBACK *DPRGETFOENABLEBIT) ( DWORD dwDevice, long cs );
typedef void (CALLBACK *DPRSETFOENABLEBIT) ( DWORD dwDevice, long cs, long on_off );
typedef void (CALLBACK *DPRSETFOVALUE) ( DWORD dwDevice, long cs, long value );
typedef long (CALLBACK *DPRGETFOVALUE) ( DWORD dwDevice, long cs );


////////////////////////////////////////////////////////////////////////////
// DPR Real Time Data Buffer functions
////////////////////////////////////////////////////////////////////////////
typedef void (CALLBACK *DPRSETHOSTBUSYBIT) ( DWORD dwDevice, int value );
typedef int (CALLBACK *DPRGETHOSTBUSYBIT) ( DWORD dwDevice );
typedef int (CALLBACK *DPRGETPMACBUSYBIT) ( DWORD dwDevice );
typedef int (CALLBACK *DPRGETSERVOTIMER) ( DWORD dwDevice );
typedef void (CALLBACK *DPRSETMOTORS) ( DWORD dwDevice, UINT n );

typedef double (CALLBACK *DPRGETCOMMANDEDPOS) ( DWORD dwDevice, int mtr, double units );
typedef double (CALLBACK *DPRPOSITION) ( DWORD dwDevice, int i, double units );
typedef double (CALLBACK *DPRNETACTUALPOSITION) ( DWORD dwDevice, int mtr, double units );
typedef double (CALLBACK *DPRFOLLOWERROR) ( DWORD dwDevice, int mtr, double units );
typedef double (CALLBACK *DPRGETVEL) ( DWORD dwDevice, int mtr, double units );
typedef void (CALLBACK *DPRGETMASTERPOS) ( DWORD dwDevice, int mtr, double units, double *the_double );
typedef void (CALLBACK *DPRGETCOMPENSATIONPOS) ( DWORD dwDevice, int mtr, double units, double *the_double );

typedef DWORD (CALLBACK *DPRGETPREVDAC) ( DWORD dwDevice, int mtr );
typedef DWORD (CALLBACK *DPRGETMOVETIME) ( DWORD dwDevice, int mtr );

//Gather Time Buffer-Functions pertaining to individual motors
typedef struct ss( CALLBACK *DPRMOTORSERVOSTATUS ) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRDATABLOCK) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRPHASEDMOTOR) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRMOTORENABLED) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRHANDWHEELENABLED) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPROPENLOOP) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRONNEGATIVELIMIT) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *DPRONPOSITIVELIMIT) ( DWORD dwDevice, int mtr );
typedef void (CALLBACK *DPRSETJOGRETURN) ( DWORD dwDevice, int mtr );

// Logical query functions
typedef MOTION (CALLBACK *DPRGETMOTORMOTION) ( DWORD dwDevice, int mtr );

// Functions pertaining to coord systems
typedef BOOL (CALLBACK *DPRMOTIONBUFOPEN) ( DWORD dwDevice );
typedef BOOL (CALLBACK *DPRROTBUFOPEN) ( DWORD dwDevice );
typedef double (CALLBACK *DPRGETFEEDRATEMODE) ( DWORD dwDevice, int csn, BOOL *mode );

// Function pertaining to global
typedef BOOL (CALLBACK *DPRSYSSERVOERROR) ( DWORD dwDevice );
typedef BOOL (CALLBACK *DPRSYSREENTRYERROR) ( DWORD dwDevice );
typedef BOOL (CALLBACK *DPRSYSMEMCHECKSUMERROR) ( DWORD dwDevice );
typedef BOOL (CALLBACK *DPRSYSPROMCHECKSUMERROR) ( DWORD dwDevice );
typedef void (CALLBACK *DPRGETGLOBALSTATUS ) ( DWORD dwDevice,void *);

typedef BOOL (CALLBACK *INTRSETUPMASK) (DWORD dwDevice, ULONG ulMask);
typedef BOOL (CALLBACK *INTRINIT) ( DWORD dwDevice, DWORD dwCallback, DWORD dwFlags,
                             DWORD dwUser, ULONG mask );
typedef BOOL (CALLBACK *INTRTERMINATE) ( DWORD dwDevice );
typedef BOOL (CALLBACK *INTRWNDMSGINIT) ( DWORD dwDevice, HWND hWnd, UINT msg, ULONG ulMask );
typedef DWORD (CALLBACK *INTRTHREADINIT) ( DWORD *dwDev );
typedef BOOL (CALLBACK *INTRFUNCCALLINIT) ( DWORD dwDevice, PMACINTRPROC pFunc, DWORD msg, ULONG ulMask );

typedef VOID( CALLBACK *INTRCALLBACK ) ( DWORD dwDevice );
typedef VOID (CALLBACK *INTRQUEUE) ( DWORD dwDevice, DWORD dwEvent );
typedef VOID (CALLBACK *INTRCOMPLETE) ( DWORD dwDevice, DWORD dwEvent );
typedef BOOL (CALLBACK *INTRPROCESSFUNCTION) ( DWORD dwDevice, MCFUNC Func, DWORD Param,
                   LPDWORD pResult );

/*****************************************************************************/

//**************************************
// DPR Binary rotary buffer functions
// Initialization/shutdown
typedef SHORT (CALLBACK *DPRROTBUFINIT) ( DWORD dwDevice, USHORT bufnum );
typedef SHORT (CALLBACK *DPRROTBUFREMOVE) ( DWORD dwDevice, USHORT bufnum );
typedef SHORT (CALLBACK *DPRROTBUFCHANGE) ( DWORD dwDevice, USHORT bufnum, USHORT new_size );
typedef void (CALLBACK *DPRROTBUFCLR) ( DWORD dwDevice, USHORT bufnum );
typedef SHORT (CALLBACK *DPRROTBUF) ( DWORD dwDevice, BOOL on );
typedef int (CALLBACK *DPRBUFLAST) ( DWORD dwDevice );

// Transfer functions
typedef SHORT (CALLBACK *DPRASCIISTRTOROTA) ( DWORD dwDevice, PCHAR inpstr, USHORT bufnum );
typedef SHORT (CALLBACK *DPRASCIISTRTOROTEX) ( DWORD dwDevice, PCHAR inpstr, USHORT bufnum, BOOL bSendRemaining );
typedef SHORT (CALLBACK *DPRSENDBINARYCOMMANDA) ( DWORD dwDevice, PCHAR inpstr, USHORT bufnum );
typedef SHORT (CALLBACK *DPRASCIISTRTOBINARYFILEA) ( PCHAR inpstr, FILE * outfile );

typedef SHORT (CALLBACK *DPRASCIISTRTOROTW) ( DWORD dwDevice, PWCHAR inpstr, USHORT bufnum );
typedef SHORT (CALLBACK *DPRSSNDBINARYCOMMANDW) ( DWORD dwDevice, PWCHAR inpstr, USHORT bufnum );
typedef SHORT (CALLBACK *DPRASCIISTRTOBINARYFILEW) ( PWCHAR inpstr, FILE * outfile );


typedef SHORT (CALLBACK *DPRASCIIFILETOROT) ( DWORD dwDevice, FILE * inpfile, USHORT bufnum );
typedef SHORT (CALLBACK *DPRBINARYFILETOROT) ( DWORD dwDevice, FILE * inpfile, USHORT bufnum );
typedef SHORT (CALLBACK *DPRASCIITOBINARYFILE) ( FILE * inpfile, FILE * outfile );
typedef SHORT (CALLBACK *DPRBINARYTOROT) ( DWORD dwDevice, WORD *inpbinptr, WORD **outbinptr, WORD bufnum );

// Variable Background Buffer Functions
// Initialization
typedef long (CALLBACK *DPRVARBUFINIT) ( DWORD dwDevice, long new_num_entries, PLONG addrarray );
typedef long (CALLBACK *DPRVARBUFINITEX) ( DWORD dwDevice, long new_num_entries, PLONG addrarray, PUINT addrtype );
typedef BOOL (CALLBACK *DPRVARBUFREMOVE) ( DWORD dwDevice, long h );
typedef BOOL (CALLBACK *DPRVARBUFCHANGE) ( DWORD dwDevice, long handle, long new_num_entries, long *addrarray );
typedef BOOL (CALLBACK *DPRVARBUFCHANGEEX) ( DWORD dwDevice, long handle, long new_num_entries, long *addrarray, PUINT addrtype );
typedef BOOL (CALLBACK *DPRVARBUFREAD) ( DWORD dwDevice, long h, long entry_num, PLONG long_2 );
typedef BOOL (CALLBACK *DPRVARBUFREADEX) ( DWORD dwDevice, long h, PLONG long_x );
typedef long (CALLBACK *DPRGETVBGADDRESS) ( DWORD dwDevice, long h, long entry_num );

typedef long (CALLBACK *DPRGETVBGNUMENTRIES) ( DWORD dwDevice, long h );
typedef long (CALLBACK *DPRGETVBGDATAOFFSET) ( DWORD dwDevice, long h );
typedef long (CALLBACK *DPRGETVBGADDROFFSET) ( DWORD dwDevice, long h );

// Both
typedef UINT (CALLBACK *DPRGETVBGSERVOTIMER) ( DWORD dwDevice );
typedef UINT (CALLBACK *DPRGETVBGSTARTADDR) ( DWORD dwDevice );
typedef int (CALLBACK *DPRGETVBGTOTALENTRIES) ( DWORD dwDevice );

typedef int (CALLBACK *DPRWRITEBUFFER) ( DWORD dwDevice, int num_entries,
                struct VBGWFormat * the_data );
typedef int (CALLBACK *DPRWRITEBUFFEREX) ( DWORD dwDevice, int num_entries,
                struct VBGWFormat * the_data, long *addresses, UINT *types );
typedef void (CALLBACK *DOWNLOADGANTRYAUTOTUNINGPLC) ( DWORD dwDevice,
          DWORD dwMotor1, DWORD dwMotor2, BOOL current_loop_used, BOOL bypass_jog, float maxtravel, long lTime );
typedef void (CALLBACK *DOWNLOADGANTRYSTEPPLC) ( DWORD dwDevice, DWORD dwMotor1, DWORD dwMotor2 );
typedef void (CALLBACK *DOWNLOADGANTRYPARABOLICPLC) ( DWORD dwDevice, DWORD dwMotor1, DWORD dwMotor2 );

////////////////////////////////////////////////////////////////////////////
// Data Gather functions
////////////////////////////////////////////////////////////////////////////
typedef UINT (CALLBACK *GETGATHERPERIOD) ( DWORD dwDevice );
typedef double (CALLBACK *GETGATHERSAMPLETIME) ( DWORD dwDevice );
typedef UINT (CALLBACK *GETNUMGATHERSOURCES) ( DWORD dwDevice );
typedef UINT (CALLBACK *GETNUMGATHERSAMPLES) ( DWORD dwDevice );
typedef UINT (CALLBACK *SETGATHERPERIOD) ( DWORD dwDevice, UINT msec );
typedef double (CALLBACK *SETGATHERSAMPLETIME) ( DWORD dwDevice, double msec );
typedef BOOL (CALLBACK *SETGATHERENABLE) ( DWORD dwDevice, UINT num, BOOL ena );
typedef BOOL (CALLBACK *GETGATHERENABLE) ( DWORD dwDevice, UINT num );
typedef BOOL (CALLBACK *SETCURRENTGATHER) ( DWORD dwDevice, UINT mask, BOOL ena );
typedef BOOL (CALLBACK *SETGATHER) ( DWORD dwDevice, UINT num, LPSTR str, BOOL ena );
typedef BOOL (CALLBACK *SETQUICKGATHER) ( DWORD dwDevice, UINT mask, BOOL ena );
typedef BOOL (CALLBACK *SETQUICKGATHEREX) ( DWORD dwDevice, PWTG_EX mask, BOOL ena );
typedef BOOL (CALLBACK *SETQGWITHDIRECTCUR) ( DWORD dwDevice, UINT mask, BOOL ena );
typedef BOOL (CALLBACK *SETQGWITHDIRECTCUREX) ( DWORD dwDevice, PWTG_EX mask, BOOL ena );
typedef BOOL (CALLBACK *GETGATHER) ( DWORD dwDevice, UINT num, LPSTR str, UINT maxchar );
typedef void (CALLBACK *CLEARGATHER) ( DWORD dwDevice );
typedef BOOL (CALLBACK *INITGATHER) ( DWORD dwDevice, UINT size, double msec );
typedef void (CALLBACK *CLEARGATHERDATA) ( DWORD dwDevice );
typedef double * ( CALLBACK *COLLECTGATHERDATA ) ( DWORD dwDevice, PUINT sources, PUINT samples );
typedef BOOL (CALLBACK *GETGATHERSAMPLES) ( DWORD dwDevice, UINT source, PUINT sample, double *p, UINT max );
typedef BOOL (CALLBACK *GETGATHERPOINT) ( DWORD dwDevice, UINT source, UINT sample, double *p );

typedef int (CALLBACK *STARTGATHER) ( DWORD dwDevice );
typedef int (CALLBACK *STOPGATHER) ( DWORD dwDevice );

// Real time
typedef BOOL (CALLBACK *INITRTGATHER) ( DWORD dwDevice );
typedef void (CALLBACK *CLEARRTGATHER) ( DWORD dwDevice );
typedef BOOL (CALLBACK *ADDRTGATHER) ( DWORD dwDevice, ULONG val );
typedef double * ( CALLBACK *COLLECTRTGATHERDATA ) ( DWORD dwDevice, PUINT sources );

typedef DWORD (CALLBACK *ULTRALIGHTANALYZE)( DWORD dwDevice,ULTRALIGHT_INFO * ui);
typedef BOOL (CALLBACK *MACROUPLOADCONFIG) ( DWORD dwDevice, DOWNLOADPROGRESS prgp, char *fname );
typedef long (CALLBACK *MACROGETIVARIABLELONG) ( DWORD dwDevice, DWORD node, UINT num, long def );
typedef BOOL (CALLBACK *MACROSETIVARIABLESTRING)( DWORD dwDevice, DWORD node, UINT num, char *szMIVarValue);
typedef PCHAR (CALLBACK *MACROGETIVARIABLESTRING)( DWORD dwDevice, DWORD node, UINT num, PCHAR def );

typedef BOOL (CALLBACK *AMPENABLED) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *AMPFAULT) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *ONNEGATIVELIMIT) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *ONPOSITIVELIMIT) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *FATALFERROR) ( DWORD dwDevice, int mtr );
typedef double (CALLBACK *FOLLOWERROR) ( DWORD dwDevice, int mtr, double units );
typedef BOOL (CALLBACK *PHASEDMOTOR) ( DWORD dwDevice, int mtr );
typedef BOOL (CALLBACK *GETMOTORSTATUS) (DWORD dwDevice,UINT mtr,DWORD *status);

typedef BOOL   (CALLBACK* VMETESTOPENPMACDEVICE)(DWORD dwDevice,BOOL bMailboxOnly);
typedef BOOL   (CALLBACK* VMETESTCLOSEPMACDEVICE)(DWORD dwDevice);
typedef BOOL   (CALLBACK* VMESETUP)(DWORD SERIALDev, DWORD VMEDev);


///////////////////////////////////////////////////////////////////////////
// Functions


  #ifdef NO_EXTERN
    #define EXTRN
  #else
    #define EXTRN extern
  #endif

  #ifdef __cplusplus
extern "C" {
  #endif

  HINSTANCE OpenRuntimeLink();
  void      CloseRuntimeLink();
  void DoNCFunctions( BOOL yesno );

  // Comm functions
  EXTRN PMACDPRPCITEST DeviceDPRPCITest;
  EXTRN DOCHECKSUMS DeviceDoChecksums;
  EXTRN READREADY DeviceReadReady;
  EXTRN FLUSH DeviceFlush;
  EXTRN OPENPMACDEVICE DeviceOpen;
  EXTRN SELECTPMACDEVICE DeviceSelect;
  EXTRN NUMBEROFDEVICES DeviceNumberOfDevices;
  EXTRN CLOSEPMACDEVICE DeviceClose;
  EXTRN PMACSETLANGUAGE DeviceSetLanguage;
  EXTRN PMACSETWINDOW   DeviceSetWindow;
  EXTRN PMACLMH DeviceLMH;
  EXTRN SETLANGUAGEMODULE DeviceSetLanguageModule;
  EXTRN CONFIGURE DeviceConfigure;
  EXTRN SENDLINEA DeviceSendLine;
  EXTRN GETLINEA DeviceGetLine;
  EXTRN GETLINEEXA DeviceGetLineEx;
  EXTRN WAITGETLINEA DeviceWaitGetLine;
  EXTRN SENDCHARA DeviceSendChar;
  EXTRN GETRESPONSEA DeviceGetResponse;
  EXTRN GETCONTROLRESPONSEA DeviceGetControlResponse;
  EXTRN GETRESPONSEEXA DeviceGetResponseEx;
  EXTRN GETCONTROLRESPONSEEXA DeviceGetControlResponseEx;

⌨️ 快捷键说明

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