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.
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "WorkCmdMotorToMachineOrigin.h"
|
|
|
|
|
#include "MotionCard_PCI1245.h"
|
|
|
|
|
|
|
|
|
|
CWorkCmdMotorToMachineOrigin::CWorkCmdMotorToMachineOrigin(CMotor &m)
|
|
|
|
|
:m_Motor(m)
|
|
|
|
|
{
|
|
|
|
|
m_bSaveOffsetDis = false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>¼ƫ<C2BC>ƾ<EFBFBD><C6BE><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
CWorkCmdMotorToMachineOrigin::~CWorkCmdMotorToMachineOrigin(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
bool CWorkCmdMotorToMachineOrigin::Excute()
|
|
|
|
|
{
|
|
|
|
|
if(gLogMgr->IsDebuging())//<2F><><EFBFBD><EFBFBD>״ֻ̬<CCAC><D6BB>ʱ
|
|
|
|
|
{
|
|
|
|
|
Sleep(gLogMgr->GetDebugCmdDelay());
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
bool ret;
|
|
|
|
|
if(gMotionCard_PCI1245->IsbUsed())
|
|
|
|
|
{
|
|
|
|
|
ret = gMotionCard_PCI1245->FindOrigin(m_Motor);
|
|
|
|
|
}
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
void CWorkCmdMotorToMachineOrigin::WirteLog()
|
|
|
|
|
{
|
|
|
|
|
CString str1 = "[WorkCmd][<5B><><EFBFBD><EFBFBD>"+m_Motor.Name()+"][<5B><><EFBFBD>ػ<EFBFBD>еԭ<D0B5><D4AD>]";
|
|
|
|
|
gLogMgr->WriteDebugLog(str1);
|
|
|
|
|
}
|
|
|
|
|
void CWorkCmdMotorToMachineOrigin::SetPar(bool b)
|
|
|
|
|
{
|
|
|
|
|
m_bSaveOffsetDis = b;
|
|
|
|
|
}
|