1. 程式人生 > >【運動控制】運動控制卡介面函式API

【運動控制】運動控制卡介面函式API

PMC_Get_PMCVersion
PMC_Set_Equivalent
PMC_Get_Equivalent
PMC_Set_EncEquivalent
PMC_Set_SynEquivalent
PMC_Get_SynEquivalent
PMC_Get_EncEquivalent
PMC_Set_Filter
PMC_Set_Home_Config
PMC_Get_Home_Config
PMC_Open
PMC_Close
PMC_Reset
PMC_SwitchCard
PMC_Get_CardNum
PMC_Set_Position
PMC_Get_Position
PMC_Get_MultiPosition
PMC_ZeroPosition
PMC_Set_Encoder
PMC_Get_Encoder
PMC_Get_Vel
PMC_Get_MultiVel
PMC_Set_SoftLimit
PMC_Get_SoftLimit
PMC_Set_PositionErrorProtect
PMC_Get_PositionErrorProtect
PMC_Set_PulseMode
PMC_Get_PulseMode
PMC_Get_MultiPulseMode
PMC_AxisOff
PMC_AxisOn
PMC_Set_Config_AxisState
PMC_Get_Config_AxisState
PMC_Get_AxisState
PMC_Set_AxisState
PMC_ClearState
PMC_Get_AxisIndicateReg
PMC_Get_TriggerPosition
PMC_JOG
PMC_Set_AxisProfile
PMC_Get_AxisProfile
PMC_Set_SynProfile
PMC_Get_SynProfile
PMC_Update_dMaxVChange
PMC_Update
PMC_UniaxialUpdate
PMC_Arc2_Radius
PMC_Arc2_Centre
PMC_Line2
PMC_Line3
PMC_Line4
PMC_Line5
PMC_Line6
PMC_Line7
PMC_Line8
PMC_Position_Time1
PMC_Position_Time2
PMC_Position_Time3
PMC_Position_Time4
PMC_Position_Time5
PMC_Position_Time6
PMC_Position_Time7
PMC_Position_Time8
PMC_Set_Gear
PMC_Get_Gear
PMC_GearOn
PMC_GearOff
PMC_Get_Enable_Gear
PMC_Process_Allocate
PMC_Process_Monitor
PMC_Start_Buffer
PMC_Set_BufferProfile
PMC_Get_BufferProfile
PMC_Set_Buffer_Velocity_Ratio
PMC_Add_Buffer
PMC_End_Buffer
PMC_Execute_Buffer
PMC_Execute_Buffer_BreakPoint
PMC_Delay_Buffer
PMC_Set_Output_Bit_Buffer
PMC_Wait_Input_Bit_Buffer
PMC_Gear_Buffer
PMC_Set_Add_Encode_Buffer
PMC_Set_Enable_Add_Encode_Buffer
PMC_Set_DisEnable_Add_Encode_Buffer
PMC_Set_SmoothStopProfile
PMC_Get_SmoothStopProfile
PMC_Set_SynStopProfile
PMC_Get_SynStopProfile
PMC_Emergent_Stop
PMC_Smooth_Stop
PMC_Get_Dio
PMC_Set_Do
PMC_Get_DioBit
PMC_Set_DoBit
PMC_Get_Execute_Axis
PMC_Wait_Finish_Axis
PMC_Command_Finish
PMC_WaitForInputIdle
PMC_Capture_Enable
PMC_Capture_Disable
PMC_Capture_Data
PMC_Get_Version
PMC_Get_SN
PMC_ErasePage_Flash
PMC_Write_Flash
PMC_Read_Flash
PMC_Set_Time_Count
PMC_Get_Time_Count
PMC_Time_Delay
PMC_Set_RM_Equivalent
PMC_Set_RM_EncEquivalent
PMC_Set_RM_SynEquivalent
PMC_Get_RM_SynEquivalent
PMC_Get_RM_Equivalent
PMC_Get_RM_EncEquivalent
PMC_Open_RMModule
PMC_LoadCfg
PMC_GoHome
PMC_Get_Home_State
PMC_Custom_Buffer_Query
PMC_Set_Config_Pwm_Buffer
PMC_Set_Pwm
PMC_Get_Pwm
PMC_Set_Config_Pwm
PMC_Get_Finish_Pwm
PMC_Set_RMEncoder
PMC_Get_RMEncoder
PMC_Set_RMOutput
PMC_Get_RMOutput
PMC_Get_RMInput
PMC_Set_RMOutput_Bit
PMC_Get_RMOutput_Bit
PMC_Get_RMInput_Bit
PMC_Get_RMVersion
PMC_CfgCompare
PMC_CompareEnable
PMC_Set_RM_Position
PMC_Get_RM_Position
PMC_Get_RM_Vel
PMC_Set_RM_Pulse_Mode
PMC_Get_RM_Pulse_Mode
PMC_Set_RM_Servo_Enble
PMC_Get_RM_Servo_Enble
PMC_Set_RM_Config_AxisState
PMC_Get_RM_Config_AxisState
PMC_Set_RM_Axis_State
PMC_Get_RM_Axis_State
PMC_RM_ClearState
PMC_Set_RM_SmoothStopProfile
PMC_Get_RM_SmoothStopProfile
PMC_Set_RM_SynStopProfile
PMC_Get_RM_SynStopProfile
PMC_RM_Emergent_Stop
PMC_RM_Smooth_Stop
PMC_Get_RM_Trigger_Position
PMC_Get_RM_Execute_Axis
PMC_Set_RM_Filter
PMC_RM_JOG
PMC_Set_RM_Axis_Profile
PMC_Get_RM_Axis_Profile
PMC_Set_RM_SynProfile
PMC_Get_RM_SynProfile
PMC_RM_Update
PMC_RM_Line2
PMC_RM_Line3
PMC_RM_Line4
PMC_Get_RM_Dio
PMC_Set_RM_Do
PMC_Get_RM_DioBit
PMC_Set_RM_DoBit
PMC_Set_RM_Home_Config
PMC_Get_RM_Home_Config
PMC_RM_GoHome
PMC_Get_RM_Home_State


EXTERN_C short WINAPI PMC_Get_PMCVersion(double *PMCVersion, unsigned short CardNum = 0);
EXTERN_C short WINAPI PMC_Set_Equivalent(unsigned short Axis,double AxisEquivalentMolecule,double AxisEquivalentDenominator,unsigned short CardNum = 0);
EXTERN_C short WINAPI PMC_Get_Equivalent(unsigned short Axis,double *AxisEquivalentMolecule,double *AxisEquivalentDenominator,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_EncEquivalent(unsigned short Channel,double EncEquivalentMolecule,double EncEquivalentDenominator,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_SynEquivalent(double AxisSynEquivalent,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_SynEquivalent(double *AxisSynEquivalent,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_EncEquivalent(unsigned short Channel, double *EncEquivalentMolecule, double *EncEquivalentDenominator, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Filter(double Special_IO_Filter,double General_IO_Filter,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Home_Config(unsigned short Axis,double HMaxV,unsigned long HMaxAccTime,double LMaxV,unsigned long LMaxAccTime,double OffSet = 0,double Position = 0,unsigned short Mode = 0,bool OnEncoder = 0,bool OnIndex = 0,bool OnHome = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Home_Config(unsigned short Axis,double* HMaxV,unsigned long* HMaxAccTime,double* LMaxV,unsigned long* LMaxAccTime,double* OffSet,double* Position,unsigned short* Mode,bool* OnEncoder,bool* OnIndex,bool* OnHome,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Open(unsigned short *Number,unsigned short Debug_Mode=0)
EXTERN_C short WINAPI PMC_Close()
EXTERN_C short WINAPI PMC_Reset(unsigned short CardNum=0)
EXTERN_C short WINAPI PMC_SwitchCard(unsigned short Number)
EXTERN_C short WINAPI PMC_Get_CardNum(unsigned short *Number)
EXTERN_C short WINAPI PMC_Set_Position(unsigned short Axis, double Position, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Position(unsigned short Axis, double *Position, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_MultiPosition(unsigned short Axis,double Position[], unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_ZeroPosition(unsigned short Axis, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Encoder(unsigned short Axis, double Endcoder, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Encoder(unsigned short Axis, double *Endcoder, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Vel(unsigned short Axis,double *Command_Vel,double *Encode_Vel, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_MultiVel(unsigned short Axis,double Command_Vel[],double Encode_Vel[], unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_SoftLimit(unsigned short Axis, double Positive_Position,double Negative_Position,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_SoftLimit(unsigned short Axis, double *Positive_Position, double *Negative_Position, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_PositionErrorProtect(unsigned short Axis, double Position_Error, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_PositionErrorProtect(unsigned short Axis, double *Position_Error, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_PulseMode(unsigned short Axis,unsigned long mode, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_PulseMode(unsigned short Axis,unsigned long *mode, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_MultiPulseMode(unsigned short Axis,unsigned long mode[], unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_AxisOff(unsigned short Axis,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_AxisOn(unsigned short Axis,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Config_AxisState(unsigned short Axis,unsigned long Trigger_Enble, unsigned long Trigger_Logic, unsigned long Trigger_Stop_Mode,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Config_AxisState(unsigned short Axis,unsigned long *Trigger_Enble, unsigned long *Trigger_Logic, unsigned long *Trigger_Stop_Mode,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_AxisState(unsigned short Axis,unsigned long *data,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_AxisState(unsigned short Axis,unsigned long data,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_ClearState(unsigned short Axis,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_AxisIndicateReg(unsigned short Axis,unsigned long *data,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_TriggerPosition(unsigned short Axis, double *Position_Encode,double *Position_Cmd, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_JOG(unsigned short Axis,double dMaxV, unsigned long dMaxAccTime, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_AxisProfile(unsigned short Axis,double dMaxV, unsigned long dMaxAccTime,double dV_ini=0,  double dV_end=0,double percent=1, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_AxisProfile(unsigned short Axis,double *dMaxV, unsigned long *dMaxAccTime,double *dV_ini,  double *dV_end, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_SynProfile(double dMaxV, unsigned long dMaxAccTime,double dV_ini=0,  double dV_end=0,double percent=1, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_SynProfile(double *dMaxV, unsigned long *dMaxAccTime,double *dV_ini,  double *dV_end, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Update_dMaxVChange(unsigned short Axis,double dMaxV, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Update(unsigned short Axis,double dDist,short Position_Mode = 0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_UniaxialUpdate(unsigned short Axis,double dDist,short Position_Mode = 0, unsigned short CardNum = 0, unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Arc2_Radius(unsigned short Axis,double dDist1,double dDist2,double Arc_r,double direction, short Position_Mode = 0, unsigned short CardNum = 0, unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Arc2_Centre(unsigned short Axis,double dDist1,double dDist2,double center1,double center2,double direction, short Position_Mode = 0,  unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Line2(unsigned short Axis,double dDist1,double dDist2, short Position_Mode = 0, unsigned short CardNum = 0, unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Line3(unsigned short Axis,double dDist1,double dDist2,double dDist3, short Position_Mode = 0,  unsigned short CardNum = 0,unsigned long CustomNum = 0)				 				 
EXTERN_C short WINAPI PMC_Line4(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4, short Position_Mode = 0,unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Line5(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5, short Position_Mode = 0,unsigned short CardNum = 0, unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Line6(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6, short Position_Mode = 0,  unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Line7(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7, short Position_Mode = 0, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Line8(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7, double dDist8,short Position_Mode = 0, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time1(unsigned short Axis,double dDist1,double Execute_Time,short Position_Mode = 0, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time2(unsigned short Axis,double dDist1,double dDist2,double Execute_Time,short Position_Mode = 0, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time3(unsigned short Axis,double dDist1,double dDist2,double dDist3,double Execute_Time,short Position_Mode = 0,unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time4(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double Execute_Time,short Position_Mode = 0,unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time5(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double Execute_Time,short Position_Mode = 0, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time6(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double Execute_Time,short Position_Mode = 0,unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time7(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7,double Execute_Time,short Position_Mode = 0,unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Position_Time8(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7,double dDist8,double Execute_Time,short Position_Mode = 0, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Set_Gear(unsigned short Group,unsigned short Main_Axis,unsigned short Follow_Axis,unsigned long Denominator,unsigned long Molecule ,unsigned short Follow_Source,unsigned short Dir, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Gear(unsigned short Group,unsigned short *Main_Axis,unsigned short *Follow_Axis,unsigned long *Denominator,unsigned long *Molecule,unsigned short *Follow_Source,unsigned short *Dir, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_GearOn(unsigned short Group, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_GearOff(unsigned short Group, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Enable_Gear(unsigned short *Group, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Process_Allocate(unsigned short *Number, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Process_Monitor(unsigned short Process_Number,unsigned long *Execute_State,unsigned short *Execute_Axis,unsigned short *Execute_Command_Number,unsigned long *Execute_Buffer_Numer, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Start_Buffer(unsigned short bank_num, unsigned short bank_lenght, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_BufferProfile(double dMaxV, unsigned long dMaxAccTime,double dV_ini=0,  double dV_end=0,double percent=1, double inflection=1,unsigned short Velocity_Ratio_Enable=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_BufferProfile(double *dMaxV, unsigned long *dMaxAccTime,double *dV_ini,  double *dV_end,double *inflection, unsigned short *Velocity_Ratio_Enable,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Buffer_Velocity_Ratio(unsigned short Bank_Num,double Velocity_Ratio, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Add_Buffer(unsigned long *number, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_End_Buffer(unsigned long *number, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Execute_Buffer(unsigned short bank_num,unsigned short Mode=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Execute_Buffer_BreakPoint(unsigned short bank_num, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Delay_Buffer(unsigned long number,unsigned short CardNum = 0,unsigned long CustomNum = 0) 
EXTERN_C short WINAPI PMC_Set_Output_Bit_Buffer(short Bit_Number,bool output,unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Wait_Input_Bit_Buffer(short Bit_Number,bool Logic,unsigned short Time_Out, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Gear_Buffer(unsigned short Axis,double dDist, unsigned short CardNum = 0,unsigned long CustomNum = 0)
EXTERN_C short WINAPI PMC_Set_Add_Encode_Buffer(unsigned long Denominator,unsigned long Molecule, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Enable_Add_Encode_Buffer(unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_DisEnable_Add_Encode_Buffer(unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_SmoothStopProfile(unsigned short Axis,double dMaxA, double dJerk=0,unsigned short profile=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_SmoothStopProfile(unsigned short Axis,double *dMaxA, double *dJerk,unsigned short *profile, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_SynStopProfile(double dMaxA, double dJerk=0,unsigned short  profile=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_SynStopProfile(double *dMaxA, double *dJerk,unsigned short  *profile, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Emergent_Stop(unsigned short Axis, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Smooth_Stop(unsigned short Axis,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Dio(unsigned short DioMode,unsigned long *data, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Do(unsigned short DiMode,unsigned long data, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_DioBit(unsigned short DiMode,short Bit_Number,bool *data, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_DoBit(unsigned short DiMode,short Bit_Number,bool data, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Execute_Axis(unsigned long *Axis, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Wait_Finish_Axis(unsigned short Axis,unsigned long dwMilliseconds, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Command_Finish(unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_WaitForInputIdle(unsigned long dwMilliseconds, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Capture_Enable(unsigned short Resolution, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Capture_Disable( unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Capture_Data( double *Postion1,	double *Postion2,	double *Postion3,	double *Postion4,	double *Encode1,double *Encode2,	double *Encode3,	double *Encode4,	unsigned long *Number,	unsigned long Buf_Number=512, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Version(unsigned long *Version, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_SN(long *SN1,long *SN2 ,unsigned short CardNum = 0)   //SN1-高32位;SN2-低32位
EXTERN_C short WINAPI PMC_ErasePage_Flash(unsigned int Flash_Addr, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Write_Flash(unsigned int Flash_Addr,unsigned int Flash_Data, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Read_Flash(unsigned int Flash_Addr,unsigned int *Flash_Data, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Time_Count(unsigned long  Time_Count, unsigned short CardNum = 0)   // 單位:US  
EXTERN_C short WINAPI PMC_Get_Time_Count(unsigned long *Time_Count, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Time_Delay(unsigned long Time_Delay_1US, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_Equivalent(unsigned short Axis,double RM_AxisEquivalentMolecule,double RM_AxisEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_EncEquivalent(unsigned short Channel,double RM_EncEquivalentMolecule,double RM_EncEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_SynEquivalent(double RM_AxisSynEquivalent,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_SynEquivalent(double *RM_AxisSynEquivalent,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Equivalent(unsigned short Axis,double *RM_AxisEquivalentMolecule,double *RM_AxisEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_EncEquivalent(unsigned short Channel,double *RM_EncEquivalentMolecule,double *RM_EncEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Open_RMModule(unsigned short Connection_Number,unsigned short *Station_Number, unsigned short *Station_Type,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_LoadCfg(const char CfgFileName[])
EXTERN_C short WINAPI PMC_GoHome(unsigned short Axis,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Home_State(unsigned short Axis,short* Data,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Custom_Buffer_Query(unsigned long *CustomNum, unsigned short* Execute_Command_Numer,unsigned short CardNum=0)  //查詢
EXTERN_C short WINAPI PMC_Set_Config_Pwm_Buffer(unsigned short Channel,double High_Time,double Low_Time,double Pwm_Number,unsigned short CardNum = 0)   // 單位:MS  [1-1000]
EXTERN_C short WINAPI PMC_Set_Pwm(unsigned short Enable,unsigned short Logic,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_Pwm(unsigned short *Enable,unsigned short *Logic,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_Config_Pwm(unsigned short Channel,double High_Time,double Low_Time,double Pwm_Number,unsigned short CardNum = 0) // 單位:MS  [1-1000]
EXTERN_C short WINAPI PMC_Get_Finish_Pwm(unsigned short *Finish,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RMEncoder(unsigned short Channel, double Encoder,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RMEncoder(unsigned short Channel,double *Encoder,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RMOutput(unsigned long output,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RMOutput(unsigned long *output,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RMInput(unsigned long *input1,unsigned long *input2,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RMOutput_Bit(short Bit_Number,bool output,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RMOutput_Bit(short Bit_Number,bool *output,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RMInput_Bit(short Bit_Number,bool *input,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RMVersion(unsigned long *Version,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_CfgCompare(unsigned short Group,unsigned short Compare_Encoder,unsigned short Compare_Number,unsigned long *Compare_Sheet_Data, unsigned short *Compare_Sheet_Dir,unsigned short Action,unsigned short ActionTime,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_CompareEnable(unsigned short Group,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_Position(unsigned short Axis, double Position,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Position(unsigned short Axis, double *Position,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Vel(unsigned short Axis, double *Command_Vel, double *Encode_Vel, unsigned short Station, unsigned short CardNum = 0) 
EXTERN_C short WINAPI PMC_Set_RM_Pulse_Mode(unsigned short Axis, unsigned long Mode,unsigned short Station = 0,unsigned short CardNum = 0)  
EXTERN_C short WINAPI PMC_Get_RM_Pulse_Mode(unsigned short Axis, unsigned long *Mode,unsigned short Station = 0,unsigned short CardNum = 0)  
EXTERN_C short WINAPI PMC_Set_RM_Servo_Enble(unsigned long Enble,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Servo_Enble(unsigned long *Enble,unsigned short Station = 0,unsigned short CardNum = 0)      
EXTERN_C short WINAPI PMC_Set_RM_Config_AxisState(unsigned short Axis,unsigned long Trigger_Enble, unsigned long Trigger_Logic, unsigned long Trigger_Stop_Mode,unsigned short Station = 0,unsigned short CardNum = 0)     //適用型別:      2
EXTERN_C short WINAPI PMC_Get_RM_Config_AxisState(unsigned short Axis,unsigned long *Trigger_Enble, unsigned long *Trigger_Logic, unsigned long *Trigger_Stop_Mode,unsigned short Station = 0,unsigned short CardNum = 0)     //適用型別:      2
EXTERN_C short WINAPI PMC_Set_RM_Axis_State(unsigned short Axis,unsigned long Data,unsigned short Station = 0,unsigned short CardNum = 0) 
EXTERN_C short WINAPI PMC_Get_RM_Axis_State(unsigned short Axis,unsigned long *Data,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_ClearState(unsigned short Axis,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_SmoothStopProfile(unsigned short Axis,double dMaxA, double dJerk =0 , unsigned short Profile= 0, unsigned short Station=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_SmoothStopProfile(unsigned short Axis,double *dMaxA, double *dJerk, unsigned short *Profile, unsigned short Station=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_SynStopProfile(double dMaxA, double dJerk = 0, unsigned short Profile = 0, unsigned short Station=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_SynStopProfile(double *dMaxA, double *dJerk, unsigned short *Profile, unsigned short Station=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_Emergent_Stop(unsigned short Axis, unsigned short Station=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_Smooth_Stop(unsigned short Axis, unsigned short Station=0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Trigger_Position (unsigned short Axis, double *Position_Encode,double *Position_Cmd,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Execute_Axis(unsigned long *Axis,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_Filter(double Special_IO_Filter,double General_IO_Filter,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_JOG(unsigned short Axis,double dMaxV, unsigned long dMaxAccTime, unsigned short Station = 0,unsigned short CardNum = 0)  
EXTERN_C short WINAPI PMC_Set_RM_Axis_Profile(unsigned short Axis, double dMaxV, unsigned long dMaxAccTime,double dV_ini = 0, double dV_end = 0, double percent = 1,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Axis_Profile(unsigned short Axis,double *dMaxV,unsigned long *dMaxAccTime,double *dV_ini,double *dV_end,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_SynProfile(double dMaxV, unsigned long dMaxAccTime, double dV_ini, double dV_end,double percent = 1,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_SynProfile(double *dMaxV, unsigned long *dMaxAccTime, double *dV_ini, double *dV_end, unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_Update(unsigned short Axis,double dDist, short Position_Mode = 0,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_Line2(unsigned short Axis,double dDist1,double dDist2,short Position_Mode = 0,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_Line3(unsigned short Axis,double dDist1,double dDist2,double dDist3,short Position_Mode = 0,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_Line4(unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,short Position_Mode = 0,unsigned short Station=0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Dio(unsigned short DioMode,unsigned long *data,unsigned short Station = 0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_Do(unsigned short DiMode,unsigned long data, unsigned short Station = 0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_DioBit(unsigned short DiMode,short Bit_Number,bool *data, unsigned short Station = 0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_DoBit(unsigned short DiMode,short Bit_Number,bool data, unsigned short Station = 0, unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Set_RM_Home_Config(unsigned short Axis,double HMaxV,unsigned long HMaxAccTime,double LMaxV,unsigned long LMaxAccTime,double OffSet = 0,double Position = 0,unsigned short Mode = 0,bool OnEncoder = 0,bool OnIndex = 0,bool OnHome = 0,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Home_Config(unsigned short Axis,double* HMaxV,unsigned long* HMaxAccTime,double* LMaxV,unsigned long* LMaxAccTime,double* OffSet,double* Position,unsigned short* Mode,bool* OnEncoder,bool* OnIndex,bool* OnHome,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_RM_GoHome(unsigned short Axis,unsigned short Station = 0,unsigned short CardNum = 0)
EXTERN_C short WINAPI PMC_Get_RM_Home_State(unsigned short Axis,short* Data,unsigned short Station = 0,unsigned short CardNum = 0)

#if !defined(_PMC_H_INCLUDED_)
#define _PMC_H_INCLUDED_

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

#if _WIN32_WINNT < _WIN32_WINNT_WIN2K
#error MXMPAC need _WIN32_WINNT >= _WIN32_WINNT_WIN2K.
#endif

#include <wtypes.h>

#ifdef __cplusplus
extern "C" {
#endif

	//軸選擇引數 
#define AXIS_1              0x1 
#define AXIS_2              0x2 
#define AXIS_3              0x4 
#define AXIS_4              0x8 
#define AXIS_5              0x10
#define AXIS_6              0x20 
#define AXIS_7              0x40 
#define AXIS_8              0x80 
#define AXIS_4ALL           0xf 
#define AXIS_8ALL           0xff 
#define MaxAxis             8
#define MaxAxisBit          0xff
	//曲線規劃引數
#define PROFILE_T           0x0
#define PROFILE_S           0x1
	//位置模式引數
#define POSITION_ABSOLUTE   0x0
#define POSITION_OPPOSITE   0x1
	//圓弧引數
#define CLOCK_WISE          0x0 
#define COUNTER_CLOCK_WISE  0x1 
	// Config Bit
#define CONFIG_HOME         0x00000001
#define CONFIG_LIMIT        0x00000006
#define CONFIG_RIGHT        0x00000002
#define CONFIG_LEFT         0x00000004
#define CONFIG_ALM          0x00000008
#define CONFIG_EMG          0x00000010
#define CONFIG_POSERR       0x00000020
#define CONFIG_INDEX        0x00000040
	//DioMode
#define GPI                     1
#define GPO                     2
#define SERVO_ENABLE            3
	//#define SERVO_ALARM_RESET    4
#define SERVO_ALARM             5
#define NEGATIVE_LIMIT          6
#define POSITIVE_LIMIT          7
#define HOME_TRIGLEVEL          8
#define POSITION_ERROR_ALARM    9
#define EMERGENT_ALARM         10

#define CAPTURE_BLOCK_SIZE 0x200

	//初始化卡函式
	short WINAPI PMC_Open          (unsigned short *Number,unsigned short Debug_Mode=0);
	short WINAPI PMC_Close         ();
	short WINAPI PMC_Reset         (unsigned short CardNum = 0);

	//多卡操作函式
	short WINAPI PMC_SwitchCard    (unsigned short Number);
	short WINAPI PMC_Get_CardNum   (unsigned short *Number);

	//位置設定函式
	short WINAPI PMC_Set_Position             (unsigned short Axis, double Position, unsigned short CardNum = 0);
	short WINAPI PMC_Get_Position             (unsigned short Axis, double *Position, unsigned short CardNum = 0);
	short WINAPI PMC_Set_Encoder              (unsigned short Axis, double Endcoder, unsigned short CardNum = 0);
	short WINAPI PMC_Get_Encoder              (unsigned short Axis, double *Endcoder, unsigned short CardNum = 0);
	short WINAPI PMC_Get_MultiPosition        (unsigned short Axis,double Position[], unsigned short CardNum = 0);
	short WINAPI PMC_Get_TriggerPosition      (unsigned short Axis, double *Position_Encode,double *Position_Cmd, unsigned short CardNum = 0);
	short WINAPI PMC_ZeroPosition             (unsigned short Axis, unsigned short CardNum = 0);
	short WINAPI PMC_Get_Vel                  (unsigned short Axis,double *Command_Vel,double *Encode_Vel, unsigned short CardNum = 0);
	short WINAPI PMC_Get_MultiVel             (unsigned short Axis,double Command_Vel[],double Encode_Vel[], unsigned short CardNum = 0);

	//軸當量設定函式,不設定時預設為1pulse/mm
	short WINAPI PMC_Set_Equivalent           (unsigned short Axis,double AxisEquivalentMolecule,double AxisEquivalentDenominator,unsigned short CardNum = 0);
	short WINAPI PMC_Get_Equivalent           (unsigned short Axis,double *AxisEquivalentMolecule,double *AxisEquivalentDenominator,unsigned short CardNum = 0);
	short WINAPI PMC_Set_SynEquivalent        (double AxisSynEquivalent,unsigned short CardNum = 0);
	short WINAPI PMC_Get_SynEquivalent        (double* AxisSynEquivalent,unsigned short CardNum = 0);
	short WINAPI PMC_Set_EncEquivalent        (unsigned short Channel,double EncEquivalentMolecule,double EncEquivalentDenominator,unsigned short CardNum = 0);
	short WINAPI PMC_Get_EncEquivalent        (unsigned short Channel,double *EncEquivalentMolecule,double *EncEquivalentDenominator,unsigned short CardNum = 0);
	short WINAPI PMC_Set_Filter               (double Special_IO_Filter,double General_IO_Filter,unsigned short CardNum = 0);   //濾波時間  單位:MS   預設:0.1MS

	//引數設定函式
	short WINAPI PMC_Set_SoftLimit            (unsigned short Axis, double Positive_Position,double Negative_Position, unsigned short CardNum = 0);
	short WINAPI PMC_Get_SoftLimit            (unsigned short Axis, double *Positive_Position, double *Negative_Position, unsigned short CardNum = 0);
	short WINAPI PMC_Set_PositionErrorProtect (unsigned short Axis, double Position_Error, unsigned short CardNum = 0);
	short WINAPI PMC_Get_PositionErrorProtect (unsigned short Axis, double *Position_Error, unsigned short CardNum = 0);
	short WINAPI PMC_Set_PulseMode            (unsigned short Axis,unsigned long mode, unsigned short CardNum = 0);
	short WINAPI PMC_Get_PulseMode            (unsigned short Axis,unsigned long *mode, unsigned short CardNum = 0);
	short WINAPI PMC_Get_MultiPulseMode       (unsigned short Axis,unsigned long mode[],unsigned short CardNum = 0);
	short WINAPI PMC_AxisOn                   (unsigned short Axis, unsigned short CardNum = 0);
	short WINAPI PMC_AxisOff                  (unsigned short Axis, unsigned short CardNum = 0);

	//多程序運動監測函式
	short WINAPI PMC_Process_Allocate         (unsigned short *Number,unsigned short CardNum = 0);
	short WINAPI PMC_Process_Monitor          (unsigned short Process_Number,unsigned long *Execute_State,unsigned short *Execute_Axis,unsigned short *Execute_Command_Number,unsigned long *Execute_Buffer_Numer,unsigned short CardNum = 0);
	
	//軸專用訊號事件觸發運動停止函式 
	short WINAPI PMC_Set_Config_AxisState     (unsigned short Axis,unsigned long Trigger_Enble, unsigned long Trigger_Logic, unsigned long Trigger_Stop_Mode, unsigned short CardNum = 0);
	short WINAPI PMC_Get_Config_AxisState     (unsigned short Axis,unsigned long *Trigger_Enble, unsigned long *Trigger_Logic, unsigned long *Trigger_Stop_Mode, unsigned short CardNum = 0);
	short WINAPI PMC_Get_AxisState            (unsigned short Axis,unsigned long *data, unsigned short CardNum = 0);
	short WINAPI PMC_Set_AxisState            (unsigned short Axis,unsigned long data, unsigned short CardNum = 0);
	short WINAPI PMC_ClearState               (unsigned short Axis, unsigned short CardNum = 0);
	short WINAPI PMC_Get_AxisIndicateReg      (unsigned short Axis,unsigned long *data, unsigned short CardNum = 0);
	
	//回零運動函式	
	short WINAPI PMC_Set_Home_Config          (unsigned short Axis,double HMaxV,unsigned long HMaxAccTime,double LMaxV,unsigned long LMaxAccTime,double OffSet = 0,double Position = 0,unsigned short Mode = 0,bool OnEncoder = 0,bool OnIndex = 0,bool OnHome = 0,unsigned short CardNum = 0);
	short WINAPI PMC_Get_Home_Config          (unsigned short Axis,double* HMaxV,unsigned long *HMaxAccTime,double* LMaxV,unsigned long *LMaxAccTime,double* OffSet,double* Position,unsigned short* Mode,bool* OnEncoder,bool* OnIndex,bool* OnHome,unsigned short CardNum = 0);
	short WINAPI PMC_GoHome                   (unsigned short Axis,unsigned short CardNum = 0);
	short WINAPI PMC_Get_Home_State           (unsigned short Axis,unsigned short* Data,unsigned short CardNum = 0);
	
	//單軸JOG控制函式
	short WINAPI PMC_JOG                      (unsigned short Axis,double dMaxV, unsigned long dMaxAccTime, unsigned short CardNum = 0);
	
	//單軸點位,多軸同動運動函式
	short WINAPI PMC_Set_AxisProfile          (unsigned short Axis,double dMaxV, unsigned long dMaxAccTime,double dV_ini=0,  double dV_end=0,double percent=1, unsigned short CardNum = 0);
	short WINAPI PMC_Get_AxisProfile          (unsigned short Axis,double *dMaxV, unsigned long *dMaxAccTime,double *dV_ini,  double *dV_end, unsigned short CardNum = 0);
	short WINAPI PMC_Update                   (unsigned short Axis,double dDist,short Position_Mode = 0, unsigned short CardNum = 0); 
	short WINAPI PMC_Update_dMaxVChange       (unsigned short Axis,double dMaxV, unsigned short CardNum = 0);
	
	//軌跡運動控制函式
	short WINAPI PMC_Set_SynProfile           (double dMaxV, unsigned long dMaxAccTime, double dV_ini=0, double dV_end=0,double percent=1, unsigned short CardNum = 0);
	short WINAPI PMC_Get_SynProfile           (double *dMaxV, unsigned long *dMaxAccTime, double *dV_ini,  double *dV_end, unsigned short CardNum = 0);

	//電子齒輪控制函式
	short WINAPI PMC_Set_Gear                 (unsigned short Group,unsigned short Main_Axis,unsigned short Follow_Axis,unsigned long Denominator,unsigned long Molecule,unsigned short Follow_Source,unsigned short Dir, unsigned short CardNum = 0);
	short WINAPI PMC_Get_Gear                 (unsigned short Group,unsigned short *Main_Axis,unsigned short *Follow_Axis,unsigned long *Denominator,unsigned long *Molecule,unsigned short *Follow_Source,unsigned short *Dir, unsigned short CardNum = 0);
	short WINAPI PMC_GearOn                   (unsigned short Group,unsigned short CardNum = 0);
	short WINAPI PMC_GearOff                  (unsigned short Group,unsigned short CardNum = 0);
	short WINAPI PMC_Get_Enable_Gear          (unsigned short *Group,unsigned short CardNum = 0);
	
	//緩衝區控制函式
	short WINAPI PMC_Start_Buffer             (unsigned short bank_num, unsigned short bank_lenght, unsigned short CardNum = 0);
	short WINAPI PMC_Get_BufferProfile        (double *dMaxV, unsigned long *dMaxAccTime,double *dV_ini,  double *dV_end, double *inflection,unsigned short *Velocity_Ratio_Enable,unsigned short CardNum = 0);
	short WINAPI PMC_Set_Buffer_Velocity_Ratio(unsigned short Bank_Num,double Velocity_Ratio, unsigned short CardNum = 0);
	short WINAPI PMC_Add_Buffer               (unsigned long *number, unsigned short CardNum = 0);
	short WINAPI PMC_End_Buffer               (unsigned long *number, unsigned short CardNum = 0);
	short WINAPI PMC_Execute_Buffer           (unsigned short bank_num,unsigned short Mode = 0, unsigned short CardNum = 0);
	short WINAPI PMC_Execute_Buffer_BreakPoint(unsigned short bank_num, unsigned short CardNum = 0);
	
	//緩衝區X軸編碼器疊加函式
	short WINAPI PMC_Set_Add_Encode_Buffer          (unsigned long Denominator,unsigned long Molecule, unsigned short CardNum = 0);
	short WINAPI PMC_Set_Enable_Add_Encode_Buffer   (unsigned short CardNum = 0);
	short WINAPI PMC_Set_DisEnable_Add_Encode_Buffer(unsigned short CardNum = 0);

	//緊急,平滑停止函式
	short WINAPI PMC_Set_SmoothStopProfile     (unsigned short Axis,double dMaxA, double dJerk=0,unsigned short profile=0, unsigned short CardNum = 0);
	short WINAPI PMC_Get_SmoothStopProfile     (unsigned short Axis,double *dMaxA, double *dJerk,unsigned short  *profile, unsigned short CardNum = 0);
	short WINAPI PMC_Set_SynStopProfile        (double dMaxA, double dJerk=0,unsigned short profile=0, unsigned short CardNum = 0);
	short WINAPI PMC_Get_SynStopProfile        (double *dMaxA, double *dJerk,unsigned short *profile, unsigned short CardNum = 0);
	short WINAPI PMC_Emergent_Stop             (unsigned short Axis, unsigned short CardNum = 0);
	short WINAPI PMC_Smooth_Stop               (unsigned short Axis, unsigned short CardNum = 0);
	
	//數字I/O函式 
	short WINAPI PMC_Get_DioBit                (unsigned short DioMode,short Bit_Number,bool *data, unsigned short CardNum = 0);
	short WINAPI PMC_Set_DoBit                 (unsigned short DioMode,short Bit_Number,bool data, unsigned short CardNum = 0);
	short WINAPI PMC_Get_Dio                   (unsigned short DioMode,unsigned long *data, unsigned short CardNum = 0);
	short WINAPI PMC_Set_Do                    (unsigned short DioMode,unsigned long data, unsigned short CardNum = 0);
	
	//命令運動完成等待函式
	short WINAPI PMC_Get_Execute_Axis          (unsigned long *Axis, unsigned short CardNum = 0);
	short WINAPI PMC_Wait_Finish_Axis          (unsigned short Axis,unsigned long dwMilliseconds=0, unsigned short CardNum = 0);
	short WINAPI PMC_Command_Finish            (unsigned short CardNum = 0);
	short WINAPI PMC_WaitForInputIdle          (unsigned long dwMilliseconds=0, unsigned short CardNum = 0);
	
	//資料捕捉函式
	short WINAPI PMC_Get_Version               (unsigned long *Version, unsigned short CardNum = 0);
	short WINAPI PMC_Get_PMCVersion            (double *PMCVersion, unsigned short CardNum = 0);
	short WINAPI PMC_Get_SN                    (long *SN1,long *SN2 ,unsigned short CardNum = 0);
	
	// flash 讀寫功能
	short WINAPI PMC_ErasePage_Flash           (unsigned int Flash_Addr, unsigned short CardNum = 0);
	short WINAPI PMC_Write_Flash               (unsigned int Flash_Addr,unsigned int Flash_Data, unsigned short CardNum = 0);
	short WINAPI PMC_Read_Flash                (unsigned int Flash_Addr,unsigned int *Flash_Data, unsigned short CardNum = 0);
	
	// 系統時鐘功能
	short WINAPI PMC_Set_Time_Count            (unsigned long  Time_Count, unsigned short CardNum = 0);    // 單位:US  
	short WINAPI PMC_Get_Time_Count            (unsigned long *Time_Count, unsigned short CardNum = 0);
	short WINAPI PMC_Time_Delay                (unsigned long Time_Delay_1US, unsigned short CardNum = 0);

	//配置檔案
	short WINAPI PMC_LoadCfg                   (const char CfgFileName[]);

	//緩衝區段號查詢
	short WINAPI PMC_Custom_Buffer_Query       (unsigned long *CustomNum,unsigned short* Execute_Command_Numer, unsigned short CardNum=0) ; //查詢
	short WINAPI PMC_UniaxialUpdate            (unsigned short Axis,double dDist,short Position_Mode = 0, unsigned short CardNum = 0, unsigned long CustomNum = 0);

	//圓弧插補
	short WINAPI PMC_Arc2_Radius               (unsigned short Axis,double dDist1,double dDist2,double Arc_r,double direction, short Position_Mode=0, unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Arc2_Centre               (unsigned short Axis,double dDist1,double dDist2,double center1,double center2,double direction, short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	
	//直線插補
	short WINAPI PMC_Line2                     (unsigned short Axis,double dDist1,double dDist2, short Position_Mode=0, unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Line3                     (unsigned short Axis,double dDist1,double dDist2,double dDist3, short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Line4                     (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4, short Position_Mode=0,unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Line5                     (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,short Position_Mode=0,unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Line6                     (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6, short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Line7                     (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Line8                     (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7,double dDist8,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	
	//緩衝區操作
	short WINAPI PMC_Set_BufferProfile         (double dMaxV, unsigned long dMaxAccTime,double dV_ini=0,  double dV_end=0,double percent=1,double inflection=1,unsigned short Velocity_Ratio_Enable =0,  unsigned short CardNum = 0);
	short WINAPI PMC_Delay_Buffer              (unsigned long number, unsigned short CardNum = 0, unsigned long CustomNum = 0);  
	short WINAPI PMC_Set_Output_Bit_Buffer     (short Bit_Number,bool output, unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Wait_Input_Bit_Buffer     (short Bit_Number,bool Logic,unsigned short Time_Out=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Gear_Buffer               (unsigned short Axis,double dDist, unsigned short CardNum = 0,unsigned long CustomNum = 0);

	//位置時間控制函式
	short WINAPI PMC_Position_Time1            (unsigned short Axis,double dDist1,double Execute_Time,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Position_Time2            (unsigned short Axis,double dDist1,double dDist2,double Execute_Time,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Position_Time3            (unsigned short Axis,double dDist1,double dDist2,double dDist3,double Execute_Time,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Position_Time4            (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double Execute_Time,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Position_Time5            (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double Execute_Time,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Position_Time6            (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double Execute_Time,short Position_Mode=0, unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Position_Time7            (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7,double Execute_Time,short Position_Mode=0, unsigned short CardNum = 0, unsigned long CustomNum = 0);
	short WINAPI PMC_Position_Time8            (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,double dDist5,double dDist6,double dDist7,double dDist8,double Execute_Time,short Position_Mode=0,  unsigned short CardNum = 0, unsigned long CustomNum = 0);

	//緩衝區PWM函式
	short WINAPI PMC_Set_Config_Pwm_Buffer     (unsigned short Channel,double High_Time,double Low_Time,double Pwm_Number,unsigned short CardNum = 0);   // 單位:MS  [1-1000]
	
	//數字輸出PWM功能()
	short WINAPI PMC_Set_Pwm                   (unsigned short Enable,unsigned short Logic,unsigned short CardNum = 0);
	short WINAPI PMC_Get_Pwm                   (unsigned short *Enable,unsigned short *Logic,unsigned short CardNum = 0);
	short WINAPI PMC_Set_Config_Pwm            (unsigned short Channel,double High_Time,double Low_Time,double Pwm_Number,unsigned short CardNum = 0); // 單位:MS  [1-1000]
	short WINAPI PMC_Get_Finish_Pwm            (unsigned short *Finish,unsigned short CardNum = 0);

	//////////////////////////////////////////////////////////////////////////
	//匯流排擴充套件函式
	short WINAPI PMC_Open_RMModule           (unsigned short Connection_Number,unsigned short *Station_Number, unsigned short *Station_Type,unsigned short CardNum = 0);    //適用型別:0,1,2
	short WINAPI PMC_Set_RMEncoder           (unsigned short Channel,double Encoder,unsigned short Station=0,unsigned short CardNum = 0);                                   //適用型別:0,   2
	short WINAPI PMC_Get_RMEncoder           (unsigned short Channel,double *Encoder,unsigned short Station=0,unsigned short CardNum = 0);                                  //適用型別:0,   2
	short WINAPI PMC_Set_RMOutput            (unsigned long output,unsigned short Station=0,unsigned short CardNum = 0);                                                    //適用型別:0,1,2
	short WINAPI PMC_Get_RMOutput            (unsigned long *output,unsigned short Station=0,unsigned short CardNum = 0);                                                   //適用型別:0,1,2
	short WINAPI PMC_Set_RMOutput_Bit        (short Bit_Number,bool output,unsigned short Station=0,unsigned short CardNum = 0);                                            //適用型別:0,1,2
	short WINAPI PMC_Get_RMOutput_Bit        (short Bit_Number,bool *output,unsigned short Station=0,unsigned short CardNum = 0);                                           //適用型別:0,1,2
	short WINAPI PMC_Get_RMInput             (unsigned long *input1,unsigned long *input2,unsigned short Station=0,unsigned short CardNum = 0);                             //適用型別:0,1,2
	short WINAPI PMC_Get_RMInput_Bit         (short Bit_Number,bool *input,unsigned short Station=0,unsigned short CardNum = 0);                                            //適用型別:0,1,2
	short WINAPI PMC_Get_RMVersion           (unsigned long *Version,unsigned short Station=0,unsigned short CardNum = 0);                                                  //適用型別:0,1,2

	//位置比較功能
	short WINAPI PMC_CfgCompare              (unsigned short Group,unsigned short Compare_Encoder,unsigned short Compare_Number,
		unsigned long *Compare_Sheet_Data,
		unsigned short *Compare_Sheet_Dir,unsigned short Action,
		unsigned short ActionTime,unsigned short Station=0,unsigned short CardNum = 0);
	short WINAPI PMC_CompareEnable           (unsigned short Group,unsigned short Station=0,unsigned short CardNum = 0);

	//引數設定函式
	short WINAPI PMC_Set_RM_Position         (unsigned short Axis, double Position,unsigned short Station = 0,unsigned short CardNum = 0);          //適用型別:      2                                    
	short WINAPI PMC_Get_RM_Position         (unsigned short Axis, double *Position,unsigned short Station = 0,unsigned short CardNum = 0);         //適用型別:      2
	short WINAPI PMC_Set_RM_Pulse_Mode       (unsigned short Axis, unsigned long Mode,unsigned short Station = 0,unsigned short CardNum = 0);       //適用型別:      2
	short WINAPI PMC_Get_RM_Pulse_Mode       (unsigned short Axis, unsigned long *Mode,unsigned short Station = 0,unsigned short CardNum = 0);      //適用型別:      2
	short WINAPI PMC_Set_RM_Servo_Enble      (unsigned long Enble, unsigned short Station = 0, unsigned short CardNum = 0);                         //適用型別:      2
	short WINAPI PMC_Get_RM_Servo_Enble      (unsigned long *Enble, unsigned short Station = 0, unsigned short CardNum = 0);                        //適用型別:      2

	//軸專用訊號事件觸發運動停止函式 
	short WINAPI PMC_Set_RM_Config_AxisState (unsigned short Axis,unsigned long Trigger_Enble, unsigned long Trigger_Logic, unsigned long Trigger_Stop_Mode,unsigned short Station = 0,unsigned short CardNum = 0);     //適用型別:      2
	short WINAPI PMC_Get_RM_Config_AxisState (unsigned short Axis,unsigned long *Trigger_Enble, unsigned long *Trigger_Logic, unsigned long *Trigger_Stop_Mode,unsigned short Station = 0,unsigned short CardNum = 0);  //適用型別:      2
	short WINAPI PMC_Set_RM_Axis_State       (unsigned short Axis,unsigned long Data,unsigned short Station = 0,unsigned short CardNum = 0);                                                                            //適用型別:      2
	short WINAPI PMC_Get_RM_Axis_State       (unsigned short Axis,unsigned long *Data,unsigned short Station = 0,unsigned short CardNum = 0);                                                                           //適用型別:      2
	short WINAPI PMC_RM_ClearState           (unsigned short Axis,unsigned short Station = 0,unsigned short CardNum = 0);

	short WINAPI PMC_Get_RM_Trigger_Position (unsigned short Axis, long *Position_Encode,long *Position_Cmd,unsigned short Station = 0,unsigned short CardNum = 0);            //適用型別:      2

	//命令運動完成等待函式
	short WINAPI PMC_Get_RM_Execute_Axis     (unsigned long *Axis,unsigned short Station = 0,unsigned short CardNum = 0);

	//數字I/O濾波函式 	
	short WINAPI PMC_Set_RM_Filter           (double Special_IO_Filter,double General_IO_Filter,unsigned short Station = 0,unsigned short CardNum = 0);                        //適用型別:      2    //濾波時間  單位:MS   預設:0.1MS 

	//軸引數
	short WINAPI PMC_Set_RM_Equivalent       (unsigned short Axis,double RM_AxisEquivalentMolecule,double RM_AxisEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0);         //適用型別:      2
	short WINAPI PMC_Get_RM_Equivalent       (unsigned short Axis,double *RM_AxisEquivalentMolecule,double *RM_AxisEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0);       //適用型別:      2
	short WINAPI PMC_Set_RM_EncEquivalent    (unsigned short Channel,double RM_EncEquivalentMolecule,double RM_EncEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0);        //適用型別:      2
	short WINAPI PMC_Get_RM_EncEquivalent    (unsigned short Channel,double *RM_EncEquivalentMolecule,double *RM_EncEquivalentDenominator,unsigned short Station = 0,unsigned short CardNum = 0);      //適用型別:      2
	short WINAPI PMC_Set_RM_SynEquivalent    (double RM_AxisSynEquivalent,unsigned short Station = 0,unsigned short CardNum = 0);                                                                      //適用型別:      2
	short WINAPI PMC_Get_RM_SynEquivalent    (double *RM_AxisSynEquivalent,unsigned short Station = 0,unsigned short CardNum = 0);                                                                     //適用型別:      2

	//速度控制函式                      
	short WINAPI PMC_RM_JOG                  (unsigned short Axis,double dMaxV, unsigned long dMaxAccTime, unsigned short Station = 0,unsigned short CardNum = 0);                                     //適用型別:      2 

	//緊急,平滑停止函式
	short WINAPI PMC_Set_RM_SmoothStopProfile(unsigned short Axis,double dMaxA, double dJerk= 0, unsigned short Profile= 0, unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_Get_RM_SmoothStopProfile(unsigned short Axis,double *dMaxA, double *dJerk, unsigned short *Profile, unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_Set_RM_SynStopProfile   (double dMaxA, double dJerk= 0, unsigned short Profile= 0, unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_Get_RM_SynStopProfile   (double *dMaxA, double *dJerk, unsigned short *Profile, unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_RM_Emergent_Stop        (unsigned short Axis, unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_RM_Smooth_Stop          (unsigned short Axis, unsigned short Station = 0, unsigned short CardNum = 0);

	//運動控制函式
	short WINAPI PMC_Set_RM_Axis_Profile	 (unsigned short Axis, double dMaxV, unsigned long dMaxAccTime,double dV_ini = 0, double dV_end = 0, double percent = 1,unsigned short Station=0,unsigned short CardNum = 0);                                                                       //適用型別:2
	short WINAPI PMC_Get_RM_Axis_Profile     (unsigned short Axis,double *dMaxV,unsigned long *dMaxAccTime,double *dV_ini,double *dV_end,unsigned short Station=0,unsigned short CardNum = 0);                                                                           //適用型別:2
	short WINAPI PMC_Set_RM_SynProfile		 (double dMaxV, unsigned long dMaxAccTime, double dV_ini, double dV_end,double percent = 1,unsigned short Station = 0,unsigned short CardNum = 0);       //適用型別:2 
	short WINAPI PMC_Get_RM_SynProfile		 (double *dMaxV, unsigned long *dMaxAccTime, double *dV_ini, double *dV_end, unsigned short Station = 0,unsigned short CardNum = 0);     //適用型別:2

	short WINAPI PMC_RM_Update               (unsigned short Axis,double dDist, short Position_Mode = 0,unsigned short Station = 0,unsigned short CardNum = 0);                                              //適用型別:2
	short WINAPI PMC_RM_Line2                (unsigned short Axis,double dDist1,double dDist2,short Position_Mode = 0,unsigned short Station = 0,unsigned short CardNum = 0);                                //適用型別:2
	short WINAPI PMC_RM_Line3                (unsigned short Axis,double dDist1,double dDist2,double dDist3,short Position_Mode = 0,unsigned short Station = 0,unsigned short CardNum = 0);	                 //適用型別:2			 				 
	short WINAPI PMC_RM_Line4                (unsigned short Axis,double dDist1,double dDist2,double dDist3,double dDist4,short Position_Mode = 0,unsigned short Station = 0,unsigned short CardNum = 0);    //適用型別:2

	//I/O函式 
	short WINAPI PMC_Get_RM_Dio              (unsigned short DioMode,unsigned long *data,unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_Set_RM_Do               (unsigned short DiMode,unsigned long data, unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_Get_RM_DioBit           (unsigned short DiMode,short Bit_Number,bool *data, unsigned short Station = 0, unsigned short CardNum = 0);
	short WINAPI PMC_Set_RM_DoBit            (unsigned short DiMode,short Bit_Number,bool data, unsigned short Station = 0, unsigned short CardNum = 0);      

	//回原點
	short WINAPI PMC_Set_RM_Home_Config      (unsigned short Axis,double HMaxV,unsigned long HMaxAccTime,double LMaxV,unsigned long LMaxAccTime,double OffSet = 0,double Position = 0,unsigned short Mode = 0,bool OnEncoder = 0,bool OnIndex = 0,bool OnHome = 0,unsigned short Station = 0,unsigned short CardNum = 0);
	short WINAPI PMC_Get_RM_Home_Config      (unsigned short Axis,double* HMaxV,unsigned long* HMaxAccTime,double* LMaxV,unsigned long* LMaxAccTime,double* OffSet,double* Position,unsigned short* Mode,bool* OnEncoder,bool* OnIndex,bool* OnHome,unsigned short Station = 0,unsigned short CardNum = 0);
	short WINAPI PMC_RM_GoHome               (unsigned short Axis,unsigned short Station = 0,unsigned short CardNum = 0);
	short WINAPI PMC_Get_RM_Home_State       (unsigned short Axis,unsigned short* Data,unsigned short Station = 0,unsigned short CardNum = 0);

	//Add
	short WINAPI PMC_Get_RM_Vel              (unsigned short Axis, double *Command_Vel, double *Encode_Vel, unsigned short Station, unsigned short CardNum = 0);
	short WINAPI PMC_Capture_Enable          (unsigned short Resolution, unsigned short CardNum = 0);
	short WINAPI PMC_Capture_Disable         (unsigned short CardNum = 0);
	short WINAPI PMC_Capture_Data            (double *Postion1,double *Postion2,double *Postion3,double *Postion4,
		double *Encode1,double *Encode2,double *Encode3,double *Encode4,
		unsigned long *Number,unsigned long Buf_Number=512,unsigned short CardNum = 0);

#ifdef __cplusplus
}
#endif

#endif // _PMC_H_

#define ERR_LIB_INIT_ERROR					1			//初始化庫失敗,檢查是否安裝主動程式
#define ERR_COMMUNICATE_ERROR				2			//通訊出錯
#define ERR_CARD_NOT_EXIST					3			//當前卡不存在,檢查卡號
#define ERR_CLOSE_CARD_FAILE				4			//關閉卡失敗
#define ERR_SEND_COMMAND_ERROR				5			//運動指令傳輸錯誤
#define ERR_COMMAND_EXECUTING				6			//指令正在執行
#define ERR_VEL_PROFILE_PARA_ERROR			7			//速度曲線引數設定錯誤
#define ERR_AXIS_SET_ERROR					8			//軸號設定錯誤
#define ERR_ARC_INTPL_DIR_ERROR				9			//圓弧插補方向設定錯誤
#define ERR_JOINT_MOVE_ERROR				10			//多軸聯動錯誤
#define ERR_STOP_PROFILE_PARA_ERROR			11			//停止運動速度曲線引數錯誤
#define ERR_VEL_MODE_PARA_ERROR				12			//速度模式引數設定錯誤
#define ERR_BUF_CREATE_PARA_ERROR			13			//開闢緩衝區引數錯誤
#define ERR_BUF_TERMINATE_PARA_ERROR		14			//結束緩衝區錯誤
#define ERR_BUF_NO_COMMAND					15			//執行的緩衝區沒有指令
#define ERR_HOME_FAIL						16			//零位尋找失敗
#define ERR_SET_PROSPECT_PROFILE_ERROR		17		    //設定前瞻引數錯誤
#define ERR_SET_PROSPECT_MOVE_ERROR			18		    //設定前瞻運動錯誤
#define ERR_COMMAND_WAIT_TIMEOUT			19			//等待命令完成超時
#define ERR_WAIT_ORDER_EVENT_TRIGGER_ERROR  20          //表示等待命令出現事件觸發
#define ERR_DATA_CAPTURE_BUF_ERROR			21			//資料捕捉緩失敗存設定錯誤
#define ERR_MEMORY_ALLOCATE_FAILE			22			//記憶體開闢 
#define ERR_COMMAND_LENGTH_EXCEED			23			//指令長度超出所開闢的記憶體
#define ERR_GEAR_PARA_ERROR					24			//電子齒輪引數設定錯誤
#define ERR_SERVO_ALARM						25			//伺服報警而不能設定使能,需處理好伺服報警並清除狀態位
#define ERR_PARA_OVERFLOW					26			//指令引數溢位 
#define ERR_EVENT_TRIGGER_ERR				27			//表示指令執行的軸有事件觸發被禁止執行
#define ERR_WAIT_IO_INPUT_DELAY_ERROR       28          //表示緩衝區等待輸入IO超時
#define ERR_PROCESS_EXCEED_ERROR			29		    //表示程序數超出範圍
#define ERR_CARD_TIMER_ERROR				30			//表示控制卡定時器出錯.
#define ERR_NETWORK_COMMUNICATE_ERROR       31          //表示網路通訊錯誤
#define ERR_ILLEGAL_INSTRUCTION_ERROR       32          //表示非法指令執行

#define ERR_HOME_THREAD_CREATE_FAILE		40			//回零執行緒建立失敗
#define ERR_HOME_IN_PROCESS					41			//正在回零中
#define ERR_HOME_PROFILE_PARA_ERROR			42			//回零引數設定錯誤
#define ERR_IO_MODE_SET_ERROR				43			//IO模式設定錯誤

#define ERR_CONFIG_CARD0_EQUIVALENT			100			//配置檔案中卡0合成當量或IO濾波引數資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS1			101			//配置檔案中卡0 軸1 資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS2			102			//配置檔案中卡0 軸2 資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS3			103			//配置檔案中卡0 軸3 資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS4			104			//配置檔案中卡0 軸4 資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS5			105			//配置檔案中卡0 軸5 資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS6			106			//配置檔案中卡0 軸6 資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS7			107			//配置檔案中卡0 軸7 資訊錯誤
#define ERR_CONFIG_CARD0_INFOAXIS8			108			//配置檔案中卡0 軸8 資訊錯誤

#define ERR_CONFIG_CARD1_EQUIVALENT			110			//配置檔案中卡1合成當量或IO濾波引數資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS1			111			//配置檔案中卡1 軸1 資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS2			112			//配置檔案中卡1 軸2 資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS3			113			//配置檔案中卡1 軸3 資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS4			114			//配置檔案中卡1 軸4 資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS5			115			//配置檔案中卡1 軸5 資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS6			116			//配置檔案中卡1 軸6 資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS7			117			//配置檔案中卡1 軸7 資訊錯誤
#define ERR_CONFIG_CARD1_INFOAXIS8			118			//配置檔案中卡1 軸8 資訊錯誤