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.
32 lines
756 B
C++
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;//调整量(针对Z 轴)
|
|
}
|
|
CWorkCmdMotorToOffsetPos::~CWorkCmdMotorToOffsetPos(void)
|
|
{
|
|
}
|
|
bool CWorkCmdMotorToOffsetPos::Excute()
|
|
{
|
|
if(gLogMgr->IsDebuging())//调试状态只延时
|
|
{
|
|
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][马达"+m_Motor.Name()+"][移动到指定位置]";
|
|
gLogMgr->WriteDebugLog(str1);
|
|
} |