格式整理,在原来基础上做减法 减去遥杆、光照、探针等功能

This commit is contained in:
wio
2022-09-30 16:45:28 +08:00
parent 7c4c565d09
commit 2f481baaa2
57 changed files with 84021 additions and 207 deletions
+88 -87
View File
@@ -141,94 +141,95 @@ typedef enum {
class HSI_Motion : public HSI
{
public:
HSI_Motion();
~HSI_Motion();
HSI_STATUS IsSupported(UINT &Types);
HSI_Motion();
~HSI_Motion();
HSI_STATUS IsSupported(UINT &Types);
virtual HSI_STATUS Startup(HWND _hWnd, bool _bOfflineOnly);
virtual HSI_STATUS Startup(HWND _hWnd, bool _bOfflineOnly);
HSI_STATUS GetFirmwareVersion(byte *version);
HSI_STATUS GetFirmwareVersion(byte *version);
HSI_STATUS HomeMachine(bool bHomed);
HSI_STATUS HomeJog(short AxisNumber, short Dir, bool Wait = false);
HSI_STATUS HomeFindIndex();
HSI_STATUS ZeroPos(bool bZeroPos);
HSI_STATUS IsHomed(bool &bHomed);
HSI_STATUS GetSpeedXyz(int AxisNum, double &Speed);
HSI_STATUS SetSpeedXyz(double Speed);
HSI_STATUS GetFocusSpeed(double &Speed);
HSI_STATUS SetFocusSpeed(double Speed);
HSI_STATUS GetAccelerationXyz(double &AccelX, double &AccelY, double &AccelZ);
HSI_STATUS SetAccelerationXyz(double AccelX, double AccelY, double AccelZ);
HSI_STATUS GetSpeedR(double &Speed);
HSI_STATUS SetSpeedR(double Speed);
HSI_STATUS HomeMachine(bool bHomed);
HSI_STATUS HomeJog(short AxisNumber, short Dir, bool Wait = false);
HSI_STATUS HomeFindIndex();
HSI_STATUS ZeroPos(bool bZeroPos);
HSI_STATUS IsHomed(bool &bHomed);
HSI_STATUS GetSpeedXyz(int AxisNum, double &Speed);
HSI_STATUS SetSpeedXyz(double Speed);
HSI_STATUS GetFocusSpeed(double &Speed);
HSI_STATUS SetFocusSpeed(double Speed);
HSI_STATUS GetAccelerationXyz(double &AccelX, double &AccelY, double &AccelZ);
HSI_STATUS SetAccelerationXyz(double AccelX, double AccelY, double AccelZ);
HSI_STATUS GetSpeedR(double &Speed);
HSI_STATUS SetSpeedR(double Speed);
HSI_STATUS GetScaleResolution(double &_ScaleX, double &_ScaleY, double &_ScaleZ);
HSI_STATUS SetScaleResolution(double _ScaleX, double _ScaleY, double _ScaleZ);
HSI_STATUS GetScaleResolution(double &_ScaleX, double &_ScaleY, double &_ScaleZ);
HSI_STATUS SetScaleResolution(double _ScaleX, double _ScaleY, double _ScaleZ);
HSI_STATUS GetDeadBand(double &DeadbandX, double &DeadbandY, double &DeadbandZ, double &DeadbandR);
HSI_STATUS GetRefreshDeadBand(double &Deadband);
HSI_STATUS GetDeadBand(double &DeadbandX, double &DeadbandY, double &DeadbandZ, double &DeadbandR);
HSI_STATUS GetRefreshDeadBand(double &Deadband);
HSI_STATUS Jog(UINT AxisTypes, double Speed);
HSI_STATUS Jog(UINT AxisTypes, double Speed);
HSI_STATUS JoyStick(UINT AxisTypes, long Speed);
HSI_STATUS StopJog();
HSI_STATUS StopJogEx(UINT AxisTypes);
HSI_STATUS GetPositionEncPrfMulti(UINT AxisTypes, double *EncPos, double *PrfPos, int Count);
HSI_STATUS GetPositionXyz(UINT AxisTypes, double &PositionX, double &PositionY, double &PositionZ, double &Time);
HSI_STATUS GetPositionXyzaProbe(UINT AxisTypes, double &PositionX, double &PositionY, double &PositionZ, double &PositionA);
HSI_STATUS GetPositionEncPrfMulti(UINT AxisTypes, double *EncPos, double *PrfPos, int Count);
HSI_STATUS GetPositionXyz(UINT AxisTypes, double &PositionX, double &PositionY, double &PositionZ, double &Time);
HSI_STATUS GetPositionXyzaProbe(UINT AxisTypes, double &PositionX, double &PositionY, double &PositionZ, double &PositionA);
HSI_STATUS GetEncoderXyz(long *lEncoderVal);
HSI_STATUS JogProbe(UINT AxisTypes, double Speed);
void ProbeRetractManDist(int RetractManDist);
int CaculateStepMotorACC(int pos, int maxacc, int minacc);
HSI_STATUS SetPositionXyz(UINT AxisTypes, double PositionX, double PositionY, double PositionZ, HSI_MOTION_MOVE_TYPE eType, double dFlyRadius);
HSI_STATUS SetPositionXyza(UINT AxisTypes, double PositionX, double PositionY, double PositionZ, double PositionA, HSI_MOTION_MOVE_TYPE eType, double dFlyRadius);
HSI_STATUS SetPositionXyzCache(UINT AxisTypes, HSI_MOTION_MOVE_TYPE eType, int DataCount, Point *CacheData);
HSI_STATUS GetPositionR(UINT AxisTypes, double &PositionR, double &Time);
HSI_STATUS SetPositionR(UINT AxisTypes, double PositionR, HSI_MOTION_AXIS_R_MOVE_TYPE DirectionType, bool bWait);
HSI_STATUS SetCircleInterpolate(double PositionX, double PositionY, double PositionZ);
HSI_STATUS Load_EF3_Motion_Inifile(CString GoogolIniFile);
HSI_STATUS Load_EF3_Config_Inifile(CString GoogolIniFile);
HSI_STATUS AbortMotion();
HSI_STATUS JogProbe(UINT AxisTypes, double Speed);
void ProbeRetractManDist(int RetractManDist);
int CaculateStepMotorACC(int pos, int maxacc, int minacc);
HSI_STATUS SetPositionXyz(UINT AxisTypes, double PositionX, double PositionY, double PositionZ, HSI_MOTION_MOVE_TYPE eType, double dFlyRadius);
HSI_STATUS SetPositionXyza(UINT AxisTypes, double PositionX, double PositionY, double PositionZ, double PositionA, HSI_MOTION_MOVE_TYPE eType, double dFlyRadius);
HSI_STATUS SetPositionXyzCache(UINT AxisTypes, HSI_MOTION_MOVE_TYPE eType, int DataCount, Point *CacheData);
HSI_STATUS GetPositionR(UINT AxisTypes, double &PositionR, double &Time);
HSI_STATUS SetPositionR(UINT AxisTypes, double PositionR, HSI_MOTION_AXIS_R_MOVE_TYPE DirectionType, bool bWait);
HSI_STATUS SetCircleInterpolate(double PositionX, double PositionY, double PositionZ);
HSI_STATUS Load_EF3_Motion_Inifile(CString GoogolIniFile);
HSI_STATUS Load_EF3_Config_Inifile(CString GoogolIniFile);
HSI_STATUS AbortMotion();
HSI_STATUS GetDIO(UINT IOChannel, UINT& _Status);
HSI_STATUS SetDIO(UINT IOChannel, UINT _Status);
HSI_STATUS GetAxisStatus(int* _Status);
HSI_STATUS GetAppPath(CString &Path);
virtual HSI_STATUS Shutdown();
HSI_STATUS GetDIO(UINT IOChannel, UINT& _Status);
HSI_STATUS SetDIO(UINT IOChannel, UINT _Status);
HSI_STATUS GetAxisStatus(int* _Status);
HSI_STATUS GetAppPath(CString &Path);
virtual HSI_STATUS Shutdown();
HSI_STATUS IsSupportedEx(UINT AxisTypes, UINT &Types);
HSI_STATUS StartupEx(UINT AxisTypes, bool bHome);
HSI_STATUS GetScaleResolutionEx(UINT AxisTypes, double &Scale);
HSI_STATUS SetScaleResolutionEx(UINT AxisTypes, double Scale);
HSI_STATUS GetPositionEx(UINT AxisTypes, double &Position, double &Time);
HSI_STATUS SetPositionStep(UINT AxisTypes, double Position, HSI_MOTION_MOVE_TYPE eType, double dSpeedGear);
HSI_STATUS SetPositionEx(UINT AxisTypes, double Position, HSI_MOTION_MOVE_TYPE eType, double dSpeedGear);
HSI_STATUS GetSpeedEx(UINT AxisTypes, double &Speed);
HSI_STATUS SetSpeedEx(UINT AxisTypes, double Speed);
HSI_STATUS GetAccelerationEx(UINT AxisTypes, double &Accel);
HSI_STATUS SetAccelerationEx(UINT AxisTypes, double Accel);
HSI_STATUS IsSupportedEx(UINT AxisTypes, UINT &Types);
HSI_STATUS StartupEx(UINT AxisTypes, bool bHome);
HSI_STATUS GetScaleResolutionEx(UINT AxisTypes, double &Scale);
HSI_STATUS SetScaleResolutionEx(UINT AxisTypes, double Scale);
HSI_STATUS GetPositionEx(UINT AxisTypes, double &Position, double &Time);
HSI_STATUS SetPositionStep(UINT AxisTypes, double Position, HSI_MOTION_MOVE_TYPE eType, double dSpeedGear);
HSI_STATUS SetPositionEx(UINT AxisTypes, double Position, HSI_MOTION_MOVE_TYPE eType, double dSpeedGear);
HSI_STATUS GetSpeedEx(UINT AxisTypes, double &Speed);
HSI_STATUS SetSpeedEx(UINT AxisTypes, double Speed);
HSI_STATUS GetAccelerationEx(UINT AxisTypes, double &Accel);
HSI_STATUS SetAccelerationEx(UINT AxisTypes, double Accel);
HSI_STATUS SetTriggerLight(int triggleNum, int delayLighting, int delayLightBefor,int triggleMode, double* Intensities);
HSI_STATUS DCCPPStartPoint(double *startPoint);
HSI_STATUS DCCScanSetData(UINT AxisTypes, HSI_SCAN_MOTION_TYPE eType, UINT lTrigNumber, double* dTrigDis);
HSI_STATUS DCCScanStart();
HSI_STATUS DCCScanStop();
HSI_STATUS DCCForLightPlate();
HSI_STATUS SetTriggerLight(int triggleNum, int delayLighting, int delayLightBefor,int triggleMode, double* Intensities);
HSI_STATUS DCCPPStartPoint(double *startPoint);
HSI_STATUS DCCScanSetData(UINT AxisTypes, HSI_SCAN_MOTION_TYPE eType, UINT lTrigNumber, double* dTrigDis);
HSI_STATUS DCCScanStart();
HSI_STATUS DCCScanStop();
HSI_STATUS DCCForLightPlate();
HSI_STATUS IOStep(bool RunSts);
HSI_STATUS IOprogram(byte* SendData,int length);
HSI_STATUS IOStep(bool RunSts);
HSI_STATUS IOprogram(byte* SendData,int length);
HSI_STATUS FindOriginTest(bool state);
HSI_STATUS FindOriginTest(bool state);
HSI_STATUS StartPlcJob(int* CamerasDis, int* BinsDis, int SubArea,int filterTime1, int filterTime2,int pluseSumDis);
HSI_STATUS SendBinResult(int* BinResult);
HSI_STATUS GetTriggleCount(int* nCount, int& nArea);
HSI_STATUS GluePPSpnts(int* ppsDir, double* gluePPSPos, int* delayLightBefore, int* lightTime, double* lightData, int num);
HSI_STATUS GlueDispenser(int* index, int* cirdirection , double* gluePos, int num);
HSI_STATUS GlueDispenserStart(double xOffset, double yOffset, double qOffset);
HSI_STATUS GetPntsDistance(double& ptpDistance,int& spTimeCount);
HSI_STATUS StartPlcJob(int* CamerasDis, int* BinsDis, int SubArea,int filterTime1, int filterTime2,int pluseSumDis);
HSI_STATUS SendBinResult(int* BinResult);
HSI_STATUS GetTriggleCount(int* nCount, int& nArea);
HSI_STATUS GluePPSpnts(int* ppsDir, double* gluePPSPos, int* delayLightBefore, int* lightTime, double* lightData, int num);
HSI_STATUS GlueDispenser(int* index, int* cirdirection , double* gluePos, int num);
HSI_STATUS GlueDispenserStart(double xOffset, double yOffset, double qOffset);
HSI_STATUS GetPntsDistance(double& ptpDistance,int& spTimeCount);
public:
static int m_Thread_State;
static HANDLE m_Thread_Id;
@@ -468,26 +469,26 @@ public:
void UpdateMotionStateData();
//读取EF3的JOG位置 以便停止JOG运动
static unsigned __stdcall m_ThreadJOGStop(LPVOID pThis);
void CreateThreadJOGStop();
void CloseThreadJOGStop();
void UpdateMotionStateJOGStop();
static unsigned __stdcall m_ThreadJOGStop(LPVOID pThis);
void CreateThreadJOGStop();
void CloseThreadJOGStop();
void UpdateMotionStateJOGStop();
void SendMsgMotionFinished();
void SendMsgProbeFinished();
VOID EventCallback(sHSIEventProperties& sEventProp);
int SpeedPercent(int AxisNum, double &Speed,int &DriveSpeed,int &StartSpeed, int &AccLine, int &DecLine,int &AccCurve,int &DecCurve);
void SendMsgMotionFinished();
void SendMsgProbeFinished();
VOID EventCallback(sHSIEventProperties& sEventProp);
int SpeedPercent(int AxisNum, double &Speed,int &DriveSpeed,int &StartSpeed, int &AccLine, int &DecLine,int &AccCurve,int &DecCurve);
bool SpeedPercentJoyStick(int AxisNum, long &Speed, int &DriveSpeed, int &StartSpeed, int &AccLine, int &DecLine, int &AccCurve, int &DecCurve);
void HomeJogGearsChoice(int AxisType, int JogGears, int &DriveSpeed, int &StartSpeed, int &AccLine, int &DecLine, int &AccCurve, int &DecCurve);
short AxisConvertIndex(UINT AxisTypes);
short IndexConvertAxis(int Index);
double LimitOver(UINT AxisTypes, double &LimitPos);
int P2P(short AxisNumber, long Pos, double Speed, double Acc);
void DoEvents();
HSI_STATUS DriverAlarmStatus();
HSI_STATUS FirstHome();
HSI_STATUS SpecialMotorHome(short AxisNum);
HSI_STATUS SpecialMotorMove(short AxisNum, double Position);
short AxisConvertIndex(UINT AxisTypes);
short IndexConvertAxis(int Index);
double LimitOver(UINT AxisTypes, double &LimitPos);
int P2P(short AxisNumber, long Pos, double Speed, double Acc);
void DoEvents();
HSI_STATUS DriverAlarmStatus();
HSI_STATUS FirstHome();
HSI_STATUS SpecialMotorHome(short AxisNum);
HSI_STATUS SpecialMotorMove(short AxisNum, double Position);
private:
UINT ActiveAxis;