From 2ee440d9e85eccd73d2c3d4cbfe42cb8c1c25ec0 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 28 六月 2025 14:35:24 +0800
Subject: [PATCH] 1.在stroedJob和Fetchout Job中增加Port的校验; 2.在物料调度中增加检测物料是否已经处理完成的校验;
---
SourceCode/Bond/Servo/ServoDlg.cpp | 54 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index b8c863c..26b9e62 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -21,6 +21,7 @@
#include "SystemLogManagerDlg.h"
#include "UserManager.h"
#include "SystemLogManager.h"
+#include "PortConfigurationDlg.h"
#ifdef _DEBUG
@@ -190,6 +191,18 @@
GetRuntimeFormatText(strText, "");
m_pMyStatusbar->setRunTimeText((LPTSTR)(LPCTSTR)strText);
}
+ else if (state == SERVO::MASTERSTATE::STARTING) {
+ m_pMyStatusbar->setBackgroundColor(STATUSBAR_BK_STARTING);
+ m_pMyStatusbar->setForegroundColor(RGB(0, 0, 0));
+ m_pMyStatusbar->setRunTimeText("正在启动...");
+ }
+ else if (state == SERVO::MASTERSTATE::MSERROR) {
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN)->EnableWindow(TRUE);
+ m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+ m_pMyStatusbar->setBackgroundColor(STATUSBAR_BK_ALARM);
+ m_pMyStatusbar->setForegroundColor(RGB(0, 0, 0));
+ m_pMyStatusbar->setRunTimeText("启动失败.");
+ }
else if (state == SERVO::MASTERSTATE::RUNNING) {
m_pTopToolbar->GetBtn(IDC_BUTTON_RUN)->EnableWindow(FALSE);
m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(TRUE);
@@ -221,6 +234,9 @@
m_pMyStatusbar->setCurTaskBtnText("无");
}
else if (exCode == ROBOT_EVENT_ABORT) {
+ m_pMyStatusbar->setCurTaskBtnText("无");
+ }
+ else if (exCode == ROBOT_EVENT_RESTORE) {
m_pMyStatusbar->setCurTaskBtnText("无");
}
}
@@ -267,6 +283,10 @@
// 执行此操作
SetIcon(m_hIcon, TRUE); // 设置大图标
SetIcon(m_hIcon, FALSE); // 设置小图标
+
+
+ // model init
+ theApp.m_model.init();
// 菜单
@@ -338,9 +358,6 @@
MoveWindow((width - rcWnd.Width()) / 2, 0, rcWnd.Width(), rcWnd.Height(), TRUE);
- // model init
- theApp.m_model.init();
-
SetTimer(TIMER_ID_CREATE_TERMINAL, 3000, nullptr);
InitRxWindows();
@@ -349,6 +366,7 @@
// 相当于延时调用master的初始化
theApp.m_model.m_master.init();
+ theApp.m_model.loadPortParams();
// 初始化master以后需要控件绑定数据
@@ -855,19 +873,41 @@
{
int id = (int)lParam;
if (id == IDC_BUTTON_RUN) {
- theApp.m_model.getMaster().start();
- m_pTopToolbar->GetBtn(IDC_BUTTON_RUN)->EnableWindow(FALSE);
+ if (theApp.m_model.getMaster().getState() == SERVO::MASTERSTATE::MSERROR) {
+ AfxMessageBox("当前有机台发生错误,不能启动,请确认解决问题后再尝试重新启动!");
+ }
+ else {
+ if (theApp.m_model.getMaster().start() == 0) {
+ m_pTopToolbar->GetBtn(IDC_BUTTON_RUN)->EnableWindow(FALSE);
+ }
+ }
}
else if (id == IDC_BUTTON_STOP) {
- theApp.m_model.getMaster().stop();
- m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+ if (theApp.m_model.getMaster().stop() == 0) {
+ m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(FALSE);
+ }
+ }
+ else if (id == IDC_BUTTON_PORT_CONFIG) {
+ CPortConfigurationDlg dlg;
+ dlg.DoModal();
}
else if (id == IDC_BUTTON_ROBOT) {
+ theApp.m_model.getMaster().clearError();
SERVO::CEFEM* pEFEM = (SERVO::CEFEM*)theApp.m_model.getMaster().getEquipment(EQ_ID_EFEM);
CRobotCmdTestDlg dlg;
dlg.SetEFEM(pEFEM);
dlg.DoModal();
}
+ else if (id == IDC_BUTTON_SETTINGS) {
+ SERVO::CEquipment* pEq = theApp.m_model.m_master.getEquipment(EQ_ID_EFEM);
+ ((SERVO::CEFEM*)pEq)->printDebugRobotState();
+ pEq->printDebugString001();
+ pEq = theApp.m_model.m_master.getEquipment(EQ_ID_Bonder1);
+ pEq->printDebugString001();
+ pEq = theApp.m_model.m_master.getEquipment(EQ_ID_Bonder2);
+ pEq->printDebugString001();
+
+ }
else if (id == IDC_BUTTON_OPERATOR) {
int menuId = (int)wParam;
SystemLogManager& logManager = SystemLogManager::getInstance();
--
Gitblit v1.9.3