📄 mccl_fun.h
字号:
_declspec(dllexport)void _stdcall MCC_TimeDelay(unsigned int dwTime);
// Set/Get Over-Speed Ratio for General Motions
_declspec(dllexport)double _stdcall MCC_OverrideSpeed(double dfRate, WORD wGroupIndex = 0);
_declspec(dllexport)double _stdcall MCC_GetOverrideRate(WORD wGroupIndex = 0);
_declspec(dllexport)double _stdcall MCC_ChangeFeedSpeed(double dfSpeed, WORD wGroupIndex = 0);
// Set/Get Over-Speed Ratio for Point to Point Motion
_declspec(dllexport)double _stdcall MCC_OverridePtPSpeed(double dfRate, WORD wGroupIndex = 0);
_declspec(dllexport)double _stdcall MCC_GetPtPOverrideRate(WORD wGroupIndex = 0);
_declspec(dllexport)double _stdcall MCC_ChangePtPSpeed(double dfRatio, WORD wGroupIndex = 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Encoder Control
_declspec(dllexport)int _stdcall MCC_SetENCRoutineEx(ENCISR_EX pfnEncoderRoutine, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetENCInputRate(WORD wInputRate, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_ClearENCCounter(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetENCValue(long *plValue, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetENCLatchType(WORD wType, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetENCLatchSource(WORD wSource, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetENCLatchValue(long *plLatchValue, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableENCIndexTrigger(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableENCIndexTrigger(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetENCIndexStatus(WORD *pwStatus, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetENCCompValue(long lValue, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableENCCompTrigger(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableENCCompTrigger(WORD wChannel, WORD wCardIndex = 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Timer & Watch Dog Control
_declspec(dllexport)int _stdcall MCC_SetTimer(DWORD dwValue, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableTimer(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableTimer(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableTimerTrigger(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableTimerTrigger(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetWatchDogTimer(WORD wValue, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetWatchDogResetPeriod(DWORD dwValue, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableWatchDogTimer(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableWatchDogTimer(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_RefreshWatchDogTimer(WORD wCardIndex = 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// D/A Converter Control
_declspec(dllexport)int _stdcall MCC_SetDACClockDivider(WORD wDivider, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetDACOutput(float fVoltage, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetDACTriggerOutput(float fVoltage, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetDACTriggerSource(DWORD dwSource, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableDACTriggerMode(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableDACTriggerMode(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_StartDACConv(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_StopDACConv(WORD wCardIndex = 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// A/D Converter Control
_declspec(dllexport)int _stdcall MCC_SetADCRoutine(ADCISR pfnADCRoutine, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCClockDivider(WORD wDivider, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCConvType(WORD wConvType, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetADCConvType(WORD *pwConvType, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCConvMode(WORD wConvMode, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetADCInput(float *pfInput, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCSingleChannel(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetADCWorkStatus(WORD *pwSTatus, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableADCConvTrigger(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableADCConvTrigger(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCTagChannel(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableADCTagTrigger(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableADCTagTrigger(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCCompMask(WORD wMask, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCCompType(WORD wCompType, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetADCCompValue(float fValue, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetADCCompValue(float *pfValue, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableADCCompTrigger(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableADCCompTrigger(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableADCConvChannel(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableADCConvChannel(WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_StartADCConv(WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_StopADCConv(WORD wCardIndex = 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Remote Input/Output Control
_declspec(dllexport)int _stdcall MCC_SetRIORoutineEx(RIOISR_EX pfnRIORoutine, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetRIOClockDivider(WORD wDivider, WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableRIOSetControl(WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableRIOSetControl(WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableRIOSlaveControl(WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableRIOSlaveControl(WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetRIOTransStatus(WORD *pwStatus, WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetRIOMasterStatus(WORD *pwStatus, WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetRIOSlaveStatus(WORD *pwStatus, WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetRIOInputValue(WORD *pwValue, WORD wSet, WORD wPort, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetRIOOutputValue(WORD wValue, WORD wSet, WORD wPort, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetRIOTransError(WORD wTime, WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetRIOTriggerType(WORD wType, WORD wSet, WORD wDigitalInput, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableRIOInputTrigger(WORD wSet, WORD wDigitalInput, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableRIOInputTrigger(WORD wSet, WORD wDigitalInput, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_EnableRIOTransTrigger(WORD wSet, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_DisableRIOTransTrigger(WORD wSet, WORD wCardIndex = 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Simulation
// Enable/Disable Simulation
_declspec(dllexport)void _stdcall MCC_EnableSimulation();
_declspec(dllexport)void _stdcall MCC_DisableSimulation();
_declspec(dllexport)void _stdcall MCC_SimulationRoutine();
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Other Functions
_declspec(dllexport)int _stdcall MCC_SetMotionConfig(MOTION_CONFIG *pstMotionConfig, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetPtPMotionConfig(PTP_MOTION_CONFIG *pstPtPMotionConfig, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetCurPulseCommand(int *pnCurCommand, WORD wGroupIndex = 0);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// for compitable
#ifndef _EPCIO_DEV_H_
typedef struct _LIO_INT
{
BYTE LDI0;
BYTE LDI1;
BYTE LDI2;
BYTE LDI3;
BYTE LDI4;
BYTE LDI5;
BYTE LDI6;
BYTE LDI7;
BYTE DFI0;
BYTE DFI1;
BYTE DFI2;
BYTE DFI3;
BYTE DFI4;
BYTE DFI5;
BYTE DFI6;
BYTE TIMER;
} LIOINT;
typedef struct _ENC_INT
{
BYTE COMP0;
BYTE COMP1;
BYTE COMP2;
BYTE INDEX0;
BYTE INDEX1;
BYTE INDEX2;
} ENCINT;
typedef struct _RIO_INT
{
BYTE S0DI0;
BYTE S0DI1;
BYTE S0DI2;
BYTE S0DI3;
BYTE S1DI0;
BYTE S1DI1;
BYTE S1DI2;
BYTE S1DI3;
BYTE S2DI0;
BYTE S2DI1;
BYTE S2DI2;
BYTE S2DI3;
BYTE FAIL;
} RIOINT;
typedef void(_stdcall *LIOISR)(LIOINT*);
typedef void(_stdcall *ENCISR)(ENCINT*);
typedef void(_stdcall *RIOISR)(RIOINT*);
#endif
_declspec(dllexport)int _stdcall MCC_SetGroupContent(WORD wGroupIndex, WORD wCardIndex, int nChannel0, int nChannel1, int nChannel2, int nChannel3, int nChannel4, int nChannel5);
_declspec(dllexport)int _stdcall MCC_SetMachParam(SYS_MACH_PARAM *pstMachParam, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetMachParam(SYS_MACH_PARAM *pstMachParam, WORD wChannel, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_UpdateMachParam();
_declspec(dllexport)int _stdcall MCC_SetAccStep(int nStep, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetAccStep(WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetDecStep(int nStep, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetDecStep(WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetPtPAccStep(int nStep0, int nStep1, int nStep2, int nStep3, int nStep4, int nStep5, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetPtPAccStep(int *pnStep0, int *pnStep1, int *pnStep2, int *pnStep3, int *pnStep4, int *pnStep5, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetPtPDecStep(int nStep0, int nStep1, int nStep2, int nStep3, int nStep4, int nStep5, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_GetPtPDecStep(int *pnStep0, int *pnStep1, int *pnStep2, int *pnStep3, int *pnStep4 , int *pnStep5, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetGoHomeAccTime(double dfTime0, double dfTime1, double dfTime2, double dfTime3, double dfTime4, double dfTime5);
_declspec(dllexport)int _stdcall MCC_GetGoHomeAccTime(double *pdfTime0, double *pdfTime1, double *pdfTime2, double *pdfTime3, double *pdfTime4, double *pdfTime5);
_declspec(dllexport)int _stdcall MCC_SetGoHomeDecTime(double dfTime0, double dfTime1, double dfTime2, double dfTime3, double dfTime4, double dfTime5);
_declspec(dllexport)int _stdcall MCC_GetGoHomeDecTime(double *pdfTime0, double *pdfTime1, double *pdfTime2, double *pdfTime3, double *pdfTime4, double *pdfTime5);
_declspec(dllexport)int _stdcall MCC_SetGoHomeAccStep(int nStep0, int nStep1, int nStep2, int nStep3, int nStep4, int nStep5);
_declspec(dllexport)int _stdcall MCC_GetGoHomeAccStep(int *pnStep0, int *pnStep1, int *pnStep2, int *pnStep3, int *pnStep4, int *pnStep5);
_declspec(dllexport)int _stdcall MCC_SetGoHomeDecStep(int nStep0, int nStep1, int nStep2, int nStep3, int nStep4, int nStep5);
_declspec(dllexport)int _stdcall MCC_GetGoHomeDecStep(int *pnStep0, int *pnStep1, int *pnStep2, int *pnStep3, int *pnStep4, int *pnStep5);
_declspec(dllexport)int _stdcall MCC_SetLeaveHomeSensorSpeed(double dfXSpeed, double dfYSpeed, double dfZSpeed, double dfUSpeed, double dfVSpeed, double dfWSpeed, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_GoHome(double dfXSpeed, double dfYSpeed, double dfZSpeed, double dfUSpeed, double dfVSpeed, double dfWSpeed, int nXOrder, int nYOrder, int nZOrder, int nUOrder, int nVOrder, int nWOrder, WORD wCardIndex = 0);
_declspec(dllexport)double _stdcall MCC_SetOverSpeed(double dfRate, WORD wGroupIndex = 0);
_declspec(dllexport)double _stdcall MCC_GetOverSpeed(WORD wGroupIndex = 0);
_declspec(dllexport)double _stdcall MCC_SetPtPOverSpeed(double dfRate, WORD wGroupIndex = 0);
_declspec(dllexport)double _stdcall MCC_GetPtPOverSpeed(WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetLIORoutine(LIOISR pfnLIORoutine, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetENCRoutine(ENCISR pfnEncoderRoutine, WORD wMode, WORD wCardIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetRIORoutine(RIOISR pfnRIORoutine, WORD wSet, WORD wCardIndex = 0);
// Spindle
_declspec(dllexport)int _stdcall MCC_SetSpindleChannel(WORD wChannel, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetSpindleAccTime(double dfAccTime, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetSpindleDecTime(double dfDecTime, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_SetSpindleSpeed(double dfRevolution, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_RunSpindle(BYTE byDir, WORD wGroupIndex = 0);
_declspec(dllexport)int _stdcall MCC_StopSpindle(WORD wGroupIndex = 0);
#ifdef __cplusplus
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -