1.曲线图前烘拆分为AB腔。
2.曲线图后烘拆分为AB腔。
| | |
| | | LOGI("<Master>onProcessStateChanged<%d>", (int)state); |
| | | if (state == PROCESS_STATE::Processing) { |
| | | if (pGlass != nullptr) { |
| | | m_pCollector->batchStart(eqid, |
| | | m_pCollector->batchStart(SlotToMid(eqid, slotNo), |
| | | pGlass->getID().c_str(), 10 * 60 * 1000ULL); |
| | | } |
| | | } |
| | | else if (state == PROCESS_STATE::Complete) { |
| | | m_pCollector->batchStop(eqid); |
| | | if (pGlass != nullptr) { |
| | | m_pCollector->batchStop(SlotToMid(eqid, slotNo)); |
| | | } |
| | | } |
| | | }; |
| | | listener.onMapMismatch = [&](void* pEquipment, short scanMap, short downMap) { |
| | |
| | | |
| | | CGlass* pGlass = ((CEquipment*)pEquipment)->getGlassFromSlot(2); |
| | | auto& dataTypes = CServoUtilsTool::getEqDataTypes(); |
| | | auto& bonderTypes = dataTypes[eqid]; |
| | | auto& bonderTypes = dataTypes[SlotToMid(eqid, 2)]; |
| | | for (const auto& mapping : bonderMapping) { |
| | | int paramIndex = mapping.first; |
| | | int channel = mapping.second; |
| | | |
| | | if (paramIndex < params.size() && channel - 1 < bonderTypes.size()) { |
| | | if(m_pCollector != nullptr) |
| | | m_pCollector->buffersPush(eqid, channel, ts, params.at(paramIndex).getDoubleValue()); |
| | | m_pCollector->buffersPush(SlotToMid(eqid, 2), channel, ts, params.at(paramIndex).getDoubleValue()); |
| | | if(pGlass != nullptr) |
| | | pGlass->addSVData(eqid, bonderTypes[channel - 1], ts, params.at(paramIndex).getDoubleValue()); |
| | | } |
| | |
| | | CGlass* pGlass1 = ((CEquipment*)pEquipment)->getGlassFromSlot(1); |
| | | CGlass* pGlass2 = ((CEquipment*)pEquipment)->getGlassFromSlot(2); |
| | | auto& dataTypes = CServoUtilsTool::getEqDataTypes(); |
| | | auto& vacuumbakeTypes = dataTypes[eqid]; |
| | | auto& vacuumbakeTypes = dataTypes[SlotToMid(eqid, 1)]; |
| | | LOGD("<Master>onSVDataReport 003 : %d", vacuumMapping.size()); |
| | | for (const auto& mapping : vacuumMapping) { |
| | | int paramIndex = mapping.first; |
| | | int channel = mapping.second; |
| | | |
| | | if (paramIndex < params.size() && channel - 1 < vacuumbakeTypes.size()) { |
| | | double value = params.at(paramIndex).getDoubleValue(); |
| | | auto& param = params.at(paramIndex); |
| | | double value = param.getDoubleValue(); |
| | | const std::string& dataType = vacuumbakeTypes[channel - 1]; |
| | | if (m_pCollector != nullptr) |
| | | m_pCollector->buffersPush(eqid, channel, ts, value); |
| | | const std::string& paramName = param.getName(); |
| | | const char slotTag = !paramName.empty() ? paramName[0] : '\0'; |
| | | |
| | | if (m_pCollector != nullptr) { |
| | | if (slotTag == 'A') |
| | | m_pCollector->buffersPush(SlotToMid(eqid, 1), channel, ts, value); |
| | | else if (slotTag == 'B') |
| | | m_pCollector->buffersPush(SlotToMid(eqid, 2), channel, ts, value); |
| | | } |
| | | |
| | | // 根据腔体前缀写入对应 Slot 的玻璃 |
| | | if (pGlass1 != nullptr && !dataType.empty() && dataType[0] == 'A') |
| | | if (pGlass1 != nullptr && !dataType.empty() && slotTag == 'A') |
| | | pGlass1->addSVData(eqid, dataType, ts, value); |
| | | if (pGlass2 != nullptr && !dataType.empty() && dataType[0] == 'B') |
| | | if (pGlass2 != nullptr && !dataType.empty() && slotTag == 'B') |
| | | pGlass2->addSVData(eqid, dataType, ts, value); |
| | | } |
| | | } |
| | |
| | | CGlass* pGlass3 = ((CEquipment*)pEquipment)->getGlassFromSlot(3); // B Bake |
| | | CGlass* pGlass4 = ((CEquipment*)pEquipment)->getGlassFromSlot(4); // B Cool |
| | | auto& dataTypes = CServoUtilsTool::getEqDataTypes(); |
| | | auto& coolingTypes = dataTypes[eqid]; |
| | | auto& coolingTypes = dataTypes[SlotToMid(eqid, 1)]; |
| | | LOGD("<Master>onSVDataReport 003B : %d", coolingMapping.size()); |
| | | auto addToGlass = [&](CGlass* glass, const std::string& type, double val) { |
| | | if (glass != nullptr) |
| | |
| | | int channel = mapping.second; |
| | | |
| | | if (paramIndex < params.size() && channel - 1 < coolingTypes.size()) { |
| | | double value = params.at(paramIndex).getDoubleValue(); |
| | | auto& param = params.at(paramIndex); |
| | | double value = param.getDoubleValue(); |
| | | const std::string& dataType = coolingTypes[channel - 1]; |
| | | if (m_pCollector != nullptr) |
| | | m_pCollector->buffersPush(eqid, channel, ts, value); |
| | | const std::string& paramName = param.getName(); |
| | | const char slotTag = !paramName.empty() ? paramName[0] : '\0'; |
| | | const bool paramIsBake = paramName.find("烘烤") != std::string::npos; |
| | | const bool paramIsCooling = paramName.find("冷却") != std::string::npos; |
| | | |
| | | if (m_pCollector != nullptr && paramIsBake) { |
| | | if (slotTag == 'A') |
| | | m_pCollector->buffersPush(SlotToMid(eqid, 1), channel, ts, value); |
| | | else if (slotTag == 'B') |
| | | m_pCollector->buffersPush(SlotToMid(eqid, 3), channel, ts, value); |
| | | } |
| | | |
| | | if (!dataType.empty()) { |
| | | const bool isBake = dataType.find("烘烤") != std::string::npos; |
| | | const bool isCooling = dataType.find("冷却") != std::string::npos; |
| | | switch (dataType[0]) { |
| | | switch (slotTag) { |
| | | case 'A': |
| | | if (isBake) |
| | | if (paramIsBake) |
| | | addToGlass(pGlass1, dataType, value); |
| | | else if (isCooling) |
| | | else if (paramIsCooling) |
| | | addToGlass(pGlass2, dataType, value); |
| | | break; |
| | | case 'B': |
| | | if (isBake) |
| | | if (paramIsBake) |
| | | addToGlass(pGlass3, dataType, value); |
| | | else if (isCooling) |
| | | else if (paramIsCooling) |
| | | addToGlass(pGlass4, dataType, value); |
| | | break; |
| | | default: |
| | |
| | | |
| | | // 1) 注册机台(推荐:先注册 id + 机器名称) |
| | | RetentionPolicy defP; defP.mode = RetainMode::ByCount; defP.maxSamples = 200; |
| | | m_pCollector->registryAddMachine(EQ_ID_Bonder1, "Bonder1", defP); |
| | | m_pCollector->registryAddMachine(EQ_ID_Bonder2, "Bonder2", defP); |
| | | m_pCollector->registryAddMachine(EQ_ID_VACUUMBAKE, "前烘烤", defP); |
| | | m_pCollector->registryAddMachine(EQ_ID_BAKE_COOLING, "烘烤冷却", defP); |
| | | m_pCollector->registryAddMachine(MID_Bonder1, "Bonder1", defP); |
| | | m_pCollector->registryAddMachine(MID_Bonder2, "Bonder2", defP); |
| | | m_pCollector->registryAddMachine(MID_VacuumBakeA, "前烘-A", defP); |
| | | m_pCollector->registryAddMachine(MID_VacuumBakeB, "前烘-B", defP); |
| | | m_pCollector->registryAddMachine(MID_BakeCoolingA, "后烘-A", defP); |
| | | m_pCollector->registryAddMachine(MID_BakeCoolingB, "后烘-B", defP); |
| | | |
| | | |
| | | // 2) 为通道设置“曲线名称” |
| | | auto& dataTypes = CServoUtilsTool::getEqDataTypes(); |
| | | auto& bonderTypes = dataTypes[EQ_ID_Bonder1]; |
| | | auto& bonderTypes = dataTypes[MID_Bonder1]; |
| | | for (size_t i = 0; i < bonderTypes.size(); ++i) { |
| | | m_pCollector->buffersSetChannelName(EQ_ID_Bonder1, i + 1, bonderTypes[i].c_str()); |
| | | m_pCollector->buffersSetChannelName(EQ_ID_Bonder2, i + 1, bonderTypes[i].c_str()); |
| | | m_pCollector->buffersSetChannelName(MID_Bonder1, i + 1, bonderTypes[i].c_str()); |
| | | m_pCollector->buffersSetChannelName(MID_Bonder2, i + 1, bonderTypes[i].c_str()); |
| | | } |
| | | |
| | | auto& vacuumbakeTypes = dataTypes[EQ_ID_VACUUMBAKE]; |
| | | auto& vacuumbakeTypes = dataTypes[MID_VacuumBakeA]; |
| | | for (size_t i = 0; i < vacuumbakeTypes.size(); ++i) { |
| | | m_pCollector->buffersSetChannelName(EQ_ID_VACUUMBAKE, i + 1, vacuumbakeTypes[i].c_str()); |
| | | m_pCollector->buffersSetChannelName(MID_VacuumBakeA, i + 1, vacuumbakeTypes[i].c_str()); |
| | | m_pCollector->buffersSetChannelName(MID_VacuumBakeB, i + 1, vacuumbakeTypes[i].c_str()); |
| | | } |
| | | |
| | | auto& coolingTypes = dataTypes[EQ_ID_BAKE_COOLING]; |
| | | auto& coolingTypes = dataTypes[MID_BakeCoolingA]; |
| | | for (size_t i = 0; i < coolingTypes.size(); ++i) { |
| | | m_pCollector->buffersSetChannelName(EQ_ID_BAKE_COOLING, i + 1, coolingTypes[i].c_str()); |
| | | m_pCollector->buffersSetChannelName(MID_BakeCoolingA, i + 1, coolingTypes[i].c_str()); |
| | | m_pCollector->buffersSetChannelName(MID_BakeCoolingB, i + 1, coolingTypes[i].c_str()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | uint32_t CMaster::SlotToMid(int eqid, int slot) |
| | | { |
| | | if (eqid == EQ_ID_Bonder1) { |
| | | return MID_Bonder1; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_Bonder2) { |
| | | return MID_Bonder2; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_VACUUMBAKE) { |
| | | if(slot == 1) |
| | | return MID_VacuumBakeA; |
| | | if (slot == 2) |
| | | return MID_VacuumBakeB; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_BAKE_COOLING) { |
| | | if (slot == 1) |
| | | return MID_BakeCoolingA; |
| | | if (slot == 3) |
| | | return MID_BakeCoolingB; |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | } |
| | |
| | | int getPortCassetteSnSeed(int port); |
| | | void setPortCassetteSnSeed(int port, int seed); |
| | | CGlass* getGlass(int scrPort, int scrSlot); |
| | | uint32_t SlotToMid(int eqid, int slot); |
| | | |
| | | private: |
| | | inline void lock() { EnterCriticalSection(&m_criticalSection); } |
| | |
| | | #include "stdafx.h" |
| | | #include "stdafx.h" |
| | | #include "CServoUtilsTool.h" |
| | | #include "Common.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | static std::unordered_map<int, std::vector<std::string>> EQ_DATA_TYPES = { |
| | | {EQ_ID_Bonder1, { |
| | | "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值", |
| | | "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4", |
| | | "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2", |
| | | "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6" |
| | | {MID_Bonder1, { |
| | | "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值", |
| | | "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4", |
| | | "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2", |
| | | "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6" |
| | | }}, |
| | | {EQ_ID_Bonder2, { |
| | | "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值", |
| | | "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4", |
| | | "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2", |
| | | "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6" |
| | | {MID_Bonder2, { |
| | | "气囊压力", "上腔压力", "管道真空规值", "腔体真空规值", |
| | | "上腔温度1", "上腔温度2", "上腔温度3", "上腔温度4", |
| | | "上腔温度5", "上腔温度6", "下腔温度1", "下腔温度2", |
| | | "下腔温度3", "下腔温度4", "下腔温度5", "下腔温度6" |
| | | }}, |
| | | {EQ_ID_VACUUMBAKE, { |
| | | "A腔真空规值", "A腔温控1", "A腔温控2", "A腔温控4", |
| | | "A腔温控5", "A腔温控6", "A腔温控7", "B腔真空规值", |
| | | "B腔温控1", "B腔温控2", "B腔温控4", "B腔温控5", |
| | | "B腔温控6", "B腔温控7" |
| | | {MID_VacuumBakeA, { |
| | | "真空规值", "温控1", "温控2", "温控4", |
| | | "温控5", "温控6", "温控7" |
| | | }}, |
| | | {EQ_ID_BAKE_COOLING, { |
| | | "A烘烤温控1", "A烘烤温控2", "A烘烤温控4", "A烘烤温控5", |
| | | "A烘烤温控6", "A烘烤温控7", "B烘烤温控1", "B烘烤温控2", |
| | | "B烘烤温控4", "B烘烤温控5", "B烘烤温控6", "B烘烤温控7" |
| | | {MID_VacuumBakeB, { |
| | | "真空规值", "温控1", "温控2", "温控4", |
| | | "温控5", "温控6", "温控7" |
| | | }}, |
| | | {MID_BakeCoolingA, { |
| | | "烘烤温控1", "烘烤温控2", "烘烤温控4", "烘烤温控5", |
| | | "烘烤温控6", "烘烤温控7" |
| | | }}, |
| | | {MID_BakeCoolingB, { |
| | | "烘烤温控1", "烘烤温控2", "烘烤温控4", "烘烤温控5", |
| | | "烘烤温控6", "烘烤温控7" |
| | | }} |
| | | }; |
| | | |
| | |
| | | } |
| | | |
| | | if (eqid == EQ_ID_VACUUMBAKE) { |
| | | if (unit == 0) return "烘烤A腔"; |
| | | if (unit == 1) return "烘烤B腔"; |
| | | if (unit == 0) return "烘烤A腔"; |
| | | if (unit == 1) return "烘烤B腔"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_Bonder1) { |
| | |
| | | |
| | | if (eqid == EQ_ID_BAKE_COOLING) { |
| | | |
| | | if (unit == 0) return "后烘烤A腔"; |
| | | if (unit == 1) return "冷却A"; |
| | | if (unit == 2) return "后烘烤B腔"; |
| | | if (unit == 3) return "冷却B"; |
| | | if (unit == 0) return "后烘烤A腔"; |
| | | if (unit == 1) return "冷却A"; |
| | | if (unit == 2) return "后烘烤B腔"; |
| | | if (unit == 3) return "冷却B"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_MEASUREMENT) { |
| | |
| | | |
| | | if (eqid == EQ_ID_VACUUMBAKE) { |
| | | if (unit == 0) { |
| | | sprintf_s(szBuffer, 256, "烘烤A腔(Slot%d)", slot); |
| | | sprintf_s(szBuffer, 256, "烘烤A腔(Slot%d)", slot); |
| | | return std::string(szBuffer); |
| | | } |
| | | if (unit == 1) { |
| | | sprintf_s(szBuffer, 256, "烘烤B腔(Slot%d)", slot); |
| | | sprintf_s(szBuffer, 256, "烘烤B腔(Slot%d)", slot); |
| | | return std::string(szBuffer); |
| | | } |
| | | } |
| | |
| | | |
| | | if (eqid == EQ_ID_BAKE_COOLING) { |
| | | |
| | | if (slot == 0) return "后烘烤A腔"; |
| | | if (slot == 1) return "冷却A"; |
| | | if (slot == 2) return "后烘烤B腔"; |
| | | if (slot == 3) return "冷却B"; |
| | | if (slot == 0) return "后烘烤A腔"; |
| | | if (slot == 1) return "冷却A"; |
| | | if (slot == 2) return "后烘烤B腔"; |
| | | if (slot == 3) return "冷却B"; |
| | | } |
| | | |
| | | if (eqid == EQ_ID_MEASUREMENT) { |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include "ServoCommo.h" |
| | | #include "CGlass.h" |
| | | |
| | | |
| | | namespace SERVO { |
| | | constexpr uint32_t MID_Bonder1 = 1001; |
| | | constexpr uint32_t MID_Bonder2 = 1002; |
| | | constexpr uint32_t MID_VacuumBakeA = 1003; |
| | | constexpr uint32_t MID_VacuumBakeB = 1004; |
| | | constexpr uint32_t MID_BakeCoolingA = 1005; |
| | | constexpr uint32_t MID_BakeCoolingB = 1006; |
| | | |
| | | class CServoUtilsTool |
| | | { |
| | | public: |