From b25ce186da97a1a774ddf89504f97d8c244fda66 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期四, 29 一月 2026 09:25:06 +0800
Subject: [PATCH] 1.移除 SubEqpStart/End(CEID 10015/10016) 2.UnitStart/UnitEnd 增加 PanelID(5006/5007) 3.Report/CEID 两个表都同步了对应 VIDs/备注
---
SourceCode/Bond/Servo/CPageGraph2.cpp | 136 +++++++++-----------------------------------
1 files changed, 29 insertions(+), 107 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index bc21845..1156425 100644
--- a/SourceCode/Bond/Servo/CPageGraph2.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -64,10 +64,8 @@
if (RX_CODE_EQ_DATA_CHANGED == code) {
// 閫氱煡璁惧鐘舵��
SERVO::CEquipment* pEquipment = nullptr;
- if (pAny->getPtrValue("ptr", (void*&)pEquipment)) {
- if (pEquipment != nullptr) {
- m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, pEquipment->hasGlass());
- }
+ if (pAny->getPtrValue("ptr", (void*&)pEquipment) && pEquipment != nullptr) {
+ UpdateItemIndicators(pEquipment);
}
}
@@ -127,7 +125,7 @@
ASSERT(pItem);
SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- CHMPropertyDlg dlg(pEquipment->getName().c_str(), 658, 788);
+ CHMPropertyDlg dlg(pEquipment->getName().c_str(), 1258, 788);
CPageLinkSignal* pPage1 = new CPageLinkSignal();
pPage1->setEquipment(pEquipment);
@@ -212,93 +210,14 @@
// 娴嬭瘯
else if (nCmd == ID_EQSGRAPHITEM_TEST1) {
- BOOL bTestGenerate = FALSE;
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- if (pEquipment->getID() == EQ_ID_LOADPORT4 && !pEquipment->hasGlass()) {
- ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G1);
- bTestGenerate = TRUE;
- }
- /*
- else if (pEquipment->getID() == EQ_ID_LOADPORT1 && !pEquipment->hasGlass()) {
- ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2);
- bTestGenerate = TRUE;
- }
- */
- if (!bTestGenerate) {
- SERVO::CRobotTask* pTask = theApp.m_model.getMaster().getActiveRobotTask();
- if (pTask != nullptr) {
- SERVO::CGlass* pGlass = (SERVO::CGlass*)pTask->getContext();
- SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
- if (pJobDataS != nullptr) {
- SERVO::CJobDataB jobDataB;
- pEquipment->onFetchedOutJob(0, &pJobDataS->getJobDataB(jobDataB));
- pEquipment->onSentOutJob(0, pJobDataS);
- }
- }
- }
}
else if (nCmd == ID_EQSGRAPHITEM_TEST2) {
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- SERVO::CArm* pArm = (SERVO::CArm*)pEquipment->getArm();
- if (pArm != nullptr) {
- SERVO::CGlass* pGlass = pArm->getAnyGlass();
- if (pGlass != nullptr) {
- SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
- if (pJobDataS != nullptr) {
- pEquipment->onReceivedJob(0, pJobDataS);
- Sleep(600);
- SERVO::CJobDataB jobDataB;
- pEquipment->onStoredJob(0, &pJobDataS->getJobDataB(jobDataB));
- }
- }
- }
}
else if (nCmd == ID_EQSGRAPHITEM_TEST3) {
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- if (pEquipment != nullptr) {
- SERVO::CGlass* pGlass = pEquipment->getAnyGlass();
- if (pGlass != nullptr) {
- SERVO::CProcessData pd;
- pd.setGlassId(pGlass->getID().c_str());
- pEquipment->onProcessData(&pd);
- }
- }
}
else if (nCmd == ID_EQSGRAPHITEM_TEST4) {
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- if (pEquipment != nullptr) {
- pEquipment->setLinkSignalUpstream(0, SIGNAL_UPSTREAM_INLINE, TRUE);
- pEquipment->setLinkSignalUpstream(0, SIGNAL_UPSTREAM_TROUBLE, FALSE);
- pEquipment->setLinkSignalUpstream(0, SIGNAL_INTERLOCK, TRUE);
- pEquipment->setLinkSignalUpstream(0, SIGNAL_SEND_ABLE, TRUE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_UPSTREAM_INLINE, TRUE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_UPSTREAM_TROUBLE, FALSE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_INTERLOCK, TRUE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_SEND_ABLE, TRUE);
- }
-
- if (pEquipment != nullptr && (pEquipment->getID() == EQ_ID_Bonder1
- || pEquipment->getID() == EQ_ID_Bonder2)) {
- SERVO::CGlass* pGlass = pEquipment->getAnyGlass();
- if (pGlass != nullptr) {
- SERVO::CProcessData pd;
- pd.setGlassId(pGlass->getID().c_str());
- pEquipment->onProcessData(&pd);
- }
- }
}
else if (nCmd == ID_EQSGRAPHITEM_TEST5) {
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
- if (pEquipment != nullptr) {
- pEquipment->setLinkSignalUpstream(0, SIGNAL_UPSTREAM_INLINE, TRUE);
- pEquipment->setLinkSignalUpstream(0, SIGNAL_UPSTREAM_TROUBLE, TRUE);
- pEquipment->setLinkSignalUpstream(0, SIGNAL_INTERLOCK, TRUE);
- pEquipment->setLinkSignalUpstream(0, SIGNAL_SEND_ABLE, FALSE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_UPSTREAM_INLINE, TRUE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_UPSTREAM_TROUBLE, TRUE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_INTERLOCK, TRUE);
- pEquipment->setLinkSignalUpstream(1, SIGNAL_SEND_ABLE, FALSE);
- }
}
else if (nCmd == ID_EQSGRAPHITEM_TEST6) {
SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
@@ -335,8 +254,7 @@
// 娴嬭瘯璁剧疆鏃堕棿
/*
- if (pEquipment->getID() == EQ_ID_Bonder1
- || pEquipment->getID() == EQ_ID_Bonder2) {
+ if (pEquipment->getID() == EQ_ID_EFEM) {
CTime time = CTime::GetCurrentTime();
pEquipment->setDateTime((short)time.GetYear(),
(short)time.GetMonth(),
@@ -346,7 +264,6 @@
(short)time.GetSecond());
}
*/
-
// 娴嬭瘯璁剧疆cim mode
/*
@@ -357,32 +274,18 @@
}
*/
-
+ /*
if (pEquipment->getID() == EQ_ID_Bonder1
|| pEquipment->getID() == EQ_ID_Bonder2) {
static int ii = 0; ii++;
pEquipment->setEqMode((ii % 5) + 1);
}
-
-
- /*
- SERVO::CGlass* pGlass = pEquipment->getAnyGlass();
- if (pGlass != nullptr) {
- std::string strDescription;
- SERVO::CPath* pPath = pGlass->getPath();
- while (pPath != nullptr) {
- pPath->getDescription(strDescription);
- AfxMessageBox(strDescription.c_str());
- pPath = pPath->getNext();
- }
- }
*/
-
- // 璇锋眰涓婚厤鏂瑰垪琛�
- if (pEquipment != nullptr) {
- pEquipment->masterRecipeListRequest(0, nullptr);
- }
+ static int i = 0;
+ i++;
+ static char* pszText[] = {"123", "456", "789", "abc", "def"};
+ theApp.m_model.m_hsmsPassive.requestAlarmReport(i%3, i, pszText[i%5]);
}
@@ -400,6 +303,12 @@
m_pEqsGraphWnd->SetBkgndColor(m_crBkgnd);
m_pEqsGraphWnd->SetOnListener(listener);
+ CString strIniFile, strItem;
+ strIniFile.Format(_T("%s\\configuration.ini"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+ int nIndicatorSize = GetPrivateProfileInt("PageGraph2", _T("IndicatorSize"), 10, strIniFile);
+ int nIndicatorMargin = GetPrivateProfileInt("PageGraph2", _T("IndicatorMargin"), 0, strIniFile);
+ m_pEqsGraphWnd->SetIndicatorSize(nIndicatorSize);
+ m_pEqsGraphWnd->SetIndicatorMargin(nIndicatorMargin);
return TRUE; // return TRUE unless you set the focus to a control
// 寮傚父: OCX 灞炴�ч〉搴旇繑鍥� FALSE
@@ -472,7 +381,20 @@
m_pEqsGraphWnd->AddPin(pItem, OUTPIN, outPin->getName().c_str(), (DWORD_PTR)outPin);
}
- m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, pEquipment->hasGlass());
+ UpdateItemIndicators(pEquipment);
+}
+
+void CPageGraph2::UpdateItemIndicators(SERVO::CEquipment* pEquipment)
+{
+ for (int i = 0; i < SLOT_MAX; i++) {
+ auto pSlot = pEquipment->getSlot(i);
+
+ int state = 0;
+ if (pSlot->isEnable()) {
+ state = pSlot->getContext() != nullptr ? 1 : 2;
+ }
+ m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, state, i);
+ }
}
void CPageGraph2::OnTimer(UINT_PTR nIDEvent)
--
Gitblit v1.9.3