You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TwoLaserHead-PushJig/LaiPuLaser/WorkCmdMotorToOffsetPos.cpp

32 lines
756 B
C++

#include "StdAfx.h"
#include "WorkCmdMotorToOffsetPos.h"
#include "MotionCard_PCI1245.h"
CWorkCmdMotorToOffsetPos::CWorkCmdMotorToOffsetPos(CMotor &m)
:m_Motor(m)
{
m_AdjustVal = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>Z <20><>)
}
CWorkCmdMotorToOffsetPos::~CWorkCmdMotorToOffsetPos(void)
{
}
bool CWorkCmdMotorToOffsetPos::Excute()
{
if(gLogMgr->IsDebuging())//<2F><><EFBFBD><EFBFBD>״ֻ̬<CCAC><D6BB>ʱ
{
Sleep(gLogMgr->GetDebugCmdDelay());
return true;
}
if(gMotionCard_PCI1245->IsbUsed())
{
double OffsetDis = m_Motor.GetOriginOffsetDis();
m_Motor.MoveDis(OffsetDis);
}
return true;
}
void CWorkCmdMotorToOffsetPos::WirteLog()
{
CString str1 = "[WorkCmd][<5B><><EFBFBD><EFBFBD>"+m_Motor.Name()+"][<5B>ƶ<EFBFBD><C6B6><EFBFBD>ָ<EFBFBD><D6B8>λ<EFBFBD><CEBB>]";
gLogMgr->WriteDebugLog(str1);
}