| | |
| | | std::vector<CParam> tempParams; |
| | | this->parsingProcessData((const char*)rawData.data(), rawData.size(), tempParams); |
| | | int n = processData.getTotalParameter(); |
| | | std::vector<CParam> params(tempParams.begin(), tempParams.begin() + min(n, (int)tempParams.size())); |
| | | std::vector<CParam> params(tempParams.begin(), tempParams.begin() + (std::min)(n, (int)tempParams.size())); |
| | | pGlass->addParams(params); |
| | | if (m_listener.onProcessDataReport != nullptr) { |
| | | m_listener.onProcessDataReport(this, params); |
| | | } |
| | | |
| | | // 关联的Glass也要更新 |
| | | CGlass* pBuddy = pGlass->getBuddy(); |
| | |
| | | if (pBuddy != nullptr) { |
| | | LOGI("<Equipment-%s>decodeProcessDataReport addParams pBuddy=%x %s", getName().c_str(), pBuddy, pGlass->getID().c_str()); |
| | | pBuddy->addParams(params); |
| | | if (m_listener.onProcessDataReport != nullptr) { |
| | | m_listener.onProcessDataReport(this, params); |
| | | } |
| | | } |
| | | |
| | | return nRet; |
| | |
| | | typedef std::function<void(void* pEiuipment, int nSlotNo, PROCESS_STATE prevState, PROCESS_STATE state)> ONPROCESSSTATE; |
| | | typedef std::function<void(void* pEiuipment, short scanMap, short downMap)> ONMAPMISMATCH; |
| | | typedef std::function<void(void* pEiuipment, short status, __int64 data)> ONPORTSTATUSCHANGED; |
| | | typedef std::function<void(void* pEiuipment, const std::vector<CParam>& params)> ONPROCESSDATAREPORT; |
| | | |
| | | typedef struct _EquipmentListener |
| | | { |
| | |
| | | ONPORTSTATUSCHANGED onPortStatusChanged; |
| | | ONVCREVENTREPORT onSVDataReport; |
| | | ONVCREVENTREPORT onPanelDataReport; |
| | | ONPROCESSDATAREPORT onProcessDataReport; |
| | | } EquipmentListener; |
| | | |
| | | |
| | |
| | | m_listener.onProcessStateChanged(this, (CEquipment*)pEquipment, slotNo, prevState, state); |
| | | } |
| | | }; |
| | | listener.onProcessDataReport = [&](void* pEquipment, const std::vector<CParam>& params) { |
| | | if (m_listener.onProcessDataReport != nullptr) { |
| | | m_listener.onProcessDataReport(this, (CEquipment*)pEquipment, params); |
| | | } |
| | | }; |
| | | listener.onMapMismatch = [&](void* pEquipment, short scanMap, short downMap) { |
| | | LOGE("<Master-%s>Port InUse, map(%d!=%d)不一致,请检查。", |
| | | ((CEquipment*)pEquipment)->getName().c_str(), scanMap, downMap); |
| | |
| | | typedef std::function<void(void* pMaster, CRobotTask* pTask, int code)> ONROBOTTASKEVENT; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, short status, __int64 data)> ONLOADPORTSTATUSCHANGED; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, int slotNo, PROCESS_STATE prevState, PROCESS_STATE state)> ONPROCESSSTATECHANGED; |
| | | typedef std::function<void(void* pMaster, CEquipment* pEquipment, const std::vector<CParam>& params)> ONPROCESSDATAREPORTEX; |
| | | typedef std::function<void(void* pMaster, int round)> ONCTROUNDEND; |
| | | typedef std::function<void(void* pMaster, void* pj)> ONPJSTART; |
| | | typedef std::function<void(void* pMaster)> ONCONTROLJOBCHANGED; |
| | |
| | | ONROBOTTASKEVENT onRobotTaskEvent; |
| | | ONLOADPORTSTATUSCHANGED onLoadPortStatusChanged; |
| | | ONPROCESSSTATECHANGED onProcessStateChanged; |
| | | ONPROCESSDATAREPORTEX onProcessDataReport; |
| | | ONCTROUNDEND onCTRoundEnd; |
| | | ONPJSTART onCjStart; |
| | | ONPJSTART onCjEnd; |
| | |
| | | bool canCompleteControlJob(); |
| | | bool canDeleteControlJob(); |
| | | |
| | | // DAQ Bridge鐩稿叧 |
| | | // DAQ Bridge 相关 |
| | | Collector* getCollector() const { return m_pCollector; } |
| | | |
| | | private: |
| | |
| | | int m_nLastError; |
| | | std::string m_strLastError; |
| | | |
| | | // 在开始工艺前是否先需要先比较map |
| | | // 在开始工艺前是否需要先比较 map |
| | | BOOL m_isCompareMapsBeforeProceeding; |
| | | BOOL m_bJobMode; |
| | | |
| | | |
| | | // 千传圈数计数 |
| | | int m_nContinuousTransferCount; |
| | |
| | | int m_nContinuousWorkingPort; |
| | | int m_nContinuousWorkingSlot; |
| | | |
| | | // 新增已经开始处理的ProcessJob列表 |
| | | // 已经开始处理的 ProcessJob 列表 |
| | | std::vector<CProcessJob*> m_inProcesJobs; |
| | | std::vector<CProcessJob*> m_completeProcessJobs; |
| | | std::vector<CGlass*> m_queueGlasses; |
| | |
| | | return m_nValueType; |
| | | } |
| | | |
| | | int CParam::getIntValue() |
| | | int CParam::getIntValue() const |
| | | { |
| | | return m_nValue; |
| | | } |
| | |
| | | m_nValue = value; |
| | | } |
| | | |
| | | double CParam::getDoubleValue() |
| | | double CParam::getDoubleValue() const |
| | | { |
| | | if(m_nValueType == PVT_DOUBLE) |
| | | return m_fValue; |
| | |
| | | std::string& getName(); |
| | | std::string& getUnit(); |
| | | int getValueType(); |
| | | int getIntValue(); |
| | | int getIntValue() const; |
| | | void setIntValue(int value); |
| | | double getDoubleValue(); |
| | | double getDoubleValue() const; |
| | | void setDoubleValue(double value); |
| | | void Serialize(CArchive& ar); |
| | | |
| | |
| | | #include "TransferManager.h" |
| | | #include "RecipeManager.h" |
| | | #include "GlassLogDb.h" |
| | | #include "CParam.h" |
| | | #include <algorithm> |
| | | #include <iomanip> |
| | | #include <map> |
| | | |
| | | |
| | |
| | | } |
| | | }); |
| | | }; |
| | | masterListener.onProcessDataReport = [&](void* pMaster, SERVO::CEquipment* pEquipment, const std::vector<CParam>& params) { |
| | | (void)pMaster; |
| | | const int eqId = pEquipment ? pEquipment->getID() : 0; |
| | | if (eqId != EQ_ID_Bonder1 && eqId != EQ_ID_Bonder2) return; |
| | | |
| | | auto formatVal = [](const CParam& p) { |
| | | std::ostringstream oss; |
| | | oss.setf(std::ios::fixed); |
| | | oss << std::setprecision(4) << p.getDoubleValue(); |
| | | return oss.str(); |
| | | }; |
| | | |
| | | static const int vidMap[] = { |
| | | 6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110, |
| | | 6111,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121 |
| | | }; |
| | | const size_t count = (std::min)(params.size(), sizeof(vidMap) / sizeof(vidMap[0])); |
| | | m_hsmsPassive.withVariableLock([&] { |
| | | m_hsmsPassive.setVariableValue("Clock", CToolUnits::getCurrentTimeString().c_str()); |
| | | for (size_t idx = 0; idx < count; ++idx) { |
| | | auto& p = params[idx]; |
| | | std::string val = formatVal(p); |
| | | m_hsmsPassive.setVariableValue(std::to_string(vidMap[idx]).c_str(), val.c_str()); |
| | | } |
| | | m_hsmsPassive.requestEventReportSend("BonderProcessData"); |
| | | }); |
| | | }; |
| | | masterListener.onCTRoundEnd = [&](void* pMaster, int round) { |
| | | m_configuration.setContinuousTransferCount(round); |
| | | }; |
| | |
| | | 50011,OCR_PanelID_Read_OK,扫码事件上报,(50012) |
| | | 50012,Port_Ready_To_Release,,(50013) |
| | | 50020,PortStateChange,,(50020) |
| | | 60000,BonderSVData,,(60000) |
| | | 61000,BonderProcessData,,(61000) |
| | | 12000,UnitStart,,(12000) |
| | | 12001,UnitStateChange,,(12001) |
| | | 12002,UnitEnd,,(12002) |
| | |
| | | 50013,(5015) |
| | | 50014,(5016) |
| | | 50020,(500,5020,5021) |
| | | 60000,(500,6000,6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018) |
| | | 61000,(500,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121) |
| | | 10015,(5018,5019) |
| | | 10016,(5018,5019) |
| | | 10017,(500,5018) |
| | |
| | | 5017,ProcessDataReportText,A50,EV_PROCESS_DATA_REPORT payload string (placeholder) |
| | | 5018,SubEqpName,A20,Equipment name for EV_SubEqpStart/EV_SubEqpEnd |
| | | 5019,SubEqpSlot,U1,Slot number for EV_SubEqpStart/EV_SubEqpEnd |
| | | 5020,PortStateChangePortId,U1,"Port ID for PortStateChange" |
| | | 5021,PortState,U1,"Port transfer/state code for PortStateChange" |
| | | 6000,Bonder_SV_ProcessStep,A20,Bonder SV |
| | | 6001,Bonder_SV_BladderPressure,A20,Bonder SV |
| | | 6002,Bonder_SV_UpperChamberPressure,A20,Bonder SV |
| | | 6003,Bonder_SV_PipeVacuumGauge,A20,Bonder SV |
| | | 6004,Bonder_SV_ChamberVacuumGauge,A20,Bonder SV |
| | | 6005,Bonder_SV_UpperTemp1,A20,Bonder SV |
| | | 6006,Bonder_SV_UpperTemp2,A20,Bonder SV |
| | | 6007,Bonder_SV_UpperTemp3,A20,Bonder SV |
| | | 6008,Bonder_SV_UpperTemp4,A20,Bonder SV |
| | | 6009,Bonder_SV_UpperTemp5,A20,Bonder SV |
| | | 6010,Bonder_SV_UpperTemp6,A20,Bonder SV |
| | | 6011,Bonder_SV_LowerTemp1,A20,Bonder SV |
| | | 6012,Bonder_SV_LowerTemp2,A20,Bonder SV |
| | | 6013,Bonder_SV_LowerTemp3,A20,Bonder SV |
| | | 6014,Bonder_SV_LowerTemp4,A20,Bonder SV |
| | | 6015,Bonder_SV_LowerTemp5,A20,Bonder SV |
| | | 6016,Bonder_SV_LowerTemp6,A20,Bonder SV |
| | | 6017,Bonder_SV_HeatingRemaining,A20,Bonder SV |
| | | 6018,Bonder_SV_PressingRemaining,A20,Bonder SV |
| | | 6100,Bonder_PD_AlignDelay,A20,Bonder ProcessData |
| | | 6101,Bonder_PD_DwellTime,A20,Bonder ProcessData |
| | | 6102,Bonder_PD_BreakVacuumDelay,A20,Bonder ProcessData |
| | | 6103,Bonder_PD_TurboPumpStartDelay,A20,Bonder ProcessData |
| | | 6104,Bonder_PD_AttachVacuumDelay,A20,Bonder ProcessData |
| | | 6105,Bonder_PD_HeatingWaitDelay,A20,Bonder ProcessData |
| | | 6106,Bonder_PD_BladderPressureSet,A20,Bonder ProcessData |
| | | 6107,Bonder_PD_BladderPressurizeRate,A20,Bonder ProcessData |
| | | 6108,Bonder_PD_BladderDepressurizeRate,A20,Bonder ProcessData |
| | | 6109,Bonder_PD_AttachPressureLimit,A20,Bonder ProcessData |
| | | 6110,Bonder_PD_UpperZTorqueSpeed,A20,Bonder ProcessData |
| | | 6111,Bonder_PD_UpperTempSet,A20,Bonder ProcessData |
| | | 6112,Bonder_PD_LowerTempSet,A20,Bonder ProcessData |
| | | 6113,Bonder_PD_PreAttachSpeed,A20,Bonder ProcessData |
| | | 6114,Bonder_PD_AttachSpeed,A20,Bonder ProcessData |
| | | 6115,Bonder_PD_UpperHeatDistance,A20,Bonder ProcessData |
| | | 6116,Bonder_PD_AttachPressIn,A20,Bonder ProcessData |
| | | 6117,Bonder_PD_UpperBreakVacuumDist,A20,Bonder ProcessData |
| | | 6118,Bonder_PD_LowerPinBreakVacuumDist,A20,Bonder ProcessData |
| | | 6119,Bonder_PD_LowerPinHeatDistance,A20,Bonder ProcessData |
| | | 6120,Bonder_PD_PumpGaugeSet,A20,Bonder ProcessData |
| | | 6121,Bonder_PD_TurboReachSet,A20,Bonder ProcessData |
| | | 10200,SlotMap,U2,SlotMap(Scan) |
| | | 10201,SlotMapScan,U2,SlotMap(Scan) |
| | | 10202,SlotMapDownload,U2,SlotMap(Download) |