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

📄 loaddll.h

📁 自动化过程中用到的运动控制器
💻 H
字号:
// LoadDll.h: interface for the CLoadDll class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LOADDLL_H__B8267873_59D6_11D5_B5A0_B42C742B6543__INCLUDED_)
#define AFX_LOADDLL_H__B8267873_59D6_11D5_B5A0_B42C742B6543__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//////////////////////////////////////////////////////////
//DLL函数指针类型定义
typedef int (CALLBACK* LPFNDLL_auto_set)();
typedef int (CALLBACK* LPFNDLL_set_board_irq)(int board_no,int IRQ_no);
typedef int (CALLBACK* LPFNDLL_init_board)();
typedef int (CALLBACK* LPFNDLL_decel_stop)(int ch);
typedef int (CALLBACK* LPFNDLL_sudden_stop)(int ch);
typedef int (CALLBACK* LPFNDLL_get_abs_pos)(int ch,long *pos);
typedef int (CALLBACK* LPFNDLL_reset_pos)(int ch);

typedef int (CALLBACK* LPFNDLL_set_conspeed)(int ch , double conspeed);
typedef int (CALLBACK* LPFNDLL_set_profile)(int ch , double vl , double vh , double ad);
typedef int (CALLBACK* LPFNDLL_set_vector_conspeed)(double conspeed);
typedef int (CALLBACK* LPFNDLL_set_vector_profile)(double vec_vl , double vec_vh ,double vec_ad);

typedef int (CALLBACK* LPFNDLL_con_pmove)(int ch,long step);
typedef int (CALLBACK* LPFNDLL_con_pmove2)(int ch1,long step1,int ch2,long step2);
typedef int (CALLBACK* LPFNDLL_fast_pmove)(int ch,long step);
typedef int (CALLBACK* LPFNDLL_fast_pmove2)(int ch1,long step1,int ch2,long step2);
typedef int (CALLBACK* LPFNDLL_con_vmove)(int ch,int dir);
typedef int (CALLBACK* LPFNDLL_con_vmove2)(int ch1,int dir1,int ch2,int dir2);
typedef int (CALLBACK* LPFNDLL_fast_vmove)(int ch,int dir);
typedef int (CALLBACK* LPFNDLL_fast_vmove2)(int ch1,int dir1,int ch2,int dir2);

typedef int (CALLBACK* LPFNDLL_con_line2)(int CHX,long pos1,int CHY, long pos2);
typedef int (CALLBACK* LPFNDLL_fast_line2)(int CHX,long pos1,int CHY, long pos2);

typedef int (CALLBACK* LPFNDLL_arc_center)(int CHX,int CHY,long cen1,long cen2,double angle);
typedef int (CALLBACK* LPFNDLL_fast_arc_center)(int CHX,int CHY,long cen1,long cen2,double angle);

typedef int (CALLBACK* LPFNDLL_DmcSetBatchProcessFlag)(int Flag);
typedef int (CALLBACK* LPFNDLL_DmcGetError)(int Index);

///////////////////////////////
//dmc.dll函数封装类
class CLoadDll  
{
public:
	CLoadDll();
	virtual ~CLoadDll();
private:
	HINSTANCE hDLL;
public:
	int LoadDllFun();
	///////////////////////////////////
	//函数指针定义
	LPFNDLL_auto_set auto_set; 
	LPFNDLL_set_board_irq set_board_irq; 
	LPFNDLL_init_board init_board; 
	LPFNDLL_decel_stop decel_stop; 
	LPFNDLL_sudden_stop sudden_stop; 
	LPFNDLL_get_abs_pos get_abs_pos; 
	LPFNDLL_reset_pos reset_pos; 

	LPFNDLL_set_conspeed set_conspeed; 
	LPFNDLL_set_profile set_profile; 
	LPFNDLL_set_vector_conspeed set_vector_conspeed; 
	LPFNDLL_set_vector_profile set_vector_profile; 

	LPFNDLL_con_pmove con_pmove; 
	LPFNDLL_con_pmove2 con_pmove2; 
	LPFNDLL_fast_pmove fast_pmove; 
	LPFNDLL_fast_pmove2 fast_pmove2; 
	LPFNDLL_con_vmove con_vmove; 
	LPFNDLL_con_vmove2 con_vmove2; 
	LPFNDLL_fast_vmove fast_vmove; 
	LPFNDLL_fast_vmove2 fast_vmove2; 

	LPFNDLL_con_line2 con_line2; 
	LPFNDLL_fast_line2 fast_line2; 
	LPFNDLL_arc_center arc_center; 
	LPFNDLL_fast_arc_center fast_arc_center; 

	LPFNDLL_DmcSetBatchProcessFlag DmcSetBatchProcessFlag; 
	LPFNDLL_DmcGetError DmcGetError; 
};

#endif // !defined(AFX_LOADDLL_H__B8267873_59D6_11D5_B5A0_B42C742B6543__INCLUDED_)

⌨️ 快捷键说明

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