

#ifndef _I8196F_LIB_H_
#define _I8196F_LIB_H_


typedef unsigned char    U8;
typedef unsigned short   U16;
typedef unsigned long    U32;
typedef	char			 I8;
typedef	short			 I16;
typedef	long			 I32;
typedef	float			 F32;
typedef	double			 F64;

#if defined(_P824_)  || defined(_I8000_)
	typedef unsigned char    BOOLEAN;
	typedef unsigned char    bool;

	#define true  (1)
	#define false (0)
	#define TRUE  (1)
	#define FALSE (0)

	#define _EXP
	#define __stdcall
	#define DEFAULT_VALUE(value) = value
#endif

//-------------------------------------------------------------------------------------------------
typedef enum MOVE_DIRECTION
{
	MOVE_DIRECTION_FORWARD	=	1,
	MOVE_DIRECTION_REVERSE	=	0
}eMOVE_DIRECTION;

typedef enum POS_MODE
{
	RELATIVE_CMD   = 0,
	ABSOLUTE_CMD   = 1
}ePOS_MODE;

typedef enum STATUS
{
	STATUS_OFF       =(0),
	STATUS_ON        =(1)
	
}eSTATUS;
//-------------------------------------------------------------------------------------------------
// Axis definition for i8196F
typedef enum SINGLE_AXIS
{
	AXIS_0		=0x01,
	AXIS_1		=0x02,
	AXIS_2		=0x04,
	AXIS_3		=0x08,
	AXIS_4		=0x10,
	AXIS_5		=0x20
}eSINGLE_AXIS;

#define AXIS_X           			AXIS_0
#define AXIS_Y           			AXIS_1
#define AXIS_Z           			AXIS_2
#define AXIS_U           			AXIS_3
#define AXIS_V           			AXIS_4
#define AXIS_W           			AXIS_5

//maximum of axis supported by i8196F:
#define	MAX_AXIS_QTY                (6)
#define MAX_AXIS_NO					(MAX_AXIS_QTY)


//-------------------------------------------------------------------------------------------------

typedef enum ACC_DEC_CURVE
{
	I8196F_ACC_DEC_T_CURVE	= 0x6565,
	I8196F_ACC_DEC_S_CURVE	= 0x6666
}eACC_DEC_CURVE;


//-------------------------------------------------------------------------------------------------
// for feedback sources in i8196f_set_speed_feedback_src
typedef enum FEEDBACK_SRC
{
	FEEDBACK_SRC_DDA_ENC         =0,	// Theoretical Command with one cycle delay
	FEEDBACK_SRC_ENC             =1,	// Real Closed Loop form Encoder
	FEEDBACK_SRC_DDA             =2,	// Internal Loop back from DDA
	FEEDBACK_SRC_ADC             =3,	// Real Closed Loop form ADC, for speed feedback only
	FEEDBACK_SRC_DAC             =4	// Internal Loop back from DAC, for speed feedback only
}eFEEDBACK_SRC;

//-------------------------------------------------------------------------------------------------
typedef enum CHANNEL_STATE
{
	OFF					=0x0,
	ON					=0x1
}eCHANNEL_STATE;

typedef enum AXIS_DO
{
	AXIS_DO_SVON_CH              =0x0,
	AXIS_DO_ERC_CH               =0x1,
	AXIS_DO_ALMRST_CH            =0x2,
	AXIS_DO_RESERVED_CH          =0x3
}eAXIS_DO;

//For each axis there are a couple of DI Channels:
typedef enum AXIS_DI
{
	//AXIS_DI_CMP_CH		= (15),	//
	//AXIS_DI_ALMRST_CH	    = (14),	//
	//AXIS_DI_ERC_CH		= (13),	//
	//AXIS_DI_SVON_CH		= (12),	//

	AXIS_DI_EA_CH		= (11),	//
	AXIS_DI_EB_CH		= (10),	//
	AXIS_DI_EZ_CH		= (9),		//
	AXIS_DI_IDX_CH		= (8),		//
	AXIS_DI_LTC_CH		= (7),		//
	AXIS_DI_RDY_CH		= (6),		//
	AXIS_DI_INP_CH		= (5),		//servo in position
	AXIS_DI_ALM_CH		= (4),		//servo alarm
	AXIS_DI_SLD_CH		= (3),		//Near Home 
	AXIS_DI_ORG_CH		= (2),		//Home 
	AXIS_DI_MEL_CH		= (1),		//negative hardware limit
	AXIS_DI_PEL_CH		= (0)		//positive hardware limit
}eAXIS_DI;

typedef struct AXIS_DI_CH_
{
	//U16 wAxisDi; 
	U16 PEL:         1;
	U16 MEL:         1;
	U16 ORG:         1;
	U16 SLD:         1;
	U16 ALM:         1;
	U16 INP:         1;
	U16 RDY:         1;
	U16 LTC:	      1;
		
	U16 IDX:         1;
	U16 EZ:          1;
	U16 EB:          1;
	U16 EA:          1;
	U16 SVON:        1;
	U16 ERC:         1;
	U16 ALARMRST:    1;
	U16 CMP:	      1;
}AXIS_DI_CH;

typedef enum GENERAL_DO
{
	DO_GDO2_CH			=(2),		//
	DO_GDO1_CH			=(1),		//
	DO_GDO0_CH			=(0)		//
}eGENERAL_DO;

//Each card  has a couple of axis independent DI channels:
typedef enum GENERAL_DI
{
	DI_EMG_CH			=(15),	//
	DI_MPG_EMG_CH		=(14),	//
	DI_MPG_A_CH			=(13),	//
	DI_MPG_B_CH			=(12),	//
	DI_GDI11_CH			=(11),	//
	DI_GDI10_CH			=(10),	//
	DI_GDI9_CH			=(9),		//
	DI_GDI8_CH			=(8),		//
	DI_GDI7_CH			=(7),		//
	DI_GDI6_CH			=(6),		//
	DI_GDI5_CH			=(5),		//
	DI_GDI4_CH			=(4),		//
	DI_GDI3_CH			=(3),		//
	DI_GDI2_CH			=(2),		//
	DI_GDI1_CH			=(1),		//
	DI_GDI0_CH	  		=(0)		//
}eGENERAL_DI;

 
//-------------------------------------------------------------------------------------------------
// Filter Configuration in i8196f_set_axis_io_filter or i8196f_set_di_filter
//
//		For EA/EB/EZ and LTC
//			FILTER_DISABLE_FEATURE
//			FILTER_DELAY_0p12us
//			FILTER_DELAY_0p48us
//			FILTER_DELAY_1p92us
//		For PEL/MEL/ORG/SLD, MPG_EMG/MPG_A/MPG_B and EMG
//			FILTER_DISABLE_FEATURE
//			FILTER_DELAY_3p84us
//			FILTER_DELAY_30p72us
//			FILTER_DELAY_245p76us
//		For ALM/INP/RDY and DI0~DI11
//			FILTER_DISABLE_FEATURE
//			FILTER_DELAY_3p84us

typedef enum FILTER_DELAY
{
	FILTER_DELAY_DISABLE        =0,     //disable the use of filter delay
	FILTER_DELAY_0p12us			=1,
	FILTER_DELAY_0p48us			=2,
	FILTER_DELAY_1p92us			=3,
	FILTER_DELAY_3p84us			=4,
	FILTER_DELAY_30p72us		=5,
	FILTER_DELAY_245p76us		=6
}eFILTER_DELAY;


//-------------------------------------------------------------------------------------------------
//for done status in the i8196f_motion_done() 
#define MOTION_DONE					1
#define MOTION_NOT_DONE				0
//-------------------------------------------------------------------------------------------------
typedef enum STOP_MODE
{
	STOP_NONE				=0,
	STOP_SLOWDOWN			=1,
	STOP_SUDDEN			    =2
}eSTOP_MODE;

//-------------------------------------------------------------------------------------------------
typedef enum LOGIC_ACTIVE_LEVEL     //polarity
{
	LOGIC_ACTIVE_LOW  = 0x0000,
	LOGIC_ACTIVE_HIGH = 0x0001
}eLOGIC_ACTIVE_LEVEL;


//-------------------------------------------------------------------------------------------------
// Auto-Homing Steps Configuration in i8196F
#define AUTO_HOME_STEP1_DISABLE				0x00  
#define AUTO_HOME_STEP1_ENABLE				0x01  // Enable near Home search

#define AUTO_HOME_STEP2_DISABLE				0x00
#define AUTO_HOME_STEP2_ENABLE				0x04  // Enable Home search

#define AUTO_HOME_STEP3_DISABLE				0x00
#define AUTO_HOME_STEP3_ENABLE				0x10  // Enable z-index search

#define AUTO_HOME_STEP4_DISABLE				0x00
#define AUTO_HOME_STEP4_ENABLE				0x40  // Enable offset move


typedef struct AUTO_HOME_STEPS_
{
	//U8 bHomeSteps; 
	U8 EnableNearHomeSearch:    1; //Step 1
	U8 undef_2:                 1;
	U8 EnableHomeSearch:        1; //Step 2
	U8 undef_4:                 1;
	U8 EnableZIndexSearch:      1; //Step 3
	U8 undef_6:                 1;
	U8 EnableOffset:            1; //Step 4:
	U8 undef_8:		          1;
}AUTO_HOME_STEPS;


typedef enum HOME_DIR
{
	AUTO_HOME_FORWARD					=0x0001, 
	AUTO_HOME_REVERSE					=0x0000
}eHOME_DIR;

//-------------------------------------------------------------------------------------------------
// Compare & Trigger Configuration 
typedef enum CMP_TRIG_MOVE_DIR
{
	CMPTRIG_FORWARD_MOVE				=MOVE_DIRECTION_FORWARD,
	CMPTRIG_REVERSE_MOVE				=MOVE_DIRECTION_REVERSE
}eCMP_TRIG_MOVE_DIR;

typedef enum TRIG_PULSE_WIDTH
{
	TRIG_PULSE_WIDTH_ACTUAL_PULSE			=0x0000,
	TRIG_PULSE_WIDTH_160nsTo320ns			=0x0001,
	TRIG_PULSE_WIDTH_320nsTo640ns			=0x0002,
	TRIG_PULSE_WIDTH_640nsTo1p28us			=0x0003,
	TRIG_PULSE_WIDTH_1p28usTo2p56us			=0x0004,
	TRIG_PULSE_WIDTH_2p56usTo5p12us			=0x0005,
	TRIG_PULSE_WIDTH_5p12usTo10p24us		=0x0006,
	TRIG_PULSE_WIDTH_10p24usTo20p48us		=0x0007,
	TRIG_PULSE_WIDTH_20p48usTo40p96us		=0x0008,
	TRIG_PULSE_WIDTH_40p96usTo81p92us		=0x0009,
	TRIG_PULSE_WIDTH_81p92usTo163p84us		=0x000A,
	TRIG_PULSE_WIDTH_163p84usTo327p68us		=0x000B,
	TRIG_PULSE_WIDTH_327p68usTo655p36us		=0x000C,
	TRIG_PULSE_WIDTH_655p36usTo1p31072ms	=0x000D,
	TRIG_PULSE_WIDTH_1p31072msTo2p62144ms	=0x000E,
	TRIG_PULSE_WIDTH_2p62144msTo5p24288ms	=0x000F
}eTRIG_PULSE_WIDTH;

//-------------------------------------------------------------------------------------------------
typedef enum ENABLE_DISABLE
{
	DISABLE = 0x0,
	ENABLE  = 0x1
}eENABLE_DISABLE;

//-------------------------------------------------------------------------------------------------
// Output Pulse Configuration
typedef enum PULSE_MODE
{
	PULSE_MODE_PULSE_DIRECTION	=0x0,
	PULSE_MODE_CW_CCW			=0x1,
	PULSE_MODE_AB_DIVID_4		=0x2,  	// Quadrature pulse input
	//PULSE_MODE_AB_DIVID_2		=0x3,
	//PULSE_MODE_AB				=0x4
}ePULSE_MODE;

typedef enum PULSE_LOGIC
{
	PULSE_LOGIC_ACTIVE_HIGH		=0x0,
	PULSE_LOGIC_ACTIVE_LOW		=0x1
}ePULSE_LOGIC;

typedef enum FORWARD_ACTIVE
{
	PULSE_FORWARD_ACTIVE_HIGH	=0x0,
	PULSE_FORWARD_ACTIVE_LOW	=0x1
}eFORWARD_ACTIVE;

#define PULSE_FORWARD_CW   			0x0
#define PULSE_FORWARD_CCW   		0x1

//-------------------------------------------------------------------------------------------------
//Encoder Configuration
typedef enum ENCODER_MODE
{
	ENCODER_MODE_CW_CCW			=0x1,	// Up/Down pulse input
	ENCODER_MODE_AB_DIVID_4		=0x2,  // Quadrature pulse input
	ENCODER_MODE_AB_DIVID_2		=0x3,
	ENCODER_MODE_AB				=0x4
}eENCODER_MODE;

//-------------------------------------------------------------------------------------------------
//i8196f_load_power_on_cfg()
typedef enum POWER_ON_SETTING
{
	DEFAULT_POWER_ON_SETTING   =0,   // factory default settings
	SAVED_POWER_ON_SETTING     =1    //loads configuration settings stored in the FRAM
}ePOWER_ON_SETTING;
//-------------------------------------------------------------------------------------------------
// Interporation Arc move
typedef enum ARC_DIR
{
	ARC_DIR_CW		= 0x0000,    //cw      //INTERP_ARC_DIRECTION_FORWARD
	ARC_DIR_CCW  	= 0x0001     //ccw     //INTERP_ARC_DIRECTION_REVERSE
}eARC_DIR;

// Enable / Cancle the configuration of continue-interplation
typedef enum INTERP_CONFIG
{
	CANCEL_INTERP_CONFIG            =0x0000,
	START_INTERP_CONFIG             =0x0001
}eINTERP_CONFIG;


//-------------------------------------------------------------------------------------------------
// Returned status in i8196f_motion_done();
#define DRIVE_STILL_DRIVING         				0x0000
#define DRIVE_FINISH_OUTPUT_FIXED_PULSE				0x0001
#define DRIVE_FINISH_WITH_AUTO_HOME					0x0002
#define DRIVE_FINISH_WITH_STOP_COMMAND				0x0004
#define DRIVE_FINISH_WAIT_FOR_INPOS                 0x0008  // wait for servo driver in-position signal

#define DRIVE_FINISH_WITH_SW_LIMIT_POSITIVE			0x0010  //software limit positive
#define DRIVE_FINISH_WITH_SW_LIMIT_NEGATIVE			0x0020  //software limit negative
#define DRIVE_FINISH_WITH_LIMIT_POSITIVE			0x0040  //hardware limit positive
#define DRIVE_FINISH_WITH_LIMIT_NEGATIVE			0x0080  //hardware limit negative
#define DRIVE_FINISH_WITH_ALARM						0x0100
#define DRIVE_FINISH_WITH_EMG						0x0200


//-------------------------------------------------------------------------------------------------
// i8196f_get_error_status();
#define DRIVE_ERROR_STATUS_SOFT_LMT_P				0x0001 //software positive limit error
#define DRIVE_ERROR_STATUS_SOFT_LMT_M				0x0002 //software negative limit error
#define DRIVE_ERROR_STATUS_LMTP						0x0004 //hardware positive limit error
#define DRIVE_ERROR_STATUS_LMTM						0x0008 //hardware negative limit error
#define DRIVE_ERROR_STATUS_ALARM					0x0010
#define DRIVE_ERROR_STATUS_EMG						0x0020
#define DRIVE_ERROR_STATUS_HOME						0x0080


//-------------------------------------------------------------------------------------------------
// DI Status Configuration
typedef struct MOTION_DI_
{
	U16 Driving:   1;      //0x0001
	U16 HardLmt_P: 1;      //0x0002
	U16 HardLmt_M: 1;      //0x0004
	U16 Emg:       1;      //0x0008
	U16 Alarm:     1;      //0x0010
	U16 Home:      1;      //0x0020
	U16 NHome:     1;      //0x0040
	U16 Inp:       1;      //0x0080
	U16 Index:     1;      //0x0100
	U16 Ready:     1;      //0x0200
    U16 Latch:     1;      //0x0400
}MOTION_DI;

#define DI_STATUS_ALARM								0x0010
#define DI_STATUS_HOME								0x0020
#define DI_STATUS_NEARHOME							0x0040
#define DI_STATUS_INP								0x0080
#define DI_STATUS_INDEX								0x0100

#define DI_STATUS_ACTIVE_DRIVING					0x0001
#define DI_STATUS_ACTIVE_LMTP						0x0002
#define DI_STATUS_ACTIVE_LMTM						0x0004
#define DI_STATUS_ACTIVE_EMG						0x0008
#define DI_STATUS_ACTIVE_ALARM						DI_STATUS_ALARM
#define DI_STATUS_ACTIVE_HOME						DI_STATUS_HOME
#define DI_STATUS_ACTIVE_NEARHOME					DI_STATUS_NEARHOME
#define DI_STATUS_ACTIVE_INP						DI_STATUS_INP
#define DI_STATUS_ACTIVE_INDEX						DI_STATUS_INDEX
#define DI_STATUS_ACTIVE_RDY						0x0200
#define DI_STATUS_ACTIVE_LATCH						0x0400



//-------------------------------------------------------------------------------------------------
// Continuous interpolation mode:
typedef enum INTERPOLATION_MODE
{
	GENERAL_INTERP_CONFIG			= 0x0,  //start stop mode
	CONTI_INTERP_CONFIG				= 0x1,
	CONTI_FIFO_BUFFER_MODE          = 0x2   //Currently not supported. Commands will first be stored in an internal FIFO buffer of this DLL. To execute the FIFO buffer commands call "i8196f_conti_interp_start_all()"
}eINTERPOLATION_MODE;

//-------------------------------------------------------------------------------------------------
// FRNET configuration
typedef enum FRNET_DO_ADDR
{
	FRNET_RA0	= 0x0,
	FRNET_RA1	= 0x1,
	FRNET_RA2	= 0x2,
	FRNET_RA3	= 0x3,
	FRNET_RA4	= 0x4,
	FRNET_RA5	= 0x5,
	FRNET_RA6	= 0x6,
	FRNET_RA7	= 0x7
}eFRNET_DO_ADDR;

typedef enum FRNET_DI_ADDR
{
	FRNET_SA8	= 0x8,
	FRNET_SA9	= 0x9,
	FRNET_SA10	= 0xA,
	FRNET_SA11	= 0xB,
	FRNET_SA12	= 0xC,
	FRNET_SA13	= 0xD,
	FRNET_SA14	= 0xE,
	FRNET_SA15	= 0xF
}eFRNET_DI_ADDR;

typedef enum FRNET_SPEED
{
	FRNET_SPEED_1M	    =	1,
	FRNET_SPEED_250K	=	0
}eFRNET_SPEED;

//-------------------------------------------------------------------------------------------------






#if defined(_WIN32_WCE) || defined(WIN32)
	 #if defined(I8196F_CE_EXPORTS) || defined(I8196F_EMB_EXPORTS)
 		#ifdef __cplusplus
 			#define _EXP extern "C" //__declspec(dllexport)
			#define DEFAULT_VALUE(value) = value
 		#else
 			#define _EXP __declspec(dllexport)
			#define DEFAULT_VALUE(value)
 		#endif
	 #else
 		#ifdef __cplusplus
 			#define _EXP extern "C" __declspec(dllimport)
			#define DEFAULT_VALUE(value) = value
 		#else
 			#define _EXP __declspec(dllimport)
			#define DEFAULT_VALUE(value)
 		#endif
	 #endif
	
	//#if !defined(_WIN32_WCE)
	//	#define CALLCONV __stdcall// calling convention
	//#endif
#endif





//============================================================================
//====================== i8196F DLL Function return values===================
//============================================================================
typedef enum RET
{
	I8196_SUCCESS    = 0,
	I8196_ERROR,
	ERR_CARD_NOT_FOUND,
	ERR_INVALID_SLOT_NO,
	ERR_INVALID_PARA,
	ERR_INVALID_DRIVING_SPEED,
	ERR_INVALID_START_SPEED,
    ERR_INVALID_END_SPEED,
	ERR_INVALID_MPG_SPEED,
	ERR_INVALID_MOVE_DIRECTION,
	ERR_AXES_NOT_MATCH,

	ERR_GROUP_INVALID_DIMENSION,
	ERR_INVALID_GROUP_AXES,
	ERR_GROUP_NOT_CONFIGURED,
	ERR_GROUP_OUT_OF_RANGE,       //invalid Group input parameter
	ERR_INCORRECT_GROUP_ASSIGNED,
	ERR_GROUP_SAME_AXIS,
	ERR_GROUP_RELEASE_REQUIRED,

	ERR_MOTION_NOT_FINISHED,
	ERR_CARD_NOT_REGISTERED,
	ERR_INVALID_AXIS,
	ERR_AXIS_ERROR,              //motion stop due to an axis error (e.g. hardware limit, alarm). Call GetAxisError() to determine the cause of the error
	ERR_CMD_NO_CLOSED_LOOP_SUPPORT,
	ERR_INTERPOL_NOT_CONFIGURED,
	ERR_INVALID_HELICAL_MODE,
	ERR_INVALID_FRNET_SPEED_SETTING,
	ERR_INVALID_FRNET_SA_GROUP_ADDR,
	ERR_INVALID_FRNET_RA_GROUP_ADDR,
	ERR_INVALID_MPG_GAIN,
	ERR_MPG_NOT_CONFIGURED,
	ERR_MOTION_IS_COMPLETED,
	
	ERR_CMD_NOT_FOR_CONTI_INTERPOL,  //20
	ERR_MODE_NOT_FOR_CONTI_INTERPOL,
	ERR_DPRAM_RTC_BLOCKS_AVAILABLE,
	ERR_DPRAM_RTC_BUFFER_FULL,   // All 24 RTC DPRAM buffer are filled with commands and still has to be processed
	EMG_ACVTIVATED,			//emergency has been activated

	ERR_CONFLICT_CONTI_INTERP_CONFIG,
	ERR_CONTI_INTERP_INVALID_CONFIG,
	ERR_CONTI_INTERP_INTERRUPTED,
	ERR_CONTI_INTERP_INVALID_START,
	ERR_CONTI_INTERP_FIFO_EMPTY,
	ERR_NOT_IN_CONTI_INTERP_MODE,
	ERR_CONTI_INTERP_START,
	ERR_INVALID_RING_COUNTER,
	ERR_ISR_IS_USED_FOR_CMP_TRIG,

	ERR_RTC_WAIT_ABORTED,
	ERR_RTC_TIMEOUT,
	ERR_DSP_RESET,
	INFO_SET_DDA_NOT_REQUIRED,
    ERR_EXCEED_MAX_POSTION,
    ERR_NOT_SUPPORTED_BY_VRING_MODE,
    ERR_DLL_DO_NOT_SUPPORT_MULTI_APP,

    ERR_RESERVED_SPACE                =(70),
	//Download firmware error types:
	ERR_BUFFER_UNSUPPORTED_TYPE,
	ERR_BUFFER_INVALID_DATA,
	ERR_BUFFER_INVALID_CONTI_SIZE,
	ERR_BUFFER_INVALID_CONTI_FINISH,
	ERR_BUFFER_START,
	ERR_BUFFER_INVALID_LOOP,
	ERR_BUFFER_INVALID_RESTART,
    

	//DSP return code:
	ERR_DSP_SYSTEM_ERROR             = (-32767),
	ERR_DSP_NOT_IMPLEMENT            = (-32765),
	ERR_DSP_MOTIONPATH_FULL          = (-1001),
	ERR_DSP_REMAIN_STILL             = (-1002),
	ERR_DSP_DIMENSION_OUT_RANGE      = (-1003),
	ERR_DSP_SPEED_VALUE              = (-1004),
	ERR_DSP_SMALLSHAPE_ERROR         = (-1005),
	ERR_DSP_SAWSHAPE_ERROR           = (-1006),
	ERR_DSP_AXIS_INUSE               = (-1007),
	ERR_DSP_NORMALVECTOR             = (-1008),
	ERR_DSP_CIRCLE_RADIUS            = (-1009),
    ERR_DSP_MECH_PARA_VALUE          = (-1011), 

	ERR_DSP_MOTIONPATH_ALREADY_FREE  = (-1100),
	ERR_DSP_EXCEED_SPEED_LIMIT       = (-1201),
    ERR_DSP_EXCEED_VRING_LIMIT       = (-1202),
    ERR_DSP_EXCEED_MAX_POSTION       = (-1203),

	ERR_DSP_NO_COMMAND               = (-2001),
	ERR_DSP_CRC_ERROR                = (-2002),
	ERR_DSP_UNKNOWN_COMMAND          = (-2003),
	ERR_DSP_MULTIBLOCK_CMD           = (-2004),
	ERR_DSP_ACC_TYPE                 = (-2005),
	ERR_DSP_DEC_TYPE                 = (-2006),
	ERR_DSP_CMD_NOT_ALLOWED          = (-2007),

	ERR_DSP_INHIBIT_BY_EMG           = (-2011),
	ERR_DSP_INHIBIT_BY_MPG_EMG       = (-2012),
	ERR_DSP_INHIBIT_BY_PEL           = (-2013),
	ERR_DSP_INHIBIT_BY_MEL           = (-2014),
	ERR_DSP_INHIBIT_BY_ALM           = (-2015),
	ERR_DSP_INHIBIT_BY_RDY           = (-2016),

	ERR_DSP_GROUP_OUT_RANGE          = (-2101),
	ERR_DSP_GROUP_ALREADY_FREE       = (-2102),
	ERR_DSP_GROUP_ASSIGNED           = (-2103),
	ERR_DSP_GROUP_INUSE              = (-2104),
	ERR_DSP_GROUP_NOT_INUSE          = (-2105),
	ERR_DSP_AXIS_ASSIGNED            = (-2106),

	ERR_DSP_CONTROL_MODE             = (-2201),

	ERR_DSP_BUFFER_FULL              = (-2301),
	ERR_DSP_BUFFER_INFO              = (-2302),
	ERR_DSP_BUFFER_TYPE              = (-2303),
	ERR_DSP_BUFFER_SIZE              = (-2304),
	ERR_DSP_BUFFER_INUSE             = (-2305),
	ERR_DSP_BUFFER_NOT_READY         = (-2306),

	ERR_DSP_STOP_BY_P_CHANGE         = (-2401),
	ERR_DSP_CLEAR_STOP               = (-2402),

	ERR_DSP_STOP_BY_GINP             = (-2410),
	ERR_DSP_STOP_BY_AXIS_IO          = (-2430),

	ERR_DSP_NO_AVAILABLE_MACRO       = (-2501),
	ERR_DSP_MACRO_INUSE              = (-2502),
	ERR_DSP_MACRO_EMPTY              = (-2503),

	ERR_DSP_HOMING_IN_PROGRESS       = (-2601),

	ERR_DSP_OUTPUT_SATURATION        = (-3001),
	ERR_DSP_ERR_MSG_BUF_EMPTY        = (-3011),
	ERR_DSP_ERR_MSG_BUF_OVERFLOW     = (-3012),
    ERR_DSP_ERR_TEST_FRAM            = (-4001),
    ERR_DSP_ERR_TEST_DPRAM           = (-4002)

}eRET;

//============================================================================
//====================== i8196F DLL Release Functions===================
//============================================================================

_EXP	eRET __stdcall i8196f_registration( U8 bSlotNo );
_EXP	eRET __stdcall i8196f_check_card_in_slot(U8 bSlotNo);
_EXP	eRET __stdcall i8196f_get_card_version( U8 bSlotNo, U16* pwPCBVersion,U16* pwPLDVersion);
_EXP	eRET __stdcall i8196f_get_fpga_version( U8 bSlotNo, U16* pwFpgaVers );
_EXP	eRET __stdcall i8196f_get_dsp_firmware_version( U8 bSlotNo, U16* pwDspFirmwareVers );
_EXP	eRET __stdcall i8196f_get_dll_version( U16* pwDllVers );

_EXP	eRET __stdcall i8196f_load_power_on_cfg(U8 bSlotNo, ePOWER_ON_SETTING eCfgSource );
_EXP	eRET __stdcall i8196f_save_power_on_cfg(U8 bSlotNo);

_EXP	eRET __stdcall i8196f_get_motion_done( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, U8* pbDone, U16* pwStopStatus	);
_EXP	eRET __stdcall i8196f_get_cmdcounter(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32* plLogicPosCount );
_EXP	eRET __stdcall i8196f_get_enccounter(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32* plEncoderPosCount );
_EXP	eRET __stdcall i8196f_get_position( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32* plPos );
_EXP	eRET __stdcall i8196f_get_max_speed(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, U32* pdwMaxSpeed );
_EXP	eRET __stdcall i8196f_get_speed(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32* plSpeed );
_EXP	eRET __stdcall i8196f_get_acc( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32* plAcc	);

//==================================================================
//------------ RTC Commands
//==================================================================

_EXP	eRET __stdcall i8196f_set_pls_cfg(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, ePULSE_MODE ePulseMode,  ePULSE_LOGIC ePulseLogic, eFORWARD_ACTIVE eDirectionLogic );
_EXP	eRET __stdcall i8196f_set_enc_cfg(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eENCODER_MODE eEncoderMode );
_EXP	eRET __stdcall i8196f_set_limit(U8 bSlotNo, eSINGLE_AXIS eSingleAxis,  eLOGIC_ACTIVE_LEVEL eLimitLogic, eSTOP_MODE eStopMode );
_EXP	eRET __stdcall i8196f_set_softlimit( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eSTOP_MODE eStopMode,	eFEEDBACK_SRC eFeedbackSrc,	I32 lLimitPositive, I32 lLimitNegative);
_EXP	eRET __stdcall i8196f_set_softlimit_disable( U8 bSlotNo, eSINGLE_AXIS eSingleAxis );

_EXP	eRET __stdcall i8196f_set_max_speed(U8 bSlotNo, eSINGLE_AXIS eSingleAxis,  U32 dwMaxSpeed );
_EXP	eRET __stdcall i8196f_set_home_cfg(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eLOGIC_ACTIVE_LEVEL eHomeLogic, eLOGIC_ACTIVE_LEVEL eNHomeLogic,	  
									eLOGIC_ACTIVE_LEVEL eIndexLogic, U8 bHomeSteps,	I32 lStep4Offset);
_EXP	eRET __stdcall i8196f_home_start(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, U32 dwStartSpeed, U32 dwAcceleration, U32 dwDeceleration,		
	                             U32 dwNHomeSearchSpeed, U32 dwHomeSearchSpeed,	eHOME_DIR eHomingDirection );
//Motion DO Setting:
_EXP	eRET __stdcall i8196f_set_axis_do( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eAXIS_DO eDOChannel, eCHANNEL_STATE eIOValue );
_EXP	eRET __stdcall i8196f_set_servo_on( U8 bSlotNo, eSINGLE_AXIS eSingleAxis,  eCHANNEL_STATE eServoOnOff);
_EXP	eRET __stdcall i8196f_set_erc( U8 bSlotNo, eSINGLE_AXIS eSingleAxis,  eCHANNEL_STATE eErcOnOff );
_EXP	eRET __stdcall i8196f_set_alarm_reset( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eCHANNEL_STATE eAlmRstOnOff );
//Motion DI Setting:
_EXP	eRET __stdcall i8196f_set_alarm( U8 bSlotNo,  eSINGLE_AXIS eSingleAxis, eENABLE_DISABLE eEnableDisable,  eLOGIC_ACTIVE_LEVEL eTrigLevel );
_EXP	eRET __stdcall i8196f_set_inp( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eENABLE_DISABLE eEnableDisable, eLOGIC_ACTIVE_LEVEL eINPLogic );
_EXP	eRET __stdcall i8196f_set_ready(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eENABLE_DISABLE eEnableDisable, eLOGIC_ACTIVE_LEVEL eRdyLogic );
_EXP	eRET __stdcall i8196f_set_axis_di_filter( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eENABLE_DISABLE eFilterEnable, eAXIS_DI eAxisDiChannel,	eFILTER_DELAY eDelayTime );
_EXP	eRET __stdcall i8196f_set_di_filter( U8 bSlotNo, eENABLE_DISABLE eFilterEnable, U16 wGeneralDiChannel, eFILTER_DELAY eDelayTime );

_EXP	eRET __stdcall i8196f_set_cmdcounter(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32 lLogicPos	);
_EXP	eRET __stdcall i8196f_set_enccounter(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32 lEncPos );
_EXP	eRET __stdcall i8196f_set_position(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32 lLogicPos );

_EXP	eRET __stdcall i8196f_set_vring_counter( U8 bSlotNo, eSINGLE_AXIS eSingleAxis, U32 dwRingValue	);
_EXP	eRET __stdcall i8196f_get_vring_counter( U8 bSlotNo, eSINGLE_AXIS eSingleAxis,  U32 *pdwRingValue);
_EXP	eRET __stdcall i8196f_disable_vring_counter( U8 bSlotNo, eSINGLE_AXIS eSingleAxis );

_EXP	eRET __stdcall i8196f_set_compare_trig_cfg(U8 bSlotNo,  eSINGLE_AXIS eSingleAxis, eENABLE_DISABLE eCmpTrigEnable, eLOGIC_ACTIVE_LEVEL eOutputLogic,	
                                            eTRIG_PULSE_WIDTH  ePulseWidth,	eCMP_TRIG_MOVE_DIR	eMoveDirection,	eENABLE_DISABLE	 eCmpIncEnable,	
	                                        U16 wConstPitch, I32 lCmpData );

_EXP	eRET __stdcall i8196f_set_conti_interp_cfg(U8 bSlotNo, eINTERP_CONFIG eCfgEnable, U16 wGroupIndex0, U16 wGroupIndex1, U16 wGroupIndex2	);
_EXP	eRET __stdcall i8196f_velocity_move(U8 bSlotNo, eSINGLE_AXIS eBitSingleAxis,	
                                            U32 dwStartSpeed,	U32 dwDriveSpeed, U32 dwAcceleration, eMOVE_DIRECTION  eDirection );

//--------------------------------------------------------------------------------------------------------------------------------
_EXP	eRET __stdcall i8196f_const_move(U8 bSlotNo, eSINGLE_AXIS eBitSingleAxis,	U32 dwDriveSpeed,	I32  lFixedPulse);
_EXP	eRET __stdcall i8196f_abs_const_move( U8 bSlotNo, eSINGLE_AXIS eBitSingleAxis, U32 dwDriveSpeed, I32  lFixedPulse );
//--------------------------------------------------------------------------------------------------------------------------------
_EXP	eRET __stdcall i8196f_t_move( U8 bSlotNo, eSINGLE_AXIS eBitSingleAxis, 
								      U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, 	
								      U32 dwAcceleration, U32 dwDeceleration, I32 lFixedPulse);
_EXP	eRET __stdcall i8196f_abs_t_move( U8 bSlotNo, eSINGLE_AXIS eBitSingleAxis, 
								          U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, 	
								          U32 dwAcceleration, U32 dwDeceleration, I32 lFixedPulse);
//--------------------------------------------------------------------------------------------------------------------------------
_EXP	eRET __stdcall i8196f_s_move( U8 bSlotNo, eSINGLE_AXIS eBitSingleAxis, 
								      U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, 	
								      U32 dwAcceleration, U32 dwDeceleration, I32 lFixedPulse );
_EXP	eRET __stdcall i8196f_abs_s_move( U8 bSlotNo, eSINGLE_AXIS eBitSingleAxis, 
								          U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed,	
								          U32 dwAcceleration, U32 dwDeceleration, I32 lFixedPulse );
//--------------------------------------------------------------------------------------------------------------------------------
_EXP	eRET __stdcall i8196f_t_line2_move(U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSlaveAxis,	
	                                       U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration,	U32 dwDeceleration,		
	                                       I32 lMainAxisRelDist, I32 lSlaveAxisRelDist, 
                                           eINTERPOLATION_MODE eInterpMode	);

_EXP	eRET __stdcall i8196f_abs_t_line2_move(U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSlaveAxis,	
	                                           U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration,	U32 dwDeceleration,		
	                                           I32 lMainAxisFinishPoint, I32 lSlaveAxisFinishPoint,	
	                                           eINTERPOLATION_MODE eInterpMode	);
//--------------------------------------------------------------------------------------------------------------------------------
_EXP	eRET __stdcall i8196f_s_line2_move(U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSlaveAxis,	
	                                       U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration,	U32 dwDeceleration,		
	                                       I32 lMainAxisRelDist, I32 lSlaveAxisRelDist,	
	                                       eINTERPOLATION_MODE eInterpMode);

_EXP	eRET __stdcall i8196f_abs_s_line2_move(U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSlaveAxis,	
	                                           U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration,	U32 dwDeceleration,		
	                                           I32 lMainAxisFinishPoint, I32 lSlaveAxisFinishPoint,	
	                                           eINTERPOLATION_MODE eInterpMode );

//--------------------------------------------------------------------------------------------------------------------------------

_EXP	eRET __stdcall i8196f_t_line3_move(U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSecondAxis, eSINGLE_AXIS eThirdAxis,			
	                                       U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration,		
                                           I32 lMainAxisRelDist, I32 lSecondAxisRelDist, I32 lThirdAxisRelDist,	
                                           eINTERPOLATION_MODE eInterpMode );

_EXP	eRET __stdcall i8196f_abs_t_line3_move(U8 bSlotNo,  eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSecondAxis,	eSINGLE_AXIS eThirdAxis,			
										       U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration,	
										       I32 lMainAxisFinishPoint, I32 lSecondAxisFinishPoint, I32 lThirdAxisFinishPoint,
										       eINTERPOLATION_MODE eInterpMode );


//--------------------------------------------------------------------------------------------------------------------------------

_EXP	eRET __stdcall i8196f_s_line3_move(U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSecondAxis, eSINGLE_AXIS eThirdAxis,			
                                           U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAccelerationRate, U32 dwDecelerationRate,	        
                                           I32 lMainAxisRelDist, I32 lSecondAxisRelDist, I32 lThirdAxisRelDist,	        
                                           eINTERPOLATION_MODE eInterpMode );

_EXP	eRET __stdcall i8196f_abs_s_line3_move(U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSecondAxis, eSINGLE_AXIS eThirdAxis,			        
                                               U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAccelerationRate, U32 dwDecelerationRate,	        
                                               I32 lMainAxisFinishPoint, I32 lSecondAxisFinishPoint, I32 lThirdAxisFinishPoint,	        
                                               eINTERPOLATION_MODE eInterpMode);
//--------------------------------------------------------------------------------------------------------------------------------

_EXP	eRET __stdcall i8196f_t_arc2_move( U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSlaveAxis,			
	                                      U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration,  eARC_DIR eArcDirection,			    
	                                      I32 lMainAxisCenterPoint,	I32 lSlaveAxisCenterPoint, I32 lMainAxisFinishPoint, I32 lSlaveAxisFinishPoint,	        
	                                      eINTERPOLATION_MODE eInterpMode	);


_EXP	eRET __stdcall i8196f_abs_t_arc2_move( U8 bSlotNo, eSINGLE_AXIS eMainAxis, eSINGLE_AXIS eSlaveAxis,			
	                                           U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration, eARC_DIR eArcDirection,			    
	                                           I32 lMainAxisCenterPoint,	I32 lSlaveAxisCenterPoint, I32 lMainAxisFinishPoint, I32 lSlaveAxisFinishPoint,	        
	                                           eINTERPOLATION_MODE eInterpMode );

//--------------------------------------------------------------------------------------------------------------------------------
_EXP	eRET __stdcall i8196f_t_helical_move(U8 bSlotNo, eSINGLE_AXIS eAxis0,	eSINGLE_AXIS eAxis1, eSINGLE_AXIS eAxis2,				
	                                         U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration,		        
	                                         I32 lCenterPoint0,	I32 lCenterPoint1, I32 lCenterPoint2,	                
	                                         I32 lNormalDir0, I32 lNormalDir1, I32 lNormalDir2,
	                                         F32 fAngle, F32 fPitch, eINTERPOLATION_MODE eInterpMode );

_EXP	eRET __stdcall i8196f_abs_t_helical_move(U8 bSlotNo, eSINGLE_AXIS eAxis0,	eSINGLE_AXIS eAxis1, eSINGLE_AXIS eAxis2,				
	                                             U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration,
												 I32 lCenterPoint0,	I32 lCenterPoint1, I32 lCenterPoint2,	                
	                                             I32 lNormalDir0, I32 lNormalDir1, I32 lNormalDir2,
	                                             F32 fAngle, F32 fPitch, eINTERPOLATION_MODE eInterpMode );

//--------------------------------------------------------------------------------------------------------------------------------
_EXP	eRET __stdcall i8196f_lines_move( U8 bSlotNo, U16 wAxes, eACC_DEC_CURVE eAccDecMode,			
	                                      U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration,		        
	                                      const I32 lRelativeDistance[MAX_AXIS_NO], eINTERPOLATION_MODE eInterpMode	);

_EXP	eRET __stdcall i8196f_abs_lines_move( U8 bSlotNo, U16 wAxes, eACC_DEC_CURVE eAccDecMode,			
	                                          U32 dwStartSpeed, U32 dwDriveSpeed, U32 dwEndSpeed, U32 dwAcceleration, U32 dwDeceleration,		        
	                                          const I32 lAbsolutePosition[MAX_AXIS_NO], eINTERPOLATION_MODE eInterpMode	);

//--------------------------------------------------------------------------------------------------------------------------------
//General purpose DIO:
_EXP	eRET __stdcall i8196f_set_general_di_pol( U8 bSlotNo, eGENERAL_DI eDiChannelNo, eLOGIC_ACTIVE_LEVEL eGdiPol );
_EXP	eRET __stdcall i8196f_get_general_di_pol( U8 bSlotNo, eGENERAL_DI eDiChannelNo, eLOGIC_ACTIVE_LEVEL * peGdiPol );
_EXP	eRET __stdcall i8196f_get_general_di( U8 bSlotNo, eGENERAL_DI eDiChannelNo, eCHANNEL_STATE *peOnOff );
_EXP	eRET __stdcall i8196f_set_general_do( U8 bSlotNo, eGENERAL_DO eDoChannelNo, eCHANNEL_STATE eOnOff );
_EXP	eRET __stdcall i8196f_get_general_do( U8 bSlotNo, eGENERAL_DO eDoChannelNo, eCHANNEL_STATE *peOnOff );

_EXP	eRET __stdcall i8196f_set_all_general_di_pol( U8 bSlotNo, U16 wBitMultiGdiPol );
_EXP	eRET __stdcall i8196f_get_all_general_di_pol( U8 bSlotNo, U16* pwBitMultiGdiPol );
_EXP	eRET __stdcall i8196f_get_all_general_di( U8 bSlotNo,  U16* pwMultiGdiStatus);
_EXP	eRET __stdcall i8196f_set_all_general_do( U8 bSlotNo, U16 wMultiGdoStatus );
_EXP	eRET __stdcall i8196f_get_all_general_do( U8 bSlotNo, U16* pwMultiGdoStatus );
//--------------------------------------------------------------------------------------------------------------------------------
// FRnet DIO APIs:
_EXP	eRET __stdcall i8196f_set_frnet_speed( U8 bSlotNo, eFRNET_SPEED eFRnetSpeed );
_EXP	eRET __stdcall i8196f_save_frnet_speed( U8 bSlotNo );
_EXP	eRET __stdcall i8196f_scan_frnet_di( U8 bSlotNo, U16 *pwDIModules	);
_EXP	eRET __stdcall i8196f_get_frnet_di( U8 bSlotNo, eFRNET_DI_ADDR eSA,	U8 bDiChannelNo, eCHANNEL_STATE *peOnOff );

_EXP	eRET __stdcall i8196f_get_frnet_group_di( U8 bSlotNo, eFRNET_DI_ADDR eSA, U16 *pwStatus );
_EXP	eRET __stdcall i8196f_set_frnet_group_do( U8 bSlotNo, eFRNET_DO_ADDR eRA, U16 wDOData );
_EXP	eRET __stdcall i8196f_get_frnet_group_do( U8 bSlotNo, eFRNET_DO_ADDR eRA,	U16 *pwStatus );
//--------------------------------------------------------------------------------------------------------------------------------

_EXP	eRET __stdcall i8196f_drv_hold(U8 bSlotNo, U16 wBitMultiAxes );
_EXP	eRET __stdcall i8196f_drv_start(U8 bSlotNo, U16 wBitMultiAxes );
_EXP	eRET __stdcall i8196f_stop_move(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eSTOP_MODE eStopMode );
_EXP	eRET __stdcall i8196f_reset( U8 bSlotNo );

_EXP	eRET __stdcall i8196f_set_latch_cfg(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eENABLE_DISABLE eLatchEnable, eLOGIC_ACTIVE_LEVEL eLatchLogic );
_EXP	eRET __stdcall i8196f_get_latch(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, I32* plLatchData );
_EXP	eRET __stdcall i8196f_get_error_status(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, U16* pwErrorStatus );
_EXP	eRET __stdcall i8196f_get_mdi_status(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, U16* pwDIStatus );
_EXP	eRET __stdcall i8196f_get_servo_on_status(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eCHANNEL_STATE* peServoOn );
_EXP	eRET __stdcall i8196f_get_servo_erc_status(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eCHANNEL_STATE* peServoErc );
_EXP	eRET __stdcall i8196f_get_servo_almrst_status(U8 bSlotNo, eSINGLE_AXIS eSingleAxis, eCHANNEL_STATE* peServoAlarm );



#endif // _I8196F_LIB_H_