| | |
| | | #include "CEquipmentPage1.h" |
| | | #include "CEquipmentPage2.h" |
| | | #include "CEquipmentPage3.h" |
| | | #include "CPageLinkSignal.h" |
| | | #include "CPagePortProperty.h" |
| | | #include "CPagePortStatus.h" |
| | | #include "CPageCassetteCtrlCmd.h" |
| | |
| | | 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->isGlassListEmpty()); |
| | | } |
| | | if (pAny->getPtrValue("ptr", (void*&)pEquipment) && pEquipment != nullptr) { |
| | | UpdateItemIndicators(pEquipment); |
| | | } |
| | | } |
| | | |
| | |
| | | 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); |
| | | pPage1->Create(IDD_PAGE_LINK_SIGNAL); |
| | | dlg.addPage(pPage1, "Link Signal"); |
| | | |
| | | if (_strcmpi(pEquipment->getClassName(), "CLoadPort") == 0) { |
| | | CPagePortProperty* pPageA = new CPagePortProperty(); |
| | |
| | | CEquipmentPage2* pPage2 = new CEquipmentPage2(); |
| | | pPage2->setEquipment(pEquipment); |
| | | pPage2->Create(IDD_PAGE_EQUIPMENT2); |
| | | dlg.addPage(pPage2, "Glass"); |
| | | dlg.addPage(pPage2, "Slots"); |
| | | |
| | | if (pEquipment->getID() == EQ_ID_EFEM) { |
| | | CEquipmentPage3* pPage3 = new CEquipmentPage3(); |
| | |
| | | } |
| | | |
| | | if (pEquipment->getID() == EQ_ID_LOADPORT1 |
| | | || pEquipment->getID() == EQ_ID_LOADPORT2) { |
| | | || pEquipment->getID() == EQ_ID_LOADPORT2 |
| | | || pEquipment->getID() == EQ_ID_LOADPORT3 |
| | | || pEquipment->getID() == EQ_ID_LOADPORT4) { |
| | | CPageCassetteCtrlCmd* pPage = new CPageCassetteCtrlCmd(); |
| | | pPage->setEquipment(pEquipment); |
| | | pPage->Create(IDD_PAGE_CASSETTE_CTRL_CMD); |
| | |
| | | |
| | | // 测试 |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST1) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | if (pEquipment->getID() == EQ_ID_LOADPORT1) { |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G1, 10, |
| | | "P20250320G1X", 1); |
| | | } |
| | | else if (pEquipment->getID() == EQ_ID_LOADPORT2) { |
| | | ((SERVO::CLoadPort*)pEquipment)->testGenerateGlassList(SERVO::MaterialsType::G2, 10, |
| | | "P20250320G2X", 1); |
| | | } |
| | | SERVO::CGlass* pGlass = pEquipment->getFrontGlass(); |
| | | if (pGlass != nullptr) { |
| | | SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB(); |
| | | SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS(); |
| | | if (pJobDataB != nullptr && pJobDataS != nullptr) { |
| | | pEquipment->fetchedOutJob(pJobDataB); |
| | | 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->getFrontGlass(); |
| | | if (pGlass != nullptr) { |
| | | SERVO::CJobDataB* pJobDataB = pGlass->getJobDataB(); |
| | | SERVO::CJobDataS* pJobDataS = pGlass->getJobDataS(); |
| | | if (pJobDataB != nullptr && pJobDataS != nullptr) { |
| | | pEquipment->onReceivedJob(0, pJobDataS); |
| | | Sleep(600); |
| | | pEquipment->onStoredJob(0, pJobDataB); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST3) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | if (pEquipment != nullptr) { |
| | | SERVO::CGlass* pGlass = pEquipment->getFrontGlass(); |
| | | if (pGlass != nullptr) { |
| | | SERVO::CProcessData pd; |
| | | pd.setGlassId(pGlass->getID().c_str()); |
| | | pEquipment->onProcessData(&pd); |
| | | } |
| | | } |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST4) { |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST5) { |
| | | } |
| | | else if (nCmd == ID_EQSGRAPHITEM_TEST6) { |
| | | SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData; |
| | | |
| | | /* 测试 RobotCMD */ |
| | | if (pEquipment->getID() == EQ_ID_EFEM) { |
| | | SERVO::CEFEM* pEFEM = (SERVO::CEFEM*)pEquipment; |
| | | |
| | | |
| | | |
| | | SERVO::ROBOT_CMD_PARAM cmds[4]; |
| | | cmds[0].sequenceNo = 1; |
| | | cmds[0].rcmd = (short)SERVO::RCMD::Move; |
| | | cmds[0].armNo = 1; |
| | | cmds[0].getPosition = 1; |
| | | cmds[0].putPosition = 2; |
| | | cmds[0].getSlotNo = 3; |
| | | cmds[0].putSlotNo = 4; |
| | | cmds[0].subCmd = 5; |
| | | cmds[1].sequenceNo = 2; |
| | | cmds[1].rcmd = (short)SERVO::RCMD::Transfer; |
| | | cmds[1].armNo = 2; |
| | | cmds[1].getPosition = 6; |
| | | cmds[1].putPosition = 7; |
| | | cmds[1].getSlotNo = 8; |
| | | cmds[1].putSlotNo = 9; |
| | | cmds[1].subCmd = 10; |
| | | pEFEM->robotCmds(cmds, 2); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 测试下发Cim Message |
| | |
| | | |
| | | // 测试设置时间 |
| | | /* |
| | | 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(), |
| | |
| | | (short)time.GetSecond()); |
| | | } |
| | | */ |
| | | |
| | | |
| | | // 测试设置cim mode |
| | | /* |
| | |
| | | } |
| | | */ |
| | | |
| | | |
| | | /* |
| | | 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->getFrontGlass(); |
| | | 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); |
| | | } |
| | | 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]); |
| | | } |
| | | |
| | | |
| | |
| | | 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 |
| | |
| | | m_pEqsGraphWnd->AddPin(pItem, OUTPIN, outPin->getName().c_str(), (DWORD_PTR)outPin); |
| | | } |
| | | |
| | | m_pEqsGraphWnd->ShowItemIndicator((DWORD_PTR)pEquipment, !pEquipment->isGlassListEmpty()); |
| | | 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) |