JonYang 1 deň pred
rodič
commit
2fe5831228
37 zmenil súbory, kde vykonal 965 pridanie a 27 odobranie
  1. BIN
      Output/bin/x64/Control.dll
  2. BIN
      Output/bin/x64/Control.pdb
  3. BIN
      Output/bin/x64/JSMotion.dll
  4. BIN
      Output/bin/x64/Module.dll
  5. BIN
      Output/bin/x64/Module.pdb
  6. BIN
      Output/dll/x64/Control.dll
  7. BIN
      Output/dll/x64/JSMotion.dll
  8. BIN
      Output/dll/x64/Module.dll
  9. 4 0
      Output/inc/Control/CRunButton.h
  10. 1 0
      Output/inc/Control/CViewMotion.h
  11. 33 0
      Output/inc/Module/CAxis.h
  12. 7 0
      Output/inc/Module/CCalib.h
  13. 9 0
      Output/inc/Module/CCoord.h
  14. 2 0
      Output/inc/Module/CForceControl.h
  15. 3 0
      Output/inc/Module/CHIKVisionCamera.h
  16. 7 0
      Output/inc/Module/CIO.h
  17. 1 0
      Output/inc/Module/CLamp_CST.h
  18. 103 5
      Output/inc/Module/CMessageBox.h
  19. 5 0
      Output/inc/Module/CModule.h
  20. 1 0
      Output/inc/Module/CProduct.h
  21. 1 0
      Output/inc/Module/CSingleTemplate.h
  22. 2 0
      Output/inc/Module/CTemperature.h
  23. 1 1
      Output/inc/Module/CUltraHead.h
  24. 1 0
      Output/inc/Module/ILamp.h
  25. BIN
      Output/lib/x64/Common.lib
  26. BIN
      Output/lib/x64/Control.lib
  27. BIN
      Output/lib/x64/JSMotion.lib
  28. BIN
      Output/lib/x64/Module.lib
  29. 77 15
      View/die-bonder-ui/OriginalWnd/DbTreeViewManager.cpp
  30. 8 0
      View/die-bonder-ui/OriginalWnd/DbTreeViewManager.h
  31. 27 5
      View/die-bonder-ui/SBTdie-bonder-ui.pro
  32. 3 0
      View/die-bonder-ui/SBTdie-bonder-ui.vcxproj
  33. 12 1
      View/die-bonder-ui/SBTdie-bonder-ui.vcxproj.filters
  34. 196 0
      View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.cpp
  35. 77 0
      View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.h
  36. 383 0
      View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.ui
  37. 1 0
      View/die-bonder-ui/Src/ProgrammPage.cpp

BIN
Output/bin/x64/Control.dll


BIN
Output/bin/x64/Control.pdb


BIN
Output/bin/x64/JSMotion.dll


BIN
Output/bin/x64/Module.dll


BIN
Output/bin/x64/Module.pdb


BIN
Output/dll/x64/Control.dll


BIN
Output/dll/x64/JSMotion.dll


BIN
Output/dll/x64/Module.dll


+ 4 - 0
Output/inc/Control/CRunButton.h

@@ -84,6 +84,7 @@ namespace ns_module
 		// 创建函数映射表,在子线程中执行
 		std::map<std::string, std::function<long(CRunButton*, ns_module::ST_BUTTON_FUN)>> m_mapFunctionByThread = {
 			REGISTER_FUNCTION(MachineToHome),
+			REGISTER_FUNCTION(MachineToSafePosition),
 			REGISTER_FUNCTION(Machine_SaveConfig),
 			REGISTER_FUNCTION(UltraHead_XY_Test),
 			REGISTER_FUNCTION(Machine_LoadConfig),
@@ -92,6 +93,7 @@ namespace ns_module
 			REGISTER_FUNCTION(Machine_Transfer2BondTable),
 			REGISTER_FUNCTION(Machine_SingnedRun),
 			REGISTER_FUNCTION(BondHead_AccuracyTest),
+			REGISTER_FUNCTION(BondHead_PickAndBond_Diagnosis),
 			REGISTER_FUNCTION(SaveDB),
 			REGISTER_FUNCTION(BH_VacOn),
 			REGISTER_FUNCTION(BH_UltralOnOffTest),
@@ -174,6 +176,7 @@ namespace ns_module
 		long ShowMotionAdjustPage(ST_BUTTON_FUN stInfo);
 
 		long MachineToHome(ST_BUTTON_FUN stInfo);
+		long MachineToSafePosition(ST_BUTTON_FUN stInfo);
 		long Machine_SaveConfig(ST_BUTTON_FUN stInfo);
 		long UltraHead_XY_Test(ST_BUTTON_FUN stInfo);
 		long Machine_LoadConfig(ST_BUTTON_FUN stInfo);
@@ -183,6 +186,7 @@ namespace ns_module
 		long Machine_SingnedRun(ST_BUTTON_FUN stInfo);
 		long BondHead_AccuracyTest(ST_BUTTON_FUN stInfo);
 		long BondHead_PickAndBond_Diagnosis(ST_BUTTON_FUN stInfo);
+		
 		long SaveDB(ST_BUTTON_FUN stInfo);
 		long BH_VacOn(ST_BUTTON_FUN stInfo);
 		long BH_UltralOnOffTest(ST_BUTTON_FUN stInfo);

+ 1 - 0
Output/inc/Control/CViewMotion.h

@@ -30,6 +30,7 @@ namespace ns_module
 		void ShowMotionAdjustPage(string ModuleType, string AxisType);
 
 		long ToHome();
+		long ToSafePosition();
 
 		//»ñÈ¡ËùÓÐÖáÐÅÏ¢
 		vector<CAxis*> GetAxisList();

+ 33 - 0
Output/inc/Module/CAxis.h

@@ -2,6 +2,7 @@
 #include "dt.h"
 #include "CHardware.h"
 #include "JAxis.h"
+#include "CMessageBox.h"
 
 
 //#define WIN32_LEAN_AND_MEAN
@@ -74,6 +75,9 @@ private:
 	//轴当前位置,模拟测试时才会使用
 	double m_dCurrentPosition;
 
+	CMessageBox* m_pMessageBox = nullptr;
+
+private:
 	//判断要移动的位置,是否有热区冲突
 	bool CheckHotZone(double pos);
 	bool IsTriggerHotZoneX(double pos);
@@ -84,6 +88,9 @@ private:
 	void SetTriggerHotZone();
 	void AddHotZoneId(HOT_ZONE_ID_STRUCT stHotZone);
 	void DeleteHotZoneId(HOT_ZONE_ID_STRUCT stHotZone);
+
+	void PopWarn(AlarmID iId, std::string strDescribe,std::string otherInfo = "",
+		LogStream::LogLevel iLevel = LogStream::LogLevel::Error, int buttons = BUTTON_TYPE::CLOSE_BUTTON, std::string strTip = "", std::string strHelp = "");
 public:
 	CAxis();
 
@@ -107,6 +114,32 @@ public:
 	LONG CheckDone();
 	LONG Home(bool bSync = SYNC);
 
+	/**使能状态获取
+	 */
+	bool JIsDriveEnabled();
+
+	/**获取软限位正负使能配置状态接口
+	 */
+	int JGetSoftLimitEnableStatus(bool& bEnabledNeg, bool& bEnabledPos);
+
+	/**设置正负软限位接口
+	* Neg 负 
+	* Pos 正
+	 */
+	int JSetSoftLimit(double dNegLimit,double dPosLimit);
+
+    /**获取软限位及软行程
+     */
+	int JGetSoftLimit(double& dSoftLimitNeg, double& dSoftLimitPos, double& dSoftTravelRange);
+
+	/**直接设置速度的数值
+	 */
+	int JSetTargetVel(double dVel);
+
+	/**要按最大速度的比例设置速度(0-1)
+	 */
+	int JSetTargetVelR(double dVelRatio);
+
 	LONG Move_PassPosReturn(double dDist, double dPassDist, SPEED speed = FAST);
 	LONG MoveTo_PassPosReturn(double dPos, double dPassPos, SPEED speed = FAST);
 	LONG Move(double dDist, SPEED speed = FAST,  bool bSync = SYNC);

+ 7 - 0
Output/inc/Module/CCalib.h

@@ -9,6 +9,7 @@
 #include "ICalibration.h"
 #include "CPxielLocation.h"
 #include "CHardwareList.h"
+#include "CMessageBox.h"
 
 /*
  * 标定类
@@ -120,6 +121,11 @@ protected:
 
     LONG SearchTemp(int iTempID, CCameraBase* camera, bool isToCameraCenter, XY_DOUBLE_STRUCT& outResult);
 
+    void PopWarn(AlarmID iId, std::string strDescribe, std::string otherInfo = "",
+        LogStream::LogLevel iLevel = LogStream::LogLevel::Error, int buttons = BUTTON_TYPE::CLOSE_BUTTON, 
+        std::string strTip = "", std::string strHelp = "");
+
+
 protected:
     int m_nID = 0;              // 模块的 ID,用于唯一标识不同的模块
     string m_sName = "";        // 模块的名称,用于区分不同的模块
@@ -133,6 +139,7 @@ protected:
     CManageDB* m_pManageDB = nullptr;
     CMachineCalibration* m_pCalibDB = nullptr; 
     CCalibrationConfig* m_pCCalibrationConfig = nullptr;
+    CMessageBox* m_pMessageBox = nullptr;
 
     bool m_bStop = false;
 

+ 9 - 0
Output/inc/Module/CCoord.h

@@ -4,6 +4,8 @@
 #include <string>
 #include <memory>
 #include <vector>
+#include "CMessageBox.h"
+
 
 #ifdef C_COORD_EXPORTS
 #define C_COORD_DLL_API __declspec(dllexport)
@@ -18,6 +20,13 @@ private:
 	bool m_bIsInitSuccess;
 	ICoord* m_pCoord = nullptr;
 	bool    m_bEnable;               //Ô˿ؿ¨½ûÖ¹/ÆôÓÃ
+	CMessageBox* m_pMessageBox = nullptr;
+
+private:	
+	void PopWarn(AlarmID iId, std::string strDescribe, std::string otherInfo = "",
+	LogStream::LogLevel iLevel = LogStream::LogLevel::Error, int eViewButton = static_cast<int>(BUTTON_TYPE::CLOSE_BUTTON), 
+		std::string strTip = "", std::string strHelp = "");
+
 public:
 	CCoord();
 	LONG Init(string name, ICoord* pCoord);

+ 2 - 0
Output/inc/Module/CForceControl.h

@@ -8,12 +8,14 @@
 #include "CManageDB.h"
 #include "CMath.h"
 #include "CIO.h"
+#include "CMessageBox.h"
 
 /*
  * 力控类,包含标定和测高功能
  * 标定:通过一系列操作得到力和电流之间的线性表达式
  * 注意:压合距离需要和测高时保持相同!!!!!!
  * 疑问:寻压测高等应该先判断力控位置?
+ * 增加寻最大力和最小力功能
  * 增加测试界面
  */
 

+ 3 - 0
Output/inc/Module/CHIKVisionCamera.h

@@ -1,6 +1,7 @@
 #pragma once
 #include "MvCamera.h"
 #include "CCameraBase.h"
+#include "CMessageBox.h"
 
 #ifdef HIKVISION_CAMERA_EXPORTS
 #define HIKVISION_CAMERA_DLL_API __declspec(dllexport)
@@ -38,6 +39,8 @@ private:
 
     CMvCamera m_stMvCamera;
     UCHAR* GetDeviceUserDefinedName(MV_CC_DEVICE_INFO* pDeviceInfo);
+
+    CMessageBox* m_pMeaasgeBox = nullptr;
     
 private:
     CRITICAL_SECTION        m_hSaveImageMux;    

+ 7 - 0
Output/inc/Module/CIO.h

@@ -4,6 +4,7 @@
 #include "CHardware.h"
 #include <string>
 #include <memory>
+#include "CMessageBox.h"
 
 #ifdef C_IO_EXPORTS
 #define C_IO_DLL_API __declspec(dllexport)
@@ -35,6 +36,12 @@ private:
 	CAnalogOutput* m_pAo = nullptr;
 	CAnalogInput* m_pAi = nullptr;
 
+	CMessageBox* m_pMessageBox = nullptr;
+
+private:
+	void PopWarn(AlarmID iId, std::string strDescribe, std::string otherInfo = "",
+		LogStream::LogLevel iLevel = LogStream::LogLevel::Error, BUTTON_TYPE eViewButton = BUTTON_TYPE::CLOSE_BUTTON, std::string strTip = "", std::string strHelp = "");
+
 public:
 	CIO();
 	LONG Init(ns_db::IO_CONFIG_STRUCT stIoConfig, void* pIO);

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

@@ -22,6 +22,7 @@ class LAMP_CST_DLL_API CLamp_CST : public ILamp
 private:
 	ControllerHandle m_stControllerHandle;
 	static std::mutex m_mutexReadWrite;
+	string m_strIpAddress = "";
 
 public:
 	long Init(const char* ipAddress) override; //³õʼ»¯

+ 103 - 5
Output/inc/Module/CMessageBox.h

@@ -7,13 +7,13 @@
 #include "dt.h"
 #include "CLog.h"
 
-typedef enum
+enum BUTTON_TYPE
 {
 	CLOSE_BUTTON = 0x1,  //关闭
 	STOP_BUTTON = 0x2,  //终止
 	REPEAT_BUTTON = 0x4,//重复
 	IGNORE_BUTTON = 0x8,//忽略
-}BUTTON_TYPE;
+};
 
 typedef struct
 {
@@ -25,6 +25,102 @@ typedef struct
 	std::string strHelp;				//报警帮助信息
 }MESSAGE_INFO;
 
+enum AlarmID
+{
+	//初始化错误
+	SoftWareInitError,
+	ReadDBError,
+	GetAxisError,
+	CardInitError,
+	ModuleInitError,
+
+
+	//轴
+	ZHotZone,
+	XHotZone,
+	YHotZone,
+	AxisMoveError,
+	AxisStopError,
+	GetAxisPosError,
+	GetCurrentError,
+	ChangeForceCurrentError,
+	AxisOnError,
+	AxisOffError,
+	AxisHomeError,
+	AxisTimeOut,
+	RunAcsBufferError,
+	StopAcsBufferError,
+	WriteAcsBufferError,
+	GetAcsBufferError,
+	WriteSocketError,
+	WriteSerialError,
+	SetAxisParamError,
+
+	//IO
+	GetIOStatusError,
+	SetIOError,
+
+	//坐标系
+	CoordMoveError,
+	CoordTimeOut,
+
+	//模组
+	DieLose, //晶粒丢失
+	NozzleBlocked, //吸嘴堵塞
+	ExceedEjectorMaxLifeTime,
+	ExceedNozzleMaxLifeTime,
+	WaitTemperatureTimeOut,
+	NozzleNotExist,
+	NozzleHavedExist,
+	UnloadNozzleFail,
+	LoadNozzleFail,
+	WaferZAtUpPos,
+	WaferRingNotInPos,
+	WaferRunOut,
+
+
+	//视觉
+	CameraGrabFail,
+
+	TempIdWrong,
+	PRCameraIdWrong,
+	CreateTempError,
+	SearchTempError,
+	SearchTempWithoutXResult,
+	SearchTempWithoutYResult,
+	SearchTempWithoutAngleResult,
+	AlnExceedDeviation,
+
+	// 标定
+	RCalibError,
+	HandEyeCalibError,
+	FindForceTimeOut,
+
+	//提示
+	PleasePlaceCalss,
+	CalibHalfStop,
+
+	//其他
+	LightCtrlConnectError,
+	SetLightError,
+	GetLightError,
+	SetTemperatureError,
+	GetTemperatureError,
+	TemperatureCtrlConnectError,
+	TemperatureCtrlTypeError,
+
+
+
+
+};
+
+struct MixAlarmMessge
+{
+	AlarmID id;
+	std::string chineseInfo;
+	std::string EnglishInfo;
+};
+
 //报警弹框回调函数
 typedef BUTTON_TYPE(*CallMessageBox) (MESSAGE_INFO stMsgInfo);
 
@@ -48,14 +144,16 @@ private:
 	void ErasePopMassage(int iId);
 public:
 	// 获取单实例对象
-	static long GetInstance(CMessageBox** pMsgBox);
+	static CMessageBox* GetInstance();
+
+	//static CMessageBox* GetInstance();
 
 	void SetCallMessageBoxFunc(CallMessageBox func);
 
 	
 	void ClearAllPopMassage();
 
-	BUTTON_TYPE PopMassageBox(int eViewButton, LogStream::LogLevel iLevel, long iId,
-		std::string strDescribe, std::string strTip="", std::string strHelp = "");
+	BUTTON_TYPE PopMassageBox(long iId, std::string strDescribe, 
+		LogStream::LogLevel iLevel = LogStream::LogLevel::Error, int eViewButton = BUTTON_TYPE::CLOSE_BUTTON, std::string strTip="", std::string strHelp = "");
 };
 

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

@@ -19,6 +19,7 @@
 #include "CLog.h"
 #include "SystemResources.h"
 #include "CHardwareList.h"
+#include "CMessageBox.h"
 
 using namespace std;
 using namespace ns_db;
@@ -146,12 +147,16 @@ public:
 protected:
 	vector<MODULE_CONFIG_STRUCT>* GetConfigVector() { return &m_vecConfig; }
 
+	BUTTON_TYPE PopWarn(AlarmID iId, std::string strDescribe, LogStream::LogLevel iLevel = LogStream::LogLevel::Error,
+		int buttons = BUTTON_TYPE::CLOSE_BUTTON, std::string strTip = "", std::string strHelp = "");
+
 protected:
 	CManageDB* m_pCManageDB = nullptr;
 	CModuleConfig* m_pModuleConfigDB = nullptr;
 	CHardware* m_pCHardware = nullptr;
 	vector<MODULE_CONFIG_STRUCT> m_vecConfig;
 	vector<CAxis*> m_vecAxis;
+	CMessageBox* m_pMessageBox = nullptr;
 	bool m_bIsInitSuccess = false;
 	INT m_nModuleType = 0;
 	string m_strModuleName = "";

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

@@ -375,6 +375,7 @@ namespace ns_db
 		LONG LoadBondInfoData();
 		LONG SaveBondInfoData();
 	public:
+		std::vector<BOND_INFO_STRUCT> GetAllBondInfoData() { return m_VecBondInfoData; };
 		LONG GetBondInfoData(UINT iInfoId, BOND_INFO_STRUCT& stBondInfoData);
 		LONG SetBondInfoData(int infoId, BOND_INFO_STRUCT stBondInfoData);
 		LONG AddBondInfoData(BOND_INFO_STRUCT stBondInfoData,int& newInfoId);//需要指定矩阵ID

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

@@ -5,6 +5,7 @@
 //#include "CXYCalib.h"
 //#include "ILocalizationManager.h"
 #include "CPxielLocation.h"
+#include "CMessageBox.h"
 
 #ifdef C_PR_TEMPLATE_EXPORTS
 #define C_PR_TEMPLATE_DLL_API __declspec(dllexport)

+ 2 - 0
Output/inc/Module/CTemperature.h

@@ -4,6 +4,7 @@
 #include <vector>
 #include <mutex>
 #include"CRS485.h"
+#include "CMessageBox.h"
 
 #ifdef TEMPERATURE_EXPORTS
 #define Temperature_DLL_API __declspec(dllexport)
@@ -52,6 +53,7 @@ public:
 
 private:
 	Temperature_Ctltype m_iTemperType; //É豸ÀàÐÍ
+	std::string m_strPort = "";
 	CRS485 *m_ComPort;
 	bool m_bIsInitSuccess;
 	//static CTemperature *m_Temperature;

+ 1 - 1
Output/inc/Module/CUltraHead.h

@@ -19,7 +19,7 @@ public:
     CUltraHead(MODULE_LIST eModuleType);
     ~CUltraHead();
 
-    void SetUltraDo(CIO* output) { m_pUltraIO = output; }
+    //void SetUltraDo(CIO* output) { m_pUltraIO = output; }
     LONG AllocateIo(vector<CIO*> vecIo);
 
     CManageDB* m_pCManageDB = nullptr;

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

@@ -50,6 +50,7 @@ protected:
 	Lamp_Ctltype m_iLightType; //设备类型
 	string m_strLightName;
 
+
 	bool    m_bEnable;               //灯光控制器禁止/启用
 
 	ILamp(Lamp_Ctltype iLightType,string strLightName);

BIN
Output/lib/x64/Common.lib


BIN
Output/lib/x64/Control.lib


BIN
Output/lib/x64/JSMotion.lib


BIN
Output/lib/x64/Module.lib


+ 77 - 15
View/die-bonder-ui/OriginalWnd/DbTreeViewManager.cpp

@@ -207,6 +207,11 @@ bool DbTreeViewManager::hasPrivilege(const int &UserGrade, const int &userPrivil
 
 void DbTreeViewManager::initializeTree(QString name, const int &userPrivilege)
 {
+    //DelMemoryWnd(m_pProgrammPage);
+    //DelMemoryWnd(m_pDiagnosisPage);
+    //m_thirdLevelFieldWnd = nullptr; //TODO: 释放为啥不为空?
+
+
     promptSaveChanges();
     QString strLog = "Initializing tree with configId:";
     strLog += name;
@@ -312,6 +317,7 @@ void DbTreeViewManager::initializeTree(QString name, const int &userPrivilege)
 
         // 创建新的 "字段展示" 窗口,并赋值给 m_thirdLevelFieldWnd
         m_thirdLevelFieldWnd = new QWidget(m_pOriginalWndMenuPage);
+        m_thirdLevelFieldWnd->setAttribute(Qt::WA_DeleteOnClose);
         m_thirdLevelFieldWnd->setWindowTitle("字段展示");
         m_thirdLevelFieldWnd->setStyleSheet("background-color: transparent;");
 
@@ -329,20 +335,63 @@ void DbTreeViewManager::initializeTree(QString name, const int &userPrivilege)
         m_thirdLevelFieldWnd->show();
 
     }
-    else if (name == "Diagnosis")
-    {
+    //else if (name == "Diagnosis")
+    //{
+    //    // 不沿用下面的页面,自己管理一个页面
+    //            // 隐藏目录树和分隔线
+    //    for (auto separator : m_mapFirstLevelSeparators)
+    //    {
+    //        if (separator)
+    //        {
+    //            separator->hide();
+    //        }
+    //    }
+    //    // 隐藏导航栏
+    //    m_pNavigationWidget->hide();
 
-    }
+    //    // 隐藏按钮
+    //    updateButtonsVisibility(); // 将按钮隐藏
+
+    //    // 隐藏特定的分隔线 lineFrame1
+    //    if (m_pLineFrame1)
+    //    {
+    //        m_pLineFrame1->hide();
+    //    }
+    //    // 若已有第三层窗口,先关闭并释放
+    //    if (m_thirdLevelFieldWnd)
+    //    {
+    //        m_thirdLevelFieldWnd->close();
+    //        m_thirdLevelFieldWnd->deleteLater();
+    //        m_thirdLevelFieldWnd = nullptr;
+    //    }
+
+    //    // 清理之前的控件列表
+    //    m_fieldWidgets.clear();
+
+    //    // 创建新的 "字段展示" 窗口,并赋值给 m_thirdLevelFieldWnd
+    //    m_thirdLevelFieldWnd = new QWidget(m_pOriginalWndMenuPage);
+    //    m_thirdLevelFieldWnd->setWindowTitle("字段展示");
+    //    m_thirdLevelFieldWnd->setAttribute(Qt::WA_DeleteOnClose);
+    //    m_thirdLevelFieldWnd->setStyleSheet("background-color: transparent;");
+
+    //    // 填满 widget2
+    //    m_thirdLevelFieldWnd->setGeometry(0, 0, m_pOriginalWndMenuPage->width(), m_pOriginalWndMenuPage->height());
+    //    m_pDiagnosisPage = new DiagnosisPage(m_thirdLevelFieldWnd);
+
+    //    QVBoxLayout* mainLayout = new QVBoxLayout(m_thirdLevelFieldWnd);
+    //    mainLayout->setContentsMargins(0, 0, 0, 0);
+    //    mainLayout->addWidget(m_pDiagnosisPage);
+
+    //    m_thirdLevelFieldWnd->setLayout(mainLayout);
+
+    //    m_thirdLevelFieldWnd->show();
+    //}
     else 
     {
-
         // 若已有第三层窗口,先关闭并释放
         if (m_thirdLevelFieldWnd)
         {
-            m_thirdLevelFieldWnd->close();
-            m_thirdLevelFieldWnd->deleteLater();
-            m_thirdLevelFieldWnd = nullptr;
-            m_pProgrammPage = nullptr;
+            DelMemoryWnd(m_thirdLevelFieldWnd);
         }
 
         // **其他配置逻辑**
@@ -1081,7 +1130,9 @@ void DbTreeViewManager::setupButton()
 
 void DbTreeViewManager::updateButtonsVisibility()
 {
-    if (m_currentConfigName == "Home" || m_currentConfigName == "Programme")
+    if (m_currentConfigName == "Home" || 
+        m_currentConfigName == "Programme" ||
+        m_currentConfigName=="Diagnosis")
     {
         // Home 界面,隐藏所有按钮
         ButtonBack->hide();
@@ -4123,19 +4174,30 @@ void DbTreeViewManager::Level3MenuAllSaveBut(QVBoxLayout* pVBox)
     pVBox->addLayout(fieldLayout);
 }
 
-void DbTreeViewManager::promptSaveChanges() {
-    if (!modifiedLabels.isEmpty()) {
-        if (JMessageTip::Message_question(tr("Modifications detected, do you want to save?", "检测到修改内容,是否保存?"), this) == QMessageBox::Yes) {
+void DbTreeViewManager::DelMemoryWnd(QWidget* pWid)
+{
+    if (pWid != nullptr)
+    {
+        pWid->close();
+        //delete  pWid;
+        pWid->deleteLater();
+        pWid = nullptr;
+    }
+}
+
+void DbTreeViewManager::promptSaveChanges() 
+{
+    if (!modifiedLabels.isEmpty()) 
+    {
+        if (JMessageTip::Message_question(tr("Modifications detected, do you want to save?", "检测到修改内容,是否保存?"), this) == QMessageBox::Yes) 
+        {
             emit saveClicked();
-            return;
         }
         else
         {
             modifiedLabels.clear();
-            return;
         }
     }
-    return;
 }
 
 // 清空历史

+ 8 - 0
View/die-bonder-ui/OriginalWnd/DbTreeViewManager.h

@@ -3,6 +3,7 @@
 #define NOMINMAX
 #include "TreeViewManager/TreeViewManagerHead.h"
 #include "Src/ProgrammPage.h"
+#include "Src/DiagnosisPage/DiagnosisPage.h"
 
 class OriginalWnd;
 
@@ -148,11 +149,18 @@ private:
      */
     void Level3MenuAllSaveBut(QVBoxLayout* pVBox);
 
+    /**释放内存窗口
+     */
+    void DelMemoryWnd(QWidget* pWid);
 private:
     /** 编程界面
     */
     ProgrammPage* m_pProgrammPage = nullptr;
 
+    /**诊断页面
+     */
+    DiagnosisPage* m_pDiagnosisPage = nullptr;
+
     /**OriginalWnd 窗口
      */
     OriginalWnd* m_originalWnd = nullptr;

+ 27 - 5
View/die-bonder-ui/SBTdie-bonder-ui.pro

@@ -18,8 +18,7 @@ HEADERS += $$files(*.h, $$PWD) \
     OriginalWnd/TreeViewManager/TreeViewManagerHead.h
 FORMS   += $$files(*.ui, $$PWD)
 
-HEADERS += ./gen_interface.h \
-    ./ImageView.h \
+HEADERS += ./ImageView.h \
     ./ImageWidget.h \
     ./ImageWidget_nodrag.h \
     ./Login.h \
@@ -32,6 +31,7 @@ HEADERS += ./gen_interface.h \
     ./Src/common/JQCommon.h \
     ./Src/common/JUserAccountsData.h \
     ./Src/common/UserManagementShared.h \
+    ./Src/Sql/GetUiConfigFormDB.h \
     ./Src/Sql/SqlOperation.h \
     ./Src/SystemInfoPage/SystemInfoPage.h \
     ./Src/SystemInfoPage/PageWnd/LanguageSwitchWnd.h \
@@ -47,6 +47,7 @@ HEADERS += ./gen_interface.h \
     ./OriginalWnd/chartline.h \
     ./OriginalWnd/TreeViewManager/TreeViewManagerHead.h \
     ./OriginalWnd/TreeViewManager/JIoMapPage.h \
+    ./OriginalWnd/TreeViewManager/JCustomLabelControls.h \
     ./CameraMaterialGroupWnd/Group.h \
     ./CameraMaterialGroupWnd/CameraImage/CameraImageHandler.h \
     ./CameraMaterialGroupWnd/MaterialWindow/DieItem.h \
@@ -58,6 +59,10 @@ HEADERS += ./gen_interface.h \
     ./CameraMaterialGroupWnd/MaterialWindow/Wafer.h \
     ./CameraMaterialGroupWnd/MaterialWindow/WaferGraphicsView.h \
     ./CameraMaterialGroupWnd/MaterialWindow/WaffleGraphicsView.h \
+    ./Src/WaferProgramPage.h \
+    ./Src/WaffleProgramPage.h \
+    ./Src/BondMatrixProgramPage.h \
+    ./Src/ProgrammPage.h \
     ./Src/common/GlobalUse/JMouseMonitorThread.h \
     ./Src/RewriteControl/LightJoystickSwitchPage.h \
     ./Src/RewriteControl/ControlOperationPage.h \
@@ -66,7 +71,11 @@ HEADERS += ./gen_interface.h \
     ./Src/RewriteControl/SpeedAdjPage.h \
     ./Src/RewriteControl/MsgDlg/CustomMessageDlg.h \
     ./Src/RewriteControl/Sidebar/LogStatePage.h \
-    ./Src/RewriteControl/Controls/JReLineEdit.h
+    ./Src/RewriteControl/Controls/JReLineEdit.h \
+    ./Src/RewriteControl/Controls/DoubleSpinBox.h \
+    ./Src/RewriteControl/Controls/SpinBox.h \
+    ./Src/MatrixDialogs/NoBondPtEditDialog.h \
+    ./Src/DiagnosisPage/DiagnosisPage.h
 SOURCES += ./OriginalWnd/TreeViewManager/JIoMapPage.cpp \
     ./ImageView.cpp \
     ./ImageWidget.cpp \
@@ -74,10 +83,14 @@ SOURCES += ./OriginalWnd/TreeViewManager/JIoMapPage.cpp \
     ./Login.cpp \
     ./MainWnd.cpp \
     ./OriginalWnd/OriginalWnd.cpp \
-    ./gen_interface.cpp \
     ./main.cpp \
     ./CameraDistribute.cpp \
+    ./Src/BondMatrixProgramPage.cpp \
     ./Src/CameraBind.cpp \
+    ./Src/ProgrammPage.cpp \
+    ./Src/WaferProgramPage.cpp \
+    ./Src/WaffleProgramPage.cpp \
+    ./Src/Sql/GetUiConfigFormDB.cpp \
     ./Src/Sql/SqlOperation.cpp \
     ./Src/common/JLogAllOutput.cpp \
     ./Src/common/JMessageTip.cpp \
@@ -95,7 +108,11 @@ SOURCES += ./OriginalWnd/TreeViewManager/JIoMapPage.cpp \
     ./Src/RewriteControl/SpeedAdjWnd.cpp \
     ./Src/RewriteControl/MsgDlg/CustomMessageDlg.cpp \
     ./Src/RewriteControl/Sidebar/LogStatePage.cpp \
+    ./Src/RewriteControl/Controls/DoubleSpinBox.cpp \
     ./Src/RewriteControl/Controls/JReLineEdit.cpp \
+    ./Src/RewriteControl/Controls/SpinBox.cpp \
+    ./Src/MatrixDialogs/NoBondPtEditDialog.cpp \
+    ./Src/DiagnosisPage/DiagnosisPage.cpp \
     ./OriginalWnd/CameraDataHandleAndShow.cpp \
     ./OriginalWnd/ChartsAndCamerasWnd.cpp \
     ./OriginalWnd/DbTreeViewManager.cpp \
@@ -128,11 +145,16 @@ FORMS += ./OriginalWnd/ChartsAndCamerasWnd.ui \
     ./Src/SystemInfoPage/PageWnd/AccountMaintenanceWnd.ui \
     ./Src/SystemInfoPage/PageWnd/AddUserAccountWnd.ui \
     ./Src/SystemInfoPage/PageWnd/LanguageSwitchWnd.ui \
+    ./Src/BondMatrixProgramPage.ui \
+    ./Src/ProgrammPage.ui \
+    ./Src/WaferProgramPage.ui \
+    ./Src/WaffleProgramPage.ui \
     ./Src/RewriteControl/ControlOperationPage.ui \
     ./Src/RewriteControl/LightJoystickSwitchPage.ui \
     ./Src/RewriteControl/SpeedAdjPage.ui \
     ./Src/RewriteControl/SpeedAdjWnd.ui \
-    ./Src/RewriteControl/MsgDlg/CustomMessageDlg.ui
+    ./Src/RewriteControl/MsgDlg/CustomMessageDlg.ui \
+    ./Src/DiagnosisPage/DiagnosisPage.ui
 
 # Default rules for deployment.
 qnx: target.path = /tmp/$${TARGET}/bin

+ 3 - 0
View/die-bonder-ui/SBTdie-bonder-ui.vcxproj

@@ -245,6 +245,7 @@
     <ClCompile Include="Src\common\JMessageTip.cpp" />
     <ClCompile Include="Src\common\JQCommon.cpp" />
     <ClCompile Include="Src\common\JUserAccountsData.cpp" />
+    <ClCompile Include="Src\DiagnosisPage\DiagnosisPage.cpp" />
     <ClCompile Include="Src\MatrixDialogs\NoBondPtEditDialog.cpp" />
     <ClCompile Include="Src\ProgrammPage.cpp" />
     <ClCompile Include="Src\RewriteControl\ControlOperationPage.cpp">
@@ -308,6 +309,7 @@
     <QtMoc Include="Src\RewriteControl\Controls\SpinBox.h" />
     <QtMoc Include="Src\ProgrammPage.h" />
     <QtMoc Include="Src\MatrixDialogs\NoBondPtEditDialog.h" />
+    <QtMoc Include="Src\DiagnosisPage\DiagnosisPage.h" />
     <ClInclude Include="Src\Sql\GetUiConfigFormDB.h" />
     <ClInclude Include="Src\Sql\SqlOperation.h" />
     <QtMoc Include="Src\CameraBind.h" />
@@ -386,6 +388,7 @@
     <QtUic Include="OriginalWnd\SingleCameraOperationWnd.ui">
     </QtUic>
     <QtUic Include="Src\BondMatrixProgramPage.ui" />
+    <QtUic Include="Src\DiagnosisPage\DiagnosisPage.ui" />
     <QtUic Include="Src\ProgrammPage.ui" />
     <QtUic Include="Src\RewriteControl\ControlOperationPage.ui" />
     <QtUic Include="Src\RewriteControl\LightJoystickSwitchPage.ui" />

+ 12 - 1
View/die-bonder-ui/SBTdie-bonder-ui.vcxproj.filters

@@ -148,6 +148,9 @@
     <Filter Include="Source Files\Src\MatrixDialogs">
       <UniqueIdentifier>{7775c979-a512-43b3-924f-c18e89118da1}</UniqueIdentifier>
     </Filter>
+    <Filter Include="Source Files\Src\DiagnosisPage">
+      <UniqueIdentifier>{06eb9ba5-1d27-4a6a-970f-bfdf95384ffe}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="ImageWidget.cpp">
@@ -315,6 +318,9 @@
     <ClCompile Include="Src\MatrixDialogs\NoBondPtEditDialog.cpp">
       <Filter>Source Files\Src\MatrixDialogs</Filter>
     </ClCompile>
+    <ClCompile Include="Src\DiagnosisPage\DiagnosisPage.cpp">
+      <Filter>Source Files\Src\DiagnosisPage</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <QtMoc Include="ImageWidget.h">
@@ -449,6 +455,9 @@
     <QtMoc Include="Src\MatrixDialogs\NoBondPtEditDialog.h">
       <Filter>Source Files\Src\MatrixDialogs</Filter>
     </QtMoc>
+    <QtMoc Include="Src\DiagnosisPage\DiagnosisPage.h">
+      <Filter>Source Files\Src\DiagnosisPage</Filter>
+    </QtMoc>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="debug\moc_predefs.h.cbt">
@@ -525,6 +534,9 @@
     <QtUic Include="Src\WaferProgramPage.ui">
       <Filter>Source Files\Src</Filter>
     </QtUic>
+    <QtUic Include="Src\DiagnosisPage\DiagnosisPage.ui">
+      <Filter>Source Files\Src\DiagnosisPage</Filter>
+    </QtUic>
   </ItemGroup>
   <ItemGroup>
     <None Include="images\Participation display\BlackDiamond.png">
@@ -827,7 +839,6 @@
     <None Include="images\light\zoom up.png">
       <Filter>Resource Files</Filter>
     </None>
-    <None Include="dark.qss" />
     <None Include="dark.qss">
       <Filter>Resource Files</Filter>
     </None>

+ 196 - 0
View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.cpp

@@ -0,0 +1,196 @@
+#include "DiagnosisPage.h"
+#include "../common/JQCommon.h"
+
+DiagnosisPage::DiagnosisPage(QWidget *parent)
+    : QWidget(parent)
+{
+    ui.setupUi(this);
+
+    Init();
+}
+
+DiagnosisPage::~DiagnosisPage()
+{}
+
+void DiagnosisPage::Init()
+{
+    this->setAttribute(Qt::WA_DeleteOnClose);
+    ui.axisSwitchTabPage->tabBar()->hide();
+    ui.axisSwitchTabPage->setCurrentIndex(0);
+    ui.axisListTree->setHeaderHidden(true);
+    ui.axisListTree->setEditTriggers(QAbstractItemView::NoEditTriggers);
+
+    ns_module::CViewInterface* pCViewInterface = ns_module::CViewInterface::GetInstance();
+
+    if (pCViewInterface)
+    {
+        m_veCAxis = pCViewInterface->GetViewMotion()->GetAxisList();
+        // 创建模型
+        m_model = new QStandardItemModel(this);
+        QString strModeA;
+        QStandardItem* pModeType = nullptr;
+        QStandardItem* rooto = m_model->invisibleRootItem();
+        QStandardItem* root1 = new QStandardItem(tr("Diagnosis Page", "诊断页面"));
+        rooto->appendRow(root1);
+        root1->setFlags(root1->flags() | Qt::ItemIsEnabled);
+
+        for (auto a: m_veCAxis)
+        {
+            QString strMode = QString::fromLocal8Bit(a->GetModuleType().c_str());
+            if (strModeA != strMode)
+            {
+                pModeType = new QStandardItem(strMode);
+                
+                root1->appendRow(pModeType);
+                strModeA = strMode;
+            }
+
+            // 添加二级节点
+            QStandardItem* pAisType = new QStandardItem(QString::fromLocal8Bit(a->GetStringAxisType().c_str()));
+            pModeType->appendRow(pAisType);
+
+        }
+        
+        ui.axisListTree->setModel(m_model);
+        ui.axisListTree->expandAll();
+    }
+    
+    // 控件状态
+    JQCommon::SetQLineEditLimit(ui.negLineEdit);
+    JQCommon::SetQLineEditLimit(ui.posLineEdit);
+    JQCommon::SetQLineEditLimit(ui.speedLineEdit);
+}
+
+void DiagnosisPage::SwitchOperationAxisPage(bool isSwitch)
+{
+    if (isSwitch)
+    {
+        QString strMode = QString::fromLocal8Bit(m_pCurrOpenCAxis->GetAxisName().c_str());
+        ui.titleLable->setText(strMode);
+
+        // 设置状态
+        m_IsDriveEnabled = m_pCurrOpenCAxis->JIsDriveEnabled();
+        ui.xAxisEnabledRadioBut->setChecked(m_IsDriveEnabled);
+
+        // 获取正负限位是否打开
+        bool bEnabledNeg, bEnabledPos;
+        m_pCurrOpenCAxis->JGetSoftLimitEnableStatus(bEnabledNeg, bEnabledPos);
+        if (bEnabledNeg && bEnabledPos)
+        {
+            double dSoftLimitNeg, dSoftLimitPos, dSoftTravelRange;
+            m_pCurrOpenCAxis->JGetSoftLimit(dSoftLimitNeg, dSoftLimitPos, dSoftTravelRange);
+            ui.negLineEdit->setText(QString::number(dSoftLimitNeg,'f',2));
+            ui.posLineEdit->setText(QString::number(dSoftLimitPos,'f',2));
+        }
+
+        
+        //ui.speedLineEdit->setText(QString::number(0));
+
+        // 设置定时获取速度
+        const int nRunTime = 300; //所有新开的定时器都用这个
+        m_nTimerID = startTimer(nRunTime);
+    }
+    else
+    {
+        killTimer(m_nTimerID);
+        m_nTimerID = 0;
+        ui.axisSwitchTabPage->setCurrentIndex(0);
+    }
+}
+
+void DiagnosisPage::timerEvent(QTimerEvent* event)
+{
+    if (m_nTimerID == event->timerId())
+    {
+        if (m_pCurrOpenCAxis)
+        {
+            double doPos = 0.0;
+            m_pCurrOpenCAxis->GetActualPos(doPos);
+            ui.xPositionLineEdit->setText(QString::number(doPos, 'f', 2));
+        }
+    }
+}
+
+void DiagnosisPage::on_axisListTree_doubleClicked(const QModelIndex& index)
+{
+    if (index.isValid()) 
+    {
+        QString itemName = index.data().toString();
+        if (!m_model->hasChildren(index)) // 没有子节点
+        {
+            // 表示想要切换到轴控制
+            QModelIndex parentIndex = index.parent();
+            QString currentItem = parentIndex.data().toString();
+            currentItem += "_";
+            currentItem += itemName;
+            // 给轴窗口
+            ui.axisSwitchTabPage->setCurrentIndex(1);
+
+            for (auto& a : m_veCAxis)
+            {
+                QString strMode = QString::fromLocal8Bit(a->GetAxisName().c_str());
+                if (strMode == currentItem)
+                {
+                    //m_pCurrOpenCAxis.reset(a);
+                    m_pCurrOpenCAxis = a;
+
+                    SwitchOperationAxisPage(true);
+                    break;
+                }
+            }
+        }
+    }
+}
+
+void DiagnosisPage::on_xAxisDisable_clicked()
+{
+    QString strText = tr("Disable", "关使能");
+    if (m_IsDriveEnabled)
+    {
+        m_pCurrOpenCAxis->AxisOff();
+        strText = tr("Enable", "开使能");
+    }
+    else
+    {
+        m_pCurrOpenCAxis->AxisOn();
+    }
+
+    ui.xAxisDisable->setText(strText);
+}
+
+
+void DiagnosisPage::on_xAxisHomeBut_clicked()
+{
+    m_pCurrOpenCAxis->Home();
+}
+
+void DiagnosisPage::on_setPosBut_clicked()
+{
+    double xNeg = ui.negLineEdit->text().toDouble();
+    double xPos = ui.posLineEdit->text().toDouble();
+
+    m_pCurrOpenCAxis->JSetSoftLimit(xNeg, xPos);
+
+}
+
+void DiagnosisPage::on_setNegBut_clicked()
+{
+    double xNeg = ui.negLineEdit->text().toDouble();
+    double xPos = ui.posLineEdit->text().toDouble();
+
+    m_pCurrOpenCAxis->JSetSoftLimit(xNeg, xPos);
+}
+
+
+void DiagnosisPage::on_setSpeedBut_clicked()
+{
+    double doSpeed = ui.speedLineEdit->text().toDouble();
+    m_pCurrOpenCAxis->JSetTargetVel(doSpeed);
+}
+
+
+void DiagnosisPage::on_retBut_clicked()
+{
+    SwitchOperationAxisPage(false);
+}
+

+ 77 - 0
View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.h

@@ -0,0 +1,77 @@
+// *****************************************************************************
+// 版权所有(C)2023~2099 上海骄成超声波技术有限公司
+// 保留所有权利
+// *****************************************************************************
+// 作者 : 杨坚
+// 版本 : 1.0
+// 功能说明:
+//          诊断页面
+// *****************************************************************************
+
+#ifndef __DIAGNOSISPAGE_H__
+#define __DIAGNOSISPAGE_H__ 1
+
+#include <QWidget>
+#include <QPointer>
+#include "QStandardItemModel"
+#include "ui_DiagnosisPage.h"
+#include "CViewInterface.h"
+
+class DiagnosisPage : public QWidget
+{
+    Q_OBJECT
+public:
+    DiagnosisPage(QWidget *parent = nullptr);
+    ~DiagnosisPage();
+
+
+private:
+    void Init();
+
+    /**切换操作轴页面
+     */
+    void SwitchOperationAxisPage(bool isSwitch);
+
+    void timerEvent(QTimerEvent* event) override; 
+
+private slots:
+    void on_axisListTree_doubleClicked(const QModelIndex& index);
+
+    void on_xAxisDisable_clicked();
+
+    void on_xAxisHomeBut_clicked();
+
+    void on_setPosBut_clicked();
+
+    void on_setNegBut_clicked();
+
+    void on_setSpeedBut_clicked();
+
+    void on_retBut_clicked();
+
+private:
+    Ui::DiagnosisPageClass ui;
+
+    /**树指针
+     */
+    QStandardItemModel*     m_model = nullptr;
+
+    /**所有轴指针
+     */
+    std::vector<CAxis*>     m_veCAxis;
+
+    /**当前轴指针
+     */
+    //std::unique_ptr<CAxis>  m_pCurrOpenCAxis;
+    CAxis*                  m_pCurrOpenCAxis = nullptr;
+
+    /**使能
+     */
+    bool                    m_IsDriveEnabled = false;
+
+    /**定时获取位置
+    */
+    int                     m_nTimerID = -1;
+};
+
+#endif  //__DIAGNOSISPAGE_H__

+ 383 - 0
View/die-bonder-ui/Src/DiagnosisPage/DiagnosisPage.ui

@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DiagnosisPageClass</class>
+ <widget class="QWidget" name="DiagnosisPageClass">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>490</width>
+    <height>1178</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>DiagnosisPage</string>
+  </property>
+  <property name="styleSheet">
+   <string notr="true">background-color: rgb(240,243,253);</string>
+  </property>
+  <widget class="QTabWidget" name="axisSwitchTabPage">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>80</y>
+     <width>481</width>
+     <height>1101</height>
+    </rect>
+   </property>
+   <property name="currentIndex">
+    <number>1</number>
+   </property>
+   <widget class="QWidget" name="AxisTab">
+    <attribute name="title">
+     <string extracomment="轴页面">Axis Tab</string>
+    </attribute>
+    <widget class="QTreeView" name="axisListTree">
+     <property name="geometry">
+      <rect>
+       <x>0</x>
+       <y>0</y>
+       <width>475</width>
+       <height>1071</height>
+      </rect>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="operAxisPage">
+    <attribute name="title">
+     <string extracomment="操作轴页面">Operation axis page</string>
+    </attribute>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>80</y>
+       <width>441</width>
+       <height>391</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <pointsize>12</pointsize>
+      </font>
+     </property>
+     <property name="title">
+      <string extracomment="X轴"/>
+     </property>
+     <widget class="QWidget" name="layoutWidget">
+      <property name="geometry">
+       <rect>
+        <x>250</x>
+        <y>10</y>
+        <width>181</width>
+        <height>51</height>
+       </rect>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout_3">
+       <item>
+        <widget class="QLabel" name="label_6">
+         <property name="font">
+          <font>
+           <pointsize>12</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string extracomment="当前位置">Position</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="xPositionLineEdit">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+         <property name="font">
+          <font>
+           <pointsize>12</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string>0</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>86</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="layoutWidget">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>10</y>
+        <width>221</width>
+        <height>51</height>
+       </rect>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout_5">
+       <item>
+        <widget class="QRadioButton" name="xAxisEnabledRadioBut">
+         <property name="font">
+          <font>
+           <pointsize>12</pointsize>
+          </font>
+         </property>
+         <property name="styleSheet">
+          <string notr="true"/>
+         </property>
+         <property name="text">
+          <string extracomment="使能">Enabled</string>
+         </property>
+         <property name="autoExclusive">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QRadioButton" name="xAxisSatausOkRadioBut">
+         <property name="font">
+          <font>
+           <pointsize>12</pointsize>
+          </font>
+         </property>
+         <property name="text">
+          <string extracomment="状态OK">Status OK</string>
+         </property>
+         <property name="autoExclusive">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="layoutWidget">
+      <property name="geometry">
+       <rect>
+        <x>20</x>
+        <y>270</y>
+        <width>401</width>
+        <height>51</height>
+       </rect>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout_4">
+       <item>
+        <widget class="QPushButton" name="xAxisDisable">
+         <property name="font">
+          <font>
+           <pointsize>12</pointsize>
+          </font>
+         </property>
+         <property name="styleSheet">
+          <string notr="true">background-color: rgb(203,208,255);</string>
+         </property>
+         <property name="text">
+          <string extracomment="关使能">Disable</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="xAxisHomeBut">
+         <property name="font">
+          <font>
+           <pointsize>12</pointsize>
+          </font>
+         </property>
+         <property name="styleSheet">
+          <string notr="true">background-color: rgb(203,208,255);</string>
+         </property>
+         <property name="text">
+          <string extracomment="回零">Home</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>70</y>
+        <width>311</width>
+        <height>81</height>
+       </rect>
+      </property>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <layout class="QHBoxLayout" name="horizontalLayout_2">
+         <item>
+          <widget class="QLabel" name="label">
+           <property name="minimumSize">
+            <size>
+             <width>80</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string extracomment="轴负软限位">Axis Neg</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLineEdit" name="negLineEdit">
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="setNegBut">
+           <property name="text">
+            <string>Set</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item row="1" column="0">
+        <layout class="QHBoxLayout" name="horizontalLayout_6">
+         <item>
+          <widget class="QLabel" name="label_3">
+           <property name="minimumSize">
+            <size>
+             <width>80</width>
+             <height>0</height>
+            </size>
+           </property>
+           <property name="text">
+            <string extracomment="轴正软限位">Axis Pos</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLineEdit" name="posLineEdit">
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="setPosBut">
+           <property name="text">
+            <string>Set</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>170</y>
+        <width>311</width>
+        <height>41</height>
+       </rect>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout_7">
+       <item>
+        <widget class="QLabel" name="label_4">
+         <property name="text">
+          <string>Set Speed</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="speedLineEdit">
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="setSpeedBut">
+         <property name="text">
+          <string>Set</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+    <widget class="QWidget" name="layoutWidget">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>401</width>
+       <height>61</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QLabel" name="label_2">
+        <property name="font">
+         <font>
+          <family>Agency FB</family>
+          <pointsize>16</pointsize>
+         </font>
+        </property>
+        <property name="text">
+         <string extracomment="当前轴名称:">Current axis name:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLabel" name="titleLable">
+        <property name="font">
+         <font>
+          <family>Agency FB</family>
+          <pointsize>16</pointsize>
+         </font>
+        </property>
+        <property name="text">
+         <string>xx</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QPushButton" name="retBut">
+   <property name="geometry">
+    <rect>
+     <x>366</x>
+     <y>20</y>
+     <width>111</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">background-color: rgb(203,208,255);</string>
+   </property>
+   <property name="text">
+    <string extracomment="返回选择所有轴">Ret All Axis</string>
+   </property>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>

+ 1 - 0
View/die-bonder-ui/Src/ProgrammPage.cpp

@@ -17,6 +17,7 @@ ProgrammPage::~ProgrammPage()
 
 void ProgrammPage::initPage()
 {
+	this->setAttribute(Qt::WA_DeleteOnClose);
 	m_BondMatrixProgramPage = new BondMatrixProgramPage(this);
 	m_pWaffleProgrammPage = new WaffleProgramPage(this);
 	m_WaferProgramPage = new WaferProgramPage(this);