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

📄 loadmpc2810.h

📁 运动控制卡VC源码,四轴控制,用于机械手的设计.
💻 H
📖 第 1 页 / 共 2 页
字号:
// LoadMpc2810.h: interface for the CLoadMpc2810 class.
//
//////////////////////////////////////////////////////////////////////

//#if !defined(AFX_LOADDLL_H__B8267873_59D6_11D5_B5A0_B42C742B6543__INCLUDED_)
//#define AFX_LOADDLL_H__B8267873_59D6_11D5_B5A0_B42C742B6543__INCLUDED_
#ifndef _LOADMPC2810_H_
#define _LOADMPC2810_H_


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

enum FUNCITEM
{
	TYPE0=0,			//属性设置
	SET_UNIT_FLAG,
	SET_OUTMODE,
	SET_HOME_MODE,
	SET_DIR,
	ENABLE_SD,
	ENABLE_EL,
	ENABLE_ORG,
	ENABLE_ALM,
	SET_SD_LOGIC,
	SET_EL_LOGIC,
	SET_ORG_LOGIC,
	SET_ALM_LOGIC,
	SET_GETPOS_MODE,
	SET_ENCODER_MODE,
	OPEN_LIST,
	CLOSE_LIST,
	ADD_LIST,
	START_LOOKAHEAD,
	END_LOOKAHEAD,
	TYPE1,				//参数设置
	SET_MAXSPEED,
	SET_CONSPEED,
	SET_PROFILE,
	SET_VECTOR_CONSPEED,
	SET_VECTOR_PROFILE,
	C_SET_VECTOR_PROFILE,
	C_SET_MAX_ACCEL,
	C_SET_MULTIPLE,
	C_SET_CURVE_VERTEX,
	SET_ELLIPSE_RATIO,
	SET_S_CURVE,
	SET_S_SECTION,
	SET_ABS_POS,
	RESET_POS,
	SET_STEPS_PR,
	SET_ENC_THREAD,
	SET_UNIT,
	TYPE2,				//运动指令
	CON_PMOVE,
	CON_PMOVE2,
	CON_PMOVE3,
	CON_PMOVE4,
	CON_PMOVE_TO,
	FAST_PMOVE,
	FAST_PMOVE2,
	FAST_PMOVE3,
	FAST_PMOVE4,
	FAST_PMOVE_TO,
	CON_VMOVE,
	CON_VMOVE2,
	CON_VMOVE3,
	CON_VMOVE4,
	FAST_VMOVE,
	FAST_VMOVE2,
	FAST_VMOVE3,
	FAST_VMOVE4,
	CON_HMOVE,
	CON_HMOVE2,
	CON_HMOVE3,
	CON_HMOVE4,
	FAST_HMOVE,
	FAST_HMOVE2,
	FAST_HMOVE3,
	FAST_HMOVE4,
	CON_LINE2,
	CON_LINE3,
	CON_LINE4,
	CON_LINEN_TO,
	FAST_LINE2,
	FAST_LINE3,
	FAST_LINE4,
	FAST_LINEN_TO,
	ARC_CENTER,
	FAST_ARC_CENTER,
	ARC_FINAL,
	HELICAL_MOVE,
	TYPE3,				//停止指令
	SUDDEN_STOP,
	SUDDEN_STOP2,
	SUDDEN_STOP3,
	SUDDEN_STOP4,
	SUDDEN_STOP_LIST,
	DECEL_STOP,
	DECEL_STOP2,
	DECEL_STOP3,
	DECEL_STOP4,
	DECEL_STOP_LIST,
	MOVE_PAUSE,
	MOVE_PAUSE_LIST,
	MOVE_RESUME,
	MOVE_RESUME_LIST,
	DELAY_TIME,
	TYPE4,				//IO指令
	CHECKIN_BYTE,
	CHECKIN_BIT,
	OUTPORT_BIT,
	OUTPORT_BYTE,
	CHECK_SFR,
	CHECK_SFR_BIT,
	OUTPORT,
	INPORT,
	TYPE5,				//特殊功能
	SET_BACKLASH,
	START_BACKLASH,
	END_BACKLASH,
	SET_WATCHDOG_TIME,
	RESET_WATCHDOG,
	START_WATCHDOG,
	STOP_WATCHDOG,
	GET_WATCHDOG_STATUS,
	ENABLE_IO_POS,
	SET_POSCMP_SOURCE,
	SET_IO_POS,
	ENABLE_LOCK_ENC,
	RESET_LOCKED_FLAG,
	GET_LOCKED_FLAG,
	GET_LOCKED_ENCODER,
	ENABLE_GEAR,
	ENABLE_HANDWHEEL,
	ENABLE_SOFTLIMIT,
	SET_SOFTLIMIT,
	SET_SOFTLIMIT_DATA,
	CHECK_SOFTLIMIT,
	ENABLE_POSERR_LIMIT,
	SET_POSERR_LIMIT,
	GET_POSERR_LIMIT,
	ENABLE_INPUT_MODE,
	SET_IM_DEADBAND,
	ENABLE_ISR,
	SET_ISR_ROUTINE,
	SET_ISR_FACTOR,
	GET_ISR_EVENT,
	SET_RAMP,
	CHANGE_SPEED,
	CHANGE_POS,
	SET_TAN_FLAG,
	SET_TAN_INITPOS,
	SET_TAN_MAP,
	SET_TAN_AXIS,
	SET_TAN_PROFILE,
	SET_TAN_STOPANGLE,
	SET_TAN_IO,
	TYPE6,				//查询函数
	GET_MAX_AXE,
	GET_BOARD_NUM,
	GET_AXE,
	GET_UNIT,
	CHECK_IC,
	GET_ABS_POS,
	GET_REL_POS,
	GET_ENCODER,
	GET_DONE_SOURCE,
	GET_CONSPEED,
	GET_VECTOR_CONSPEED,
	GET_PROFILE,
	GET_VECTOR_PROFILE,
	GET_RATE,
	GET_CUR_DIR,
	CHECK_STATUS,
	CHECK_DONE,
	CHECK_LIMIT,
	CHECK_HOME,
	CHECK_SD,
	CHECK_ALARM,
	CHECK_DELAY_STATUS,
	GET_CMD_COUNTER,
	RESET_CMD_COUNTER,
	SET_CMD_COUNTER,
	GET_ERR,
	GET_LAST_ERR,
	RESET_ERR,
	GET_LIB_VER,
	GET_SYS_VER,
	GET_CARD_VER,
};

//轴属性设置函数

//////////////////////////////////////////////////////////////////////
//DLL函数指针类型定义
//控制卡
typedef int (CALLBACK* LPFNDLL2810_auto_set)(void);
typedef int (CALLBACK* LPFNDLL2810_init_board)(void);
typedef int (CALLBACK* LPFNDLL2810_set_unit_flag)(int flag);
//轴属性设置函数
typedef int (CALLBACK* LPFNDLL2810_set_outmode)(int ch,int mode,int logic);
typedef int (CALLBACK* LPFNDLL2810_set_home_mode)(int ch,int origin_mode);
typedef int (CALLBACK* LPFNDLL2810_set_dir)(int ch,int dir);
typedef int (CALLBACK* LPFNDLL2810_enable_sd)(int ch,int flag);
typedef int (CALLBACK* LPFNDLL2810_enable_el)(int ch,int flag);
typedef int (CALLBACK* LPFNDLL2810_enable_org)(int ch,int flag);
typedef int (CALLBACK* LPFNDLL2810_enable_alm)(int ch,int flag);
typedef int (CALLBACK* LPFNDLL2810_set_sd_logic)(int ch,int flag);
typedef int (CALLBACK* LPFNDLL2810_set_el_logic)(int ch,int flag);
typedef int (CALLBACK* LPFNDLL2810_set_org_logic)(int ch,int flag);
typedef int (CALLBACK* LPFNDLL2810_set_alm_logic)(int ch,int flag);
//编码器属性设置函数
typedef int (CALLBACK* LPFNDLL2810_set_getpos_mode)(int ch,int mode);
typedef int (CALLBACK* LPFNDLL2810_set_encoder_mode)(int ch,int mode,int multip,int count_unit);
typedef int (CALLBACK* LPFNDLL2810_open_list)(void);
typedef int (CALLBACK* LPFNDLL2810_close_list)(void);
typedef int (CALLBACK* LPFNDLL2810_add_list)(void);
typedef int (CALLBACK* LPFNDLL2810_start_lookahead)(void);
typedef int (CALLBACK* LPFNDLL2810_end_lookahead)(void);
//参数设置函数
typedef int (CALLBACK* LPFNDLL2810_set_maxspeed)(int ch , double speed);
typedef int (CALLBACK* LPFNDLL2810_set_conspeed)(int ch , double conspeed);
typedef int (CALLBACK* LPFNDLL2810_set_vector_conspeed)(double conspeed);
typedef int (CALLBACK* LPFNDLL2810_set_profile)(int ch , double vl , double vh , double ad);
typedef int (CALLBACK* LPFNDLL2810_set_vector_profile)(double vec_vl , double vec_vh ,double vec_ad);
typedef int (CALLBACK* LPFNDLL2810_c_set_vector_profile)(double vec_vl , double vec_vh ,double vec_ad);
typedef int (CALLBACK* LPFNDLL2810_c_set_max_accel)(double vec_ad);
typedef int (CALLBACK* LPFNDLL2810_c_set_multiple)(double mul);
typedef int (CALLBACK* LPFNDLL2810_c_set_curve_vertex)(int nmode);
typedef int (CALLBACK* LPFNDLL2810_set_ellipse_ratio)(double ratio);
typedef int (CALLBACK* LPFNDLL2810_set_s_curve)(int ch , int mode);
typedef int (CALLBACK* LPFNDLL2810_set_s_section)(int ch ,double accel_sec, double decel_sec);
typedef int (CALLBACK* LPFNDLL2810_set_abs_pos)(int ch,double pos);
typedef int (CALLBACK* LPFNDLL2810_reset_pos)(int ch);
typedef int (CALLBACK* LPFNDLL2810_set_unit)(int ch, double dl);
typedef int (CALLBACK* LPFNDLL2810_set_steps_pr)(int ch, int rd);
typedef int (CALLBACK* LPFNDLL2810_set_enc_thread)(int ch, int rd);
//运动指令函数
typedef int (CALLBACK* LPFNDLL2810_con_pmove)(int ch,double step);
typedef int (CALLBACK* LPFNDLL2810_con_pmove2)(int ch1,double step1,int ch2,double step2);
typedef int (CALLBACK* LPFNDLL2810_con_pmove3)(int ch1,double step1,int ch2,double step2,int ch3,double step3);
typedef int (CALLBACK* LPFNDLL2810_con_pmove4)(int ch1,double step1,int ch2,double step2,int ch3,double step3,int ch4,double step4);
typedef int (CALLBACK* LPFNDLL2810_con_pmove_to)(int ch,double step);
typedef int (CALLBACK* LPFNDLL2810_fast_pmove)(int ch,double step);
typedef int (CALLBACK* LPFNDLL2810_fast_pmove2)(int ch1,double step1,int ch2,double step2);
typedef int (CALLBACK* LPFNDLL2810_fast_pmove3)(int ch1,double step1,int ch2,double step2,int ch3,double step3);
typedef int (CALLBACK* LPFNDLL2810_fast_pmove4)(int ch1,double step1,int ch2,double step2,int ch3,double step3,int ch4,double step4);
typedef int (CALLBACK* LPFNDLL2810_fast_pmove_to)(int ch,double step);
typedef int (CALLBACK* LPFNDLL2810_con_vmove)(int ch,int dir);
typedef int (CALLBACK* LPFNDLL2810_con_vmove2)(int ch1,int dir1,int ch2,int dir2);
typedef int (CALLBACK* LPFNDLL2810_con_vmove3)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3);
typedef int (CALLBACK* LPFNDLL2810_con_vmove4)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3,int ch4,int dir4);
typedef int (CALLBACK* LPFNDLL2810_fast_vmove)(int ch,int dir);
typedef int (CALLBACK* LPFNDLL2810_fast_vmove2)(int ch1,int dir1,int ch2,int dir2);
typedef int (CALLBACK* LPFNDLL2810_fast_vmove3)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3);
typedef int (CALLBACK* LPFNDLL2810_fast_vmove4)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3,int ch4,int dir4);
typedef int (CALLBACK* LPFNDLL2810_con_hmove)(int ch,int dir);
typedef int (CALLBACK* LPFNDLL2810_con_hmove2)(int ch1,int dir1,int ch2,int dir2);
typedef int (CALLBACK* LPFNDLL2810_con_hmove3)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3);
typedef int (CALLBACK* LPFNDLL2810_con_hmove4)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3,int ch4,int dir4);
typedef int (CALLBACK* LPFNDLL2810_fast_hmove)(int ch,int dir);
typedef int (CALLBACK* LPFNDLL2810_fast_hmove2)(int ch1,int dir1,int ch2,int dir2);
typedef int (CALLBACK* LPFNDLL2810_fast_hmove3)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3);
typedef int (CALLBACK* LPFNDLL2810_fast_hmove4)(int ch1,int dir1,int ch2,int dir2,int ch3,int dir3,int ch4,int dir4);
typedef int (CALLBACK* LPFNDLL2810_con_line2)(int ch1,double step1,int ch2, double step2);
typedef int (CALLBACK* LPFNDLL2810_con_line3)(int ch1,double step1,int ch2,double step2,int ch3,double step3);
typedef int (CALLBACK* LPFNDLL2810_con_line4)(int ch1,double step1,int ch2,double step2,int ch3,double step3,int ch4,double step4);
typedef int (CALLBACK* LPFNDLL2810_con_linen_to)(int chnum,int *ch, double *step);
typedef int (CALLBACK* LPFNDLL2810_fast_line2)(int ch1,double step1,int ch2, double step2);
typedef int (CALLBACK* LPFNDLL2810_fast_line3)(int ch1,double step1,int ch2, double step2,int ch3,double step3);
typedef int (CALLBACK* LPFNDLL2810_fast_line4)(int ch1,double step1,int ch2, double step2,int ch3,double step3,int ch4,double step4);
typedef int (CALLBACK* LPFNDLL2810_fast_linen_to)(int chnum,int *ch, double *step);
typedef int (CALLBACK* LPFNDLL2810_arc_center)(int ch1,int ch2,double cen1,double cen2,double angle );
typedef int (CALLBACK* LPFNDLL2810_arc_final)(int ch1,int ch2,int dir,double fx,double fy,double r);
typedef int (CALLBACK* LPFNDLL2810_fast_arc_center)(int ch1,int ch2,double cen1,double cen2,double angle );
typedef int (CALLBACK* LPFNDLL2810_helical_move)(int ch1,int ch2,int ch3,double cen1,double cen2,double angle, double pitch);
//制动函数
typedef int (CALLBACK* LPFNDLL2810_sudden_stop)(int ch);
typedef int (CALLBACK* LPFNDLL2810_sudden_stop2)(int ch1,int ch2);
typedef int (CALLBACK* LPFNDLL2810_sudden_stop3)(int ch1,int ch2,int ch3);
typedef int (CALLBACK* LPFNDLL2810_sudden_stop4)(int ch1,int ch2,int ch3,int ch4);
typedef int (CALLBACK* LPFNDLL2810_sudden_stop_list)(void);
typedef int (CALLBACK* LPFNDLL2810_decel_stop)(int ch);
typedef int (CALLBACK* LPFNDLL2810_decel_stop2)(int ch1,int ch2);
typedef int (CALLBACK* LPFNDLL2810_decel_stop3)(int ch1,int ch2,int ch3);
typedef int (CALLBACK* LPFNDLL2810_decel_stop4)(int ch1,int ch2,int ch3,int ch4);
typedef int (CALLBACK* LPFNDLL2810_decel_stop_list)(void);
typedef int (CALLBACK* LPFNDLL2810_move_pause)(int ch);
typedef int (CALLBACK* LPFNDLL2810_move_pause_list)(void);
typedef int (CALLBACK* LPFNDLL2810_move_resume)(int ch);
typedef int (CALLBACK* LPFNDLL2810_move_resume_list)(void);
typedef int (CALLBACK* LPFNDLL2810_delay_time)(int time);//ms

⌨️ 快捷键说明

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