From 1fac536ec86ccda881c75d751224d353f72234ee Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期四, 12 二月 2026 09:38:08 +0800
Subject: [PATCH] 1.手动测试支持,PJ创建,支持多Port
---
SourceCode/Bond/Servo/CMaster.cpp | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index 492e813..25433ac 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -1710,12 +1710,36 @@
pGlass->setProcessJob(pj);
PJWarp& jpWarp = pj->getPjWarp();
+ int portIndex = -1;
+ switch (pPort->getID()) {
+ case EQ_ID_LOADPORT1: portIndex = 0; break;
+ case EQ_ID_LOADPORT2: portIndex = 1; break;
+ case EQ_ID_LOADPORT3: portIndex = 2; break;
+ case EQ_ID_LOADPORT4: portIndex = 3; break;
+ default: break;
+ }
+
+ BOOL scheduled = FALSE;
+ int material = 1; // G1
+ if (1 <= slot && slot <= 8) {
+ if (0 <= portIndex && portIndex <= 3 && jpWarp.selectedPorts[portIndex]) {
+ scheduled = jpWarp.checkSlots[portIndex][slot - 1];
+ material = jpWarp.materialSlots[portIndex][slot - 1];
+ }
+ else {
+ // Backward compatibility for legacy single-port PJWarp.
+ scheduled = jpWarp.checkSlot[slot - 1];
+ material = jpWarp.material[slot - 1];
+ }
+ }
+ material = (material == 2) ? 2 : 1;
+
int nRecipeID = RecipeManager::getInstance().getIdByPPID(pj->recipeSpec());
RecipeInfo stRecipeInfo = RecipeManager::getInstance().getRecipeByPPID(pj->recipeSpec());
std::vector<DeviceRecipe> vecRecipeInfo = stRecipeInfo.vecDeviceList;
- pGlass->setScheduledForProcessing(jpWarp.checkSlot[slot-1]);
- pGlass->setType(static_cast<SERVO::MaterialsType>(jpWarp.material[slot-1]));
+ pGlass->setScheduledForProcessing(scheduled);
+ pGlass->setType(static_cast<SERVO::MaterialsType>(material));
SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS();
if (pJobDataS != nullptr) {
@@ -1723,7 +1747,7 @@
pJobDataS->setLotId(pj->getLotId().c_str());
pJobDataS->setProductId(pj->getProductId().c_str());
pJobDataS->setOperationId(pj->getOperationId().c_str());
- pJobDataS->setMaterialsType(jpWarp.material[slot - 1]);
+ pJobDataS->setMaterialsType(material);
pJobDataS->setMasterRecipe(nRecipeID);
for (const auto& info : vecRecipeInfo) {
const std::string& name = info.strDeviceName;
@@ -3068,6 +3092,9 @@
if (portStatus != PORT_INUSE) {
LOGW("ProcessStart warning (ProceedWithCarrier): port status is %d (expected INUSE).", portStatus);
}
+ LOGI("ProcessStart payload (ProceedWithCarrier): port=%u, cassetteId=%s, scanMap=%d, jobExistence0=%d, jobExistence1=%d, slotProcess=%d, anyScheduled=%d",
+ port + 1, pPort->getCassetteId().c_str(), scanMap,
+ (int)jobExistence[0], (int)jobExistence[1], (int)slotProcess, anyScheduled ? 1 : 0);
pPort->sendCassetteCtrlCmd(CCC_PROCESS_START, jobExistence, 12, slotProcess, jobCount, nullptr, nullptr);
return 0;
--
Gitblit v1.9.3