双轨都没抓定位且没切割时,

检测一分钟后,关闭风机
之前功能大致OK,分出改坐标系
bestlqiang 4 years ago
parent d6a18a9f7d
commit 7ff79a1d5c

@ -168,16 +168,23 @@ void CDlgSW_XL_Flow::OnTimer(UINT nIDEvent)
}
static bool bExe = true;
static int Times = 0;
if (gTrackWorkFlow1.IsTrackIdle()&&gTrackWorkFlow2.IsTrackIdle())
{
if (bExe)
{
gTrackWorkFlow1.SendAutoStartFlg(false);
bExe = false;
Times++;
if (Times>300)
{
bExe = false;
Times = 0;
gTrackWorkFlow1.SendAutoStartFlg(false);
}
}
}
else
{
Times = 0;
bExe = true;
}
CDialog::OnTimer(nIDEvent);

@ -833,7 +833,7 @@ void CTrackWorkFlow::MoveToPos(ETrackWorkStep WorkStep)
}
bool CTrackWorkFlow::IsTrackIdle()
{
return (m_CurWorkStep == _ETrack_Step_NULL) || (m_CurWorkStep == _ETrack_Step_Stop);
return (m_CurWorkStep != _ETrack_Step_Catch_mark)&&(m_CurWorkStep != _ETrack_Step_Marking);
}
//上料
void CTrackWorkFlow::Load()
@ -951,15 +951,16 @@ void CTrackWorkFlow::CatchMark()
m_OldWorkStep = _ETrack_Step_NULL;//强制改变之前的状态
return;
}
gCurLockTrackType = m_TrackType;//锁定当前轨道
SetCurTrackWorkStep(_ETrack_Step_Catch_mark);
gCurLockTrackType = m_TrackType;//Ëø¶¨µ±Ç°¹ìµÀ
//收集未移动前的数据
gClientMgr->SendCmd_CollectData();
//gMarkAreaMgr->CollectOrgWorkData(gProgram_SZ_XL->IsbSelMarkMode());
thread t1(&CMarkAreaMgr::CollectOrgWorkData, gMarkAreaMgr, gProgram_SZ_XL->IsbSelMarkMode());
t1.detach();
SetCurTrackWorkStep(_ETrack_Step_Catch_mark);
CString Log = m_TrackName + " CatchMark";
gLogMgr->WriteDebugLog(Log);
@ -1308,6 +1309,8 @@ void CTrackWorkFlow::MarkProcess()
}
gCurLockTrackType = m_TrackType;//锁定
CString Log = m_TrackName + " MarkProcess";
gLogMgr->WriteDebugLog(Log);
@ -1336,8 +1339,6 @@ void CTrackWorkFlow::MarkProcess()
//XY 组切换
MarkProcessExt();
#endif
//设置当前的工作步骤
SetCurTrackWorkStep(_ETrack_Step_Marking);
//数据移动回默认的位置
gProgramCutMgr->MoveObjData(Dbxy(0, 0));
gMarkAreaMgr->MoveAllAreaToTargetPt(Dbxy(0, 0));

Loading…
Cancel
Save