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 信息错误