| | |
| | | LOGI("Arm1 %s, Arm2 %s.", rmd.armState[0] ? _T("不可用") : _T("可用"), |
| | | rmd.armState[1] ? _T("不可用") : _T("可用")); |
| | | } |
| | | CEquipment* pEqTar[] = { pVacuumBake, pFliper }; |
| | | if (primaryType == MaterialsType::G2) { |
| | | pEqTar[0] = pFliper; |
| | | pEqTar[1] = pVacuumBake; |
| | | } |
| | | for (int s = 0; s < 4; s++) { |
| | | PortType pt = pLoadPorts[s]->getPortType(); |
| | | if (!rmd.armState[0] && pLoadPorts[s]->isEnable() |
| | | && pLoadPorts[s]->getPortType() == PortType::Unloading |
| | | && pLoadPorts[s]->getPortMode() == PortMode::ReadyToUnload) { |
| | | && (pt == PortType::Unloading || pt == PortType::Both) |
| | | && pLoadPorts[s]->getPortStatus() == PORT_INUSE) { |
| | | m_pActiveRobotTask = createTransferTask(pMeasurement, pLoadPorts[s], primaryType, secondaryType); |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | goto PORT_PUT; |
| | |
| | | |
| | | // LoadPort -> Aligner |
| | | for (int s = 0; s < 4; s++) { |
| | | PortType pt = pLoadPorts[s]->getPortType(); |
| | | if (!rmd.armState[0] && pLoadPorts[s]->isEnable() |
| | | && pLoadPorts[s]->getPortType() == PortType::Loading |
| | | && pLoadPorts[s]->getPortMode() == PortMode::ReadyToLoad) { |
| | | && (pt == PortType::Loading || pt == PortType::Both) |
| | | && pLoadPorts[s]->getPortStatus() == PORT_INUSE) { |
| | | m_pActiveRobotTask = createTransferTask(pLoadPorts[s], pAligner, primaryType, secondaryType); |
| | | if (m_pActiveRobotTask != nullptr) { |
| | | pEFEM->setContext(m_pActiveRobotTask->getContext()); |
| | |
| | | LOGE("<Master-%s>Port InUse, map(%d!=%d)不一致,请检查。", |
| | | ((CEquipment*)pEquipment)->getName().c_str(), scanMap, downMap); |
| | | }; |
| | | listener.onPortInUse = [&](void* pEquipment, short scanMap) { |
| | | LOGE("<Master-%s>Port InUse。scanMap=%d", ((CEquipment*)pEquipment)->getName().c_str(), scanMap); |
| | | if (m_listener.onLoadPortInUse != nullptr) { |
| | | m_listener.onLoadPortInUse(this, (CEquipment*)pEquipment, scanMap); |
| | | listener.onPortStatusChanged = [&](void* pEquipment, short status, __int64 data) { |
| | | LOGE("<Master-%s>Port InUse。status=%d, data=%lld", ((CEquipment*)pEquipment)->getName().c_str(), status); |
| | | if (m_listener.onLoadPortStatusChanged != nullptr) { |
| | | m_listener.onLoadPortStatusChanged(this, (CEquipment*)pEquipment, status, data); |
| | | } |
| | | }; |
| | | pEquipment->setListener(listener); |
| | |
| | | pPort->localSetCessetteType(type); |
| | | } |
| | | |
| | | void CMaster::setPortEnable(unsigned int index, BOOL bEnable) |
| | | { |
| | | ASSERT(index < 4); |
| | | int eqid[] = { EQ_ID_LOADPORT1, EQ_ID_LOADPORT2, EQ_ID_LOADPORT3, EQ_ID_LOADPORT4 }; |
| | | CLoadPort* pPort = (CLoadPort*)getEquipment(eqid[index]); |
| | | pPort->localEanblePort(bEnable); |
| | | } |
| | | |
| | | void CMaster::setCompareMapsBeforeProceeding(BOOL bCompare) |
| | | { |
| | | m_isCompareMapsBeforeProceeding = bCompare; |