剥离第一阶段需要做的函数,梳理关系,新增测试dll工程
This commit is contained in:
@@ -602,8 +602,7 @@ HSI_STATUS HSI_Motion::Startup(HWND _hWnd, bool _bOfflineOnly)
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//获取EF3固件版本
|
||||
//=============================获取EF3固件版本===============================
|
||||
HSI_STATUS HSI_Motion::GetFirmwareVersion(byte *version)
|
||||
{
|
||||
m_Thread_StateData = HSI_THREAD_PAUSED;
|
||||
@@ -658,12 +657,10 @@ HSI_STATUS HSI_Motion::GetFirmwareVersion(byte *version)
|
||||
}
|
||||
}
|
||||
m_Thread_StateData = HSI_THREAD_RUNNING;
|
||||
SetEvent(m_hTriggerEventData);
|
||||
SetEvent(m_hTriggerEventData); //触发事件,其中hEvent表示句柄,返回值:如果操作成功,则返回非零值,否则为0。
|
||||
return HSI_STATUS_NORMAL;
|
||||
}
|
||||
|
||||
//回家
|
||||
//===========================================================================
|
||||
//================================回家=======================================
|
||||
HSI_STATUS HSI_Motion::HomeMachine(bool bHomed)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -1175,8 +1172,7 @@ HSI_STATUS HSI_Motion::ZeroPos(bool bZeroPos)
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//JOG模式
|
||||
//===========================================================================
|
||||
//===============================JOG模式============================================
|
||||
HSI_STATUS HSI_Motion::Jog(UINT AxisTypes, double Speed)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -1847,7 +1843,7 @@ int HSI_Motion::P2P(short AxisNumber, long Pos, double Speed, double Acc)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//运动控制部分
|
||||
//===========================================================================
|
||||
HSI_STATUS HSI_Motion::GetPositionEncPrfMulti(UINT AxisTypes, double *EncPos, double *PrfPos, int Count)
|
||||
@@ -2563,7 +2559,7 @@ HSI_STATUS HSI_Motion::SetPositionXyz(UINT AxisTypes, double PositionX, double
|
||||
ReleaseMutex(g_WR_ToMove_Mutex);
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
int HSI_Motion::CaculateStepMotorACC(int pos, int maxacc, int minacc)
|
||||
{
|
||||
double mpos = (double)abs(pos) / 1000;
|
||||
@@ -2574,7 +2570,6 @@ int HSI_Motion::CaculateStepMotorACC(int pos, int maxacc, int minacc)
|
||||
acc = maxacc;
|
||||
return acc;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
HSI_STATUS HSI_Motion::SetPositionXyza(UINT AxisTypes, double PositionX, double PositionY, double PositionZ, double PositionA, HSI_MOTION_MOVE_TYPE eType, double dFlyRadius)
|
||||
{
|
||||
@@ -2600,7 +2595,7 @@ HSI_STATUS HSI_Motion::SetPositionXyzCache(UINT AxisTypes, HSI_MOTION_MOVE_TYPE
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
HSI_STATUS HSI_Motion::SetCircleInterpolate(double PositionX, double PositionY, double PositionZ)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -2615,9 +2610,7 @@ HSI_STATUS HSI_Motion::SetCircleInterpolate(double PositionX, double PositionY
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//探针接口
|
||||
//===========================================================================
|
||||
//===========================探针接口================================================
|
||||
void HSI_Motion::ProbeRetractManDist(int RetractManDist)
|
||||
{
|
||||
if (g_pHSI_Motion)
|
||||
@@ -2748,9 +2741,7 @@ HSI_STATUS HSI_Motion::JogProbe(UINT AxisTypes, double Speed)
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//读取配置
|
||||
//===========================================================================
|
||||
//=============================读取配置==============================================
|
||||
HSI_STATUS HSI_Motion::Load_EF3_Motion_Inifile(CString GoogolIniFile)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -2975,9 +2966,7 @@ HSI_STATUS HSI_Motion::Load_EF3_Config_Inifile(CString GoogolIniFile)
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//读取/设置光栅尺精度
|
||||
//===========================================================================
|
||||
//===============================读取/设置光栅尺精度============================================
|
||||
HSI_STATUS HSI_Motion::GetScaleResolution(double &_ScaleX, double &_ScaleY, double &_ScaleZ)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -3001,9 +2990,7 @@ HSI_STATUS HSI_Motion::SetScaleResolution(double _ScaleX, double _ScaleY, double
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//回调定位完成
|
||||
//===========================================================================
|
||||
//============================回调定位完成===============================================
|
||||
void HSI_Motion::SendMsgMotionFinished()
|
||||
{
|
||||
sEvenProp.Init();
|
||||
@@ -3013,8 +3000,7 @@ void HSI_Motion::SendMsgMotionFinished()
|
||||
EventCallback(sEvenProp);
|
||||
}
|
||||
|
||||
//回调探针运行
|
||||
//===========================================================================
|
||||
//=============================回调探针运行==============================================
|
||||
void HSI_Motion::SendMsgProbeFinished()
|
||||
{
|
||||
sEvenProp.Init();
|
||||
@@ -3023,7 +3009,6 @@ void HSI_Motion::SendMsgProbeFinished()
|
||||
sEvenProp.EventResponse = HSI_EVENT_FUNCTION_OK;
|
||||
EventCallback(sEvenProp);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
void HSI_Motion::UpdateMotionState()
|
||||
{
|
||||
@@ -3427,8 +3412,7 @@ HSI_STATUS HSI_Motion::SpecialMotorMove(short AxisNumber, double Position)
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//IO
|
||||
//===========================================================================
|
||||
//========================IO===================================================
|
||||
HSI_STATUS HSI_Motion::GetDIO(UINT IOChannel, UINT& _Status)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -3546,9 +3530,8 @@ HSI_STATUS HSI_Motion::GetAxisStatus(int* _Status)
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
//===========================================================================
|
||||
|
||||
//暂停和关闭
|
||||
//=============================暂停和关闭==============================================
|
||||
HSI_STATUS HSI_Motion::AbortMotion()
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -3587,7 +3570,7 @@ HSI_STATUS HSI_Motion::AbortMotion()
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
//===========================================================================
|
||||
//===============================关闭============================================
|
||||
HSI_STATUS HSI_Motion::Shutdown()
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -3650,9 +3633,8 @@ HSI_STATUS HSI_Motion::Shutdown()
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
//===========================================================================
|
||||
|
||||
//触发灯光
|
||||
//==============================触发灯光=============================================
|
||||
HSI_STATUS HSI_Motion::SetTriggerLight(int triggleNum, int delayLighting, int delayLightBefor, int triggleMode, double* Intensities)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -3714,8 +3696,7 @@ HSI_STATUS HSI_Motion::SetTriggerLight(int triggleNum, int delayLighting, int de
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//硬件触发拍照
|
||||
//===========================================================================
|
||||
//=============================硬件触发拍照==============================================
|
||||
HSI_STATUS HSI_Motion::DCCPPStartPoint(double *startPoint)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -4271,8 +4252,7 @@ HSI_STATUS HSI_Motion::DCCForLightPlate()
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//转盘
|
||||
//===========================================================================
|
||||
//===============================转盘============================================
|
||||
HSI_STATUS HSI_Motion::StartPlcJob(int* CamerasDis, int* BinsDis, int SubArea, int filterTime1, int filterTime2, int pluseSumDis)
|
||||
{
|
||||
g_pLogger->SendAndFlushWithTime(L"[StartPlcJob] In\n");
|
||||
@@ -4387,6 +4367,7 @@ HSI_STATUS HSI_Motion::GetTriggleCount(int *nCount, int& nArea)
|
||||
}
|
||||
//===========================================================================
|
||||
//点胶
|
||||
//===========================================================================
|
||||
HSI_STATUS HSI_Motion::GluePPSpnts(int* ppsDir, double* gluePPSPos, int* delayLightBefore, int* lightTime, double* lightData, int num)
|
||||
{
|
||||
auto rStatus = HSI_STATUS_NORMAL;
|
||||
@@ -5272,9 +5253,7 @@ HSI_STATUS HSI_Motion::GetPntsDistance(double& pDistance, int& spTimeCount)
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
//===========================================================================
|
||||
//运动控制参数读取及设置
|
||||
//===========================================================================
|
||||
//========================运动控制参数读取及设置===================================================
|
||||
int HSI_Motion::SpeedPercent(int AxisNum, double &Speed, int &DirveSpeed, int &StartSpeed, int &AccLine, int &DecLine, int &AccCurve, int &DecCurve)
|
||||
{
|
||||
int MovetoSpeedGear = 0;
|
||||
@@ -5336,9 +5315,7 @@ int HSI_Motion::SpeedPercent(int AxisNum, double &Speed, int &DirveSpeed, int &S
|
||||
Speed = MovetoSpeedGear * flag;
|
||||
return (int)Speed;
|
||||
}
|
||||
//===========================================================================
|
||||
//JoyStick运动控制参数读取及设置
|
||||
//===========================================================================
|
||||
//==========================JoyStick运动控制参数读取及设置=================================================
|
||||
bool HSI_Motion::SpeedPercentJoyStick(int AxisNum, long &Speed, int &DirveSpeed, int &StartSpeed, int &AccLine, int &DecLine, int &AccCurve, int &DecCurve)
|
||||
{
|
||||
Speed = Speed > 1000 ? 1000 : Speed;
|
||||
|
||||
Reference in New Issue
Block a user