LAPTOP-SNT8I5JK\Boounion
2025-09-19 334b16b4abb4cbe3d1d4e4f211efd6f4468ae09f
SourceCode/Bond/Servo/CBonder.cpp
@@ -157,7 +157,6 @@
         }
      }
      {
         CEqDateTimeSetCmdStep* pStep = new CEqDateTimeSetCmdStep();
         pStep->setName(STEP_DATETIME_SET_CMD);
@@ -266,6 +265,7 @@
            }
         }
      }
      {
         // Sent Out Job Report Downstream #1~9
         char szBuffer[256];
@@ -350,9 +350,12 @@
         }
      }
      // FAC Data Report
      addFacDataReportStep(m_nIndex == 0 ? 0xA589 : 0xE589,
         m_nIndex == 0 ? 0x34d : 0x64d, 1);
      /*
      {
         // FAC Data Report
         CEqReadStep* pStep = new CEqReadStep(m_nIndex == 0 ? 0xA60E : 0xE60E, 108 * 2,
         CEqReadStep* pStep = new CEqReadStep(m_nIndex == 0 ? 0xA589 : 0xE589, 133 * 2,
            [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
               if (code == ROK && pszData != nullptr && size > 0) {
                  decodeFacDataReport((CStep*)pFrom, pszData, size);
@@ -366,6 +369,7 @@
            delete pStep;
         }
      }
      */
      // process start/end report
      {
@@ -642,4 +646,134 @@
      return (int)params.size();
   }
   int CBonder::parsingProcessData(const char* pszData, size_t size, std::vector<CParam>& params)
   {
      return parsingParams(pszData, size, params);
   }
   int CBonder::parsingSVData(const char* pszData, size_t size, std::vector<CParam>& params)
   {
      /*
      1   工艺运行步骤   1Word   123456
         2   气囊压力当前   2Word   12345.6
         3   上腔压力合计   1Word   1234.56
         4   管道真空规值   FLOAT   123.456
         5   腔体真空规值   FLOAT   123.456
         6   上腔温度1   1Word   12345.6
         7   上腔温度2   1Word   12345.6
         8   上腔温度3   1Word   12345.6
         9   上腔温度4   1Word   12345.6
         10   上腔温度5   1Word   12345.6
         11   上腔温度6   1Word   12345.6
         12   下腔温度1   1Word   12345.6
         13   下腔温度2   1Word   12345.6
         14   下腔温度3   1Word   12345.6
         15   下腔温度4   1Word   12345.6
         16   下腔温度5   1Word   12345.6
         17   下腔温度6   1Word   12345.6
         18   压合剩余时间   1Word   1234.56
*/
      ASSERT(pszData);
      if (size < 125) return 0;
      int i = 0, v;
      // 1.工艺运行步骤
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("工艺运行步骤", "", this->getName().c_str(), v));
      i += 2;
      // 2.气囊压力当前
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8 | (pszData[i + 2] & 0xff) << 16 | (pszData[i + 3] & 0xff) << 24;
      params.push_back(CParam("气囊压力当前", "", this->getName().c_str(), v * 0.1f));
      i += 4;
      // 3.上腔压力合计
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("上腔压力合计", "", this->getName().c_str(), ((short)v) * 0.01f));
      i += 2;
      // 4.管道真空规值
      params.push_back(CParam("管道真空规值", "", this->getName().c_str(), (double)toFloat(&pszData[i])));
      i += 4;
      // 5.腔体真空规值
      params.push_back(CParam("腔体真空规值", "", this->getName().c_str(), (double)toFloat(&pszData[i])));
      i += 4;
      // 6.上腔温度1
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("上腔温度1", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 7.上腔温度2
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("上腔温度2", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 8.上腔温度3
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("上腔温度3", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 9.上腔温度4
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("上腔温度4", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 10.上腔温度5
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("上腔温度5", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 11.上腔温度6
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("上腔温度6", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 12.下腔温度1
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("下腔温度1", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 13.下腔温度2
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("下腔温度2", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 14.下腔温度3
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("下腔温度3", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 15.下腔温度4
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("下腔温度4", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 16.下腔温度5
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("下腔温度5", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 17.下腔温度6
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("下腔温度6", "", this->getName().c_str(), v * 0.1f));
      i += 2;
      // 18.加热剩余时间
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("加热剩余时间", "", this->getName().c_str(), v * 0.01f));
      i += 2;
      // 19.压合剩余时间
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("压合剩余时间", "", this->getName().c_str(), v * 0.01f));
      i += 2;
      return (int)params.size();
   }
}