Ver Fonte

更新模块

JonYang há 5 dias atrás
pai
commit
7984cafcee

BIN
Output/bin/x64/Control.dll


BIN
Output/bin/x64/Control.pdb


BIN
Output/bin/x64/Module.dll


BIN
Output/bin/x64/Module.pdb


BIN
Output/config/db/ModuleConfig.db


BIN
Output/dll/x64/Control.dll


BIN
Output/dll/x64/Module.dll


+ 12 - 2
Output/inc/Control/CViewInterface.h

@@ -178,6 +178,14 @@ namespace ns_module
 
 		//获取所有轴信息
 		vector<CAxis*> GetAxisList();
+		//获取所有IO信息
+		vector<CIO*> GetIoList();
+		//设置IO状态
+		LONG SetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL nOutput);
+		LONG SetIoStatus(string strIoName, short nOutput);
+		//获取IO状态
+		LONG GetIoStatus(string strIoName, ns_db::DIGIT_IO_LEVEL &nOutput);
+		LONG GetIoStatus(string strIoName, short &nOutput);
 		//移动轴
 		long ModuleMove(string ModuleType, string AxisType, double pos);
 		long ModuleMoveTo(string ModuleType, string AxisType, double pos);
@@ -251,9 +259,11 @@ namespace ns_module
 		/// <summary>
 		/// 获取晶环尺寸
 		/// </summary>
-		/// <param name="iSize">获取到的尺寸</param>
+		/// <param name="dCenterX">晶环圆心坐标</param>
+		/// <param name="dCenterY">晶环圆心坐标</param>
+		/// <param name="iRadius">获取到的晶圆半径</param>
 		/// <returns>成功返回0,否则返回错误码</returns>
-		long GetWaferSize(int& iSize);
+		long GetWaferSize(double &dCenterX,double &dCenterY, double& iRadius);
 
 		/// <summary>
 		/// 获取晶圆尺寸

+ 5 - 0
Output/inc/Module/CWaferTable.h

@@ -46,6 +46,9 @@ class __declspec(dllexport) CWaferTable :  public CModule
         UINT PickDieAgainNum;			            //重复取晶次数
         UINT ForecastCount;			                //提前告警数量
 
+        UINT DieLong;                               //晶片长 um
+        UINT DieWide;                               //晶片宽 um
+
         X_Y_Z_R_STRUCT SafePosition;                //安全位置
         X_Y_Z_R_STRUCT DownRingPosition;            //上、下晶环位置
 
@@ -92,6 +95,8 @@ public:
 
     //设置3点画圆软限位的半径及圆心(圆心就是旋转中心)
     LONG SetSoftLimitRadius(SOFTLIMITTYPE nSoftLimitType, XY_LONG_STRUCT stPosn1, XY_LONG_STRUCT stPosn2, XY_LONG_STRUCT stPosn3);
+    LONG GetSoftLimitRadius(double& dCenterX, double& dCenterY, double& iRadius);
+    LONG GetDieSize(int& iLong, int& iWide);
 
     LONG CreateCameraCalibTemplate();
     LONG CreateRCalibTemplate();

+ 1 - 0
Output/inc/Module/Machine.h

@@ -59,6 +59,7 @@ public:
 
 	void ShowMotionAdjustPage();
 	vector<CAxis*> GetMachineAllAxis() {return m_vetAxis;};
+	vector<CIO*> GetMachineAllIo() { return m_vetIO; };
 	CBondHead* GetBondHead() {return m_pBondHead;}
 	//CUltraHead* GetUltraHead() { return m_pBondHead; };
 	CBondTable* GetBondTable() { return m_pBondTable; }

BIN
Output/lib/x64/Common.lib


BIN
Output/lib/x64/Control.lib


BIN
Output/lib/x64/Module.lib


+ 10 - 1
View/die-bonder-ui/Src/RewriteControl/Controls/JReLineEdit.cpp

@@ -18,7 +18,6 @@ void JReLineEdit::CheckVal()
 {
     // 获取按钮所在的父窗口
     QWidget* parentWindow = this->window();
-
     QList<QGroupBox*> pListBox = parentWindow->findChildren<QGroupBox*>();
     QList<QComboBox*> pListQComboBox = parentWindow->findChildren<QComboBox*>();
     // 遍历所有QLineEdit
@@ -93,9 +92,16 @@ void JReLineEdit::CheckVal()
         if (p->objectName() == "modeComboBox")
         {
             m_stSavedefVal.strMode = p->currentText();
+            break;
         }
     }
 
+    QString strName = this->objectName();
+    QString suffix = "LineEdit";
+
+    // 去掉 "LineEdit" 部分
+    m_stSavedefVal.strAxis = strName.replace(suffix, "").toUpper();
+
     CreateSpeedAdjPage();
 }
 
@@ -122,9 +128,12 @@ void JReLineEdit::CreateSpeedAdjPage()
 
 void JReLineEdit::GetCloseWndSlots(int nVal)
 {
+    m_isSetVal = true;
     double doVal = text().toDouble();
     doVal = doVal + nVal;
     setText(QString::number(doVal, 'f', 2));
+
+    m_isSetVal = false;
 }
 
 void JReLineEdit::mousePressEvent(QMouseEvent* event)

+ 10 - 2
View/die-bonder-ui/Src/RewriteControl/Controls/JReLineEdit.h

@@ -42,9 +42,17 @@ protected:
     void mousePressEvent(QMouseEvent* event) override;
 
 private:
-    ST_DEF_VAL      m_stSavedefVal;
+    ST_DEF_VAL              m_stSavedefVal;
 
-    QPointer<SpeedAdjPage> m_pSpeedWnd;
+    QPointer<SpeedAdjPage>  m_pSpeedWnd;
+
+    QList<QString>          m_liMode; // 目前只有一个
+
+public:
+    /**true 移动轴
+    * false 只是显示
+     */
+    bool                    m_isSetVal = false;
 };
 
 #endif // JRELINEEDIT_H

+ 76 - 4
View/die-bonder-ui/Src/RewriteControl/LightJoystickSwitchPage.cpp

@@ -15,12 +15,16 @@ LightJoystickSwitchPage::LightJoystickSwitchPage(QWidget *parent)
 
 LightJoystickSwitchPage::~LightJoystickSwitchPage()
 {
+
+    killTimer(m_nUpdateUiAxis);
+
     delete ui;
 }
 
 void LightJoystickSwitchPage::InitForm()
 {
     m_nTimeShowPos = startTimer(900);
+    m_nUpdateUiAxis = startTimer(900);
 
     InitLineEdits();
     SliderBind();
@@ -60,14 +64,77 @@ void LightJoystickSwitchPage::InitLineEdits()
     }
 }
 
+void LightJoystickSwitchPage::UpDataAxisToUi()
+{
+    if (m_pCameraBind)
+    {
+        const QHash<QString, QLayout*> axisToLayout = {
+            {"FORCE", ui->forceLayout},
+            {"X", ui->xLayout},
+            {"Y", ui->yLayout},
+            {"R", ui->rLayout},
+            {"Z", ui->zLayout},
+            {"Z1", ui->zLayout}
+        };
+        for (const auto& val : m_listCurrentShowAxis) 
+        {
+            if (axisToLayout.contains(val))
+            {
+                QLayout* layout = axisToLayout.value(val);
+                for (int i = 0; i < layout->count(); ++i) 
+                {
+                    QWidget* widget = layout->itemAt(i)->widget();
+                    if (widget && widget->inherits("QLineEdit")) 
+                    {
+                        JReLineEdit* lineEdit = qobject_cast<JReLineEdit*>(widget);
+                        if (lineEdit)
+                        {
+                            double pos = 0;
+                            m_pCameraBind->YGetAxisPosition(m_moveAxisInfo.ModuleType, val.toStdString(), pos);
+                            lineEdit->setText(QString::number(pos, 'f', 2));
+                        }
+                    }
+                }
+            }
+        }     
+    }
+}
+
 void LightJoystickSwitchPage::MoveModule(const QString strAxis, const QString pos)
 {
     if (m_pCameraBind)
     {
-        // 目前没有测试多轴,多轴在用
-        std::vector<ns_module::MODULE_COORD_MOVE> vecPos;
-        vecPos.push_back({ strAxis.toStdString() ,pos.toDouble() });
-        m_pCameraBind->JModuleMove(ui->modeComboBox->currentText().toStdString(), vecPos, false);
+        const QHash<QString, QLayout*> m_HaAxisToLayout = {
+            {"FORCE", ui->forceLayout},
+            {"X", ui->xLayout},
+            {"Y", ui->yLayout},
+            {"R", ui->rLayout},
+            {"Z", ui->zLayout},
+            {"Z1", ui->zLayout}
+        };
+
+        if (m_HaAxisToLayout.contains(strAxis))
+        {
+            QLayout* layout = m_HaAxisToLayout.value(strAxis);
+            for (int i = 0; i < layout->count(); ++i)
+            {
+                QWidget* widget = layout->itemAt(i)->widget();
+                if (widget && widget->inherits("QLineEdit"))
+                {
+                    JReLineEdit* lineEdit = qobject_cast<JReLineEdit*>(widget);
+                    if (lineEdit)
+                    {
+                        if (lineEdit->m_isSetVal)
+                        {
+                            // 目前没有测试多轴,多轴在用
+                            std::vector<ns_module::MODULE_COORD_MOVE> vecPos;
+                            vecPos.push_back({ strAxis.toStdString() ,pos.toDouble() });
+                            m_pCameraBind->JModuleMove(ui->modeComboBox->currentText().toStdString(), vecPos, false);
+                        }
+                    }
+                }
+            }
+        }
     }
 }
 
@@ -306,6 +373,10 @@ void LightJoystickSwitchPage::timerEvent(QTimerEvent* event)
     {
         SwitchJoystickPage(false);
     }
+    else if (m_nUpdateUiAxis == nID)
+    {
+        UpDataAxisToUi();
+    }
 }
 
 QString LightJoystickSwitchPage::CombiningStr(bool isUpdate /*= false*/)
@@ -560,6 +631,7 @@ void LightJoystickSwitchPage::on_modeComboBox_currentIndexChanged(int index)
     {
         if (supportedAxes.contains(it.key())) 
         {
+            m_listCurrentShowAxis.push_back(it.key());
             DisableLayoutWidgets(it.value(), true);
         }
     }   

+ 10 - 0
View/die-bonder-ui/Src/RewriteControl/LightJoystickSwitchPage.h

@@ -111,6 +111,10 @@ private:
 
     void InitLineEdits();
 
+    /**更新显示轴
+     */
+    void UpDataAxisToUi();
+
     /**移动轴
      */
     void MoveModule(const QString strAxis, const QString pos);
@@ -141,6 +145,12 @@ private:
     int                         m_idleTimer     = -1;
     int                         m_nTimeShowPos  = -1;
     bool                        m_isSlots = false;
+
+    /**当前可用的轴
+     */
+    QList<QString>              m_listCurrentShowAxis;
+
+    int                         m_nUpdateUiAxis = -1;
 };
 
 #endif // SWITCHTABBASEWIDGET_H

+ 9 - 8
View/die-bonder-ui/Src/RewriteControl/SpeedAdjPage.cpp

@@ -24,17 +24,18 @@ void SpeedAdjPage::updateDefVal(const ST_DEF_VAL& val)
 {
     QString strTip = tr("Mode:", "模组:");
     strTip += val.strMode;
+    strTip += "  ";
     strTip += tr("Axis:(","轴:(");
-
-    for (auto&a: val.vecPos)
-    {
-        strTip += a.AxisType.c_str();
-        strTip += ":";
-        QString s = QString::number(a.pos, 'f', 2);
-    }
+    strTip += val.strAxis;
+    /*  for (auto&a: val.vecPos)
+      {
+          strTip += a.AxisType.c_str();
+          strTip += ":";
+          QString s = QString::number(a.pos, 'f', 2);
+      }*/
     strTip += ")";
 
-    //ui->speedTitleLabel->setText(strTip);
+    ui->speedLabel->setText(strTip);
 
 }
 

+ 1 - 0
View/die-bonder-ui/Src/RewriteControl/SpeedAdjPage.h

@@ -8,6 +8,7 @@
 struct ST_DEF_VAL
 {
     QString         strMode; 
+    QString         strAxis;
     std::vector<ns_module::MODULE_COORD_MOVE> vecPos;
 };
 

+ 5 - 53
View/die-bonder-ui/Src/RewriteControl/SpeedAdjPage.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>564</width>
-    <height>180</height>
+    <width>494</width>
+    <height>132</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -19,7 +19,7 @@
      <rect>
       <x>0</x>
       <y>0</y>
-      <width>561</width>
+      <width>491</width>
       <height>31</height>
      </rect>
     </property>
@@ -35,7 +35,7 @@
      <rect>
       <x>0</x>
       <y>30</y>
-      <width>561</width>
+      <width>491</width>
       <height>101</height>
      </rect>
     </property>
@@ -201,58 +201,10 @@
      </item>
     </layout>
    </widget>
-   <widget class="QWidget" name="layoutWidget">
-    <property name="geometry">
-     <rect>
-      <x>110</x>
-      <y>140</y>
-      <width>351</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <widget class="QPushButton" name="subBut">
-       <property name="minimumSize">
-        <size>
-         <width>80</width>
-         <height>30</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>&lt;&lt;</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLineEdit" name="valLineEdit">
-       <property name="minimumSize">
-        <size>
-         <width>80</width>
-         <height>30</height>
-        </size>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="addBut">
-       <property name="minimumSize">
-        <size>
-         <width>80</width>
-         <height>30</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>&gt;&gt;</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </widget>
    <widget class="QPushButton" name="closeBut">
     <property name="geometry">
      <rect>
-      <x>527</x>
+      <x>458</x>
       <y>2</y>
       <width>31</width>
       <height>23</height>