Bladeren bron

bug修复

WIN-GH9CEESPLTB\Administrator 1 maand geleden
bovenliggende
commit
7a02efa8ef

+ 4 - 4
MainForm/ClassFile/Inovance_EIP.cs

@@ -225,10 +225,10 @@ namespace EIP_Protocol
     public struct OP30_OtherData
     {
         [MarshalAs(UnmanagedType.I4)]
-        public int ChangeA;                              //左工位 0:取消换胶 1:换胶弹窗  2:扫码完成
+        public int ChangeA;                              //0:取消换胶 1:换胶弹窗  2:扫码完成
 
         [MarshalAs(UnmanagedType.I4)]
-        public int ChangeB;                             //右工位 0:取消换胶 1:换胶弹窗  2:扫码完成
+        public int ChangeB;                             //0:取消换胶 1:换胶弹窗  2:扫码完成
 
     }
 
@@ -364,10 +364,10 @@ namespace EIP_Protocol
     public struct OP70_OtherData
     {
         [MarshalAs(UnmanagedType.I4)]
-        public int ChangeA;                              //左工位 0:取消换螺丝 1:换胶弹窗  2:扫码完成
+        public int ChangeA;                              //0:取消换螺丝 1:换胶弹窗  2:扫码完成
 
         [MarshalAs(UnmanagedType.I4)]
-        public int ChangeB;                             //右工位 0:取消换螺丝 1:换胶弹窗  2:扫码完成
+        public int ChangeB;                             //0:取消换螺丝 1:换胶弹窗  2:扫码完成
 
     }
 

+ 3 - 1
MainForm/ClassFile/XiaomiAPI_IOT/Extend/XiaomiMqttClient_StationInputBegin.cs

@@ -62,7 +62,9 @@ namespace MainForm.ClassFile.XiaomiAPI
             else
                 resultStr = XiaomiMqttResponse_ErrCode.ERR_UNKOWN.ToString();
             string logPath = GlobalContext.MqttInputBeginDir + "beatType" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
-            File.WriteAllText(logPath, "\r\n" + DateTime.Now + "===>MQTT【节拍日志】提交:" + msg + "\r\n==>提交结果:" + resultStr + "");
+            //File.WriteAllText(logPath, "\r\n" + DateTime.Now + "===>MQTT【节拍日志】提交:" + msg + "\r\n==>提交结果:" + resultStr + "");
+            FileOperate.NewTxtFile(logPath, DateTime.Now + "===>MQTT【节拍日志】提交:" + msg + "\r\n==>提交结果:" + resultStr + "");
+
             return (result, resultStr);
         }
 

+ 3 - 1
MainForm/ClassFile/XiaomiAPI_MES/XiaomiMESEnum_ProcessData.cs

@@ -37,7 +37,9 @@ namespace MainForm.ClassFile.XiaomiAPI
             [Description("抛料次数")]
             nThrowCount,
             [Description("上盖余料数")]
-            nRemainCount
+            nRemainCount,
+            [Description("测距")]
+            nCeJuData
         }
 
         /// <summary>

File diff suppressed because it is too large
+ 525 - 537
MainForm/FaForm/Form_Home.cs


+ 45 - 45
MainForm/FaForm/Form_SystemSet.Designer.cs

@@ -106,11 +106,11 @@
             this.rdbS6 = new System.Windows.Forms.RadioButton();
             this.txtPLCAddress6 = new System.Windows.Forms.TextBox();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
-            this.checkBox4 = new System.Windows.Forms.CheckBox();
-            this.checkBox2 = new System.Windows.Forms.CheckBox();
-            this.textBox1 = new System.Windows.Forms.TextBox();
+            this.chkIsClearMes = new System.Windows.Forms.CheckBox();
+            this.chkIsClearIot = new System.Windows.Forms.CheckBox();
+            this.txtClearDay = new System.Windows.Forms.TextBox();
             this.label16 = new System.Windows.Forms.Label();
-            this.checkBox1 = new System.Windows.Forms.CheckBox();
+            this.chkIsClearLog = new System.Windows.Forms.CheckBox();
             this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
             this.label17 = new System.Windows.Forms.Label();
             this.txtStation2 = new System.Windows.Forms.TextBox();
@@ -1029,11 +1029,11 @@
             // 
             // groupBox6
             // 
-            this.groupBox6.Controls.Add(this.checkBox4);
-            this.groupBox6.Controls.Add(this.checkBox2);
-            this.groupBox6.Controls.Add(this.textBox1);
+            this.groupBox6.Controls.Add(this.chkIsClearMes);
+            this.groupBox6.Controls.Add(this.chkIsClearIot);
+            this.groupBox6.Controls.Add(this.txtClearDay);
             this.groupBox6.Controls.Add(this.label16);
-            this.groupBox6.Controls.Add(this.checkBox1);
+            this.groupBox6.Controls.Add(this.chkIsClearLog);
             this.groupBox6.Font = new System.Drawing.Font("微软雅黑", 10.8F);
             this.groupBox6.Location = new System.Drawing.Point(0, 797);
             this.groupBox6.Name = "groupBox6";
@@ -1042,35 +1042,35 @@
             this.groupBox6.TabStop = false;
             this.groupBox6.Text = "日志清理";
             // 
-            // checkBox4
+            // chkIsClearMes
             // 
-            this.checkBox4.AutoSize = true;
-            this.checkBox4.Location = new System.Drawing.Point(664, 36);
-            this.checkBox4.Margin = new System.Windows.Forms.Padding(4);
-            this.checkBox4.Name = "checkBox4";
-            this.checkBox4.Size = new System.Drawing.Size(174, 34);
-            this.checkBox4.TabIndex = 93;
-            this.checkBox4.Text = "MES过站日志";
-            this.checkBox4.UseVisualStyleBackColor = true;
+            this.chkIsClearMes.AutoSize = true;
+            this.chkIsClearMes.Location = new System.Drawing.Point(664, 36);
+            this.chkIsClearMes.Margin = new System.Windows.Forms.Padding(4);
+            this.chkIsClearMes.Name = "chkIsClearMes";
+            this.chkIsClearMes.Size = new System.Drawing.Size(174, 34);
+            this.chkIsClearMes.TabIndex = 93;
+            this.chkIsClearMes.Text = "MES过站日志";
+            this.chkIsClearMes.UseVisualStyleBackColor = true;
             // 
-            // checkBox2
+            // chkIsClearIot
             // 
-            this.checkBox2.AutoSize = true;
-            this.checkBox2.Location = new System.Drawing.Point(883, 36);
-            this.checkBox2.Margin = new System.Windows.Forms.Padding(4);
-            this.checkBox2.Name = "checkBox2";
-            this.checkBox2.Size = new System.Drawing.Size(164, 34);
-            this.checkBox2.TabIndex = 91;
-            this.checkBox2.Text = "IOT上传日志";
-            this.checkBox2.UseVisualStyleBackColor = true;
+            this.chkIsClearIot.AutoSize = true;
+            this.chkIsClearIot.Location = new System.Drawing.Point(883, 36);
+            this.chkIsClearIot.Margin = new System.Windows.Forms.Padding(4);
+            this.chkIsClearIot.Name = "chkIsClearIot";
+            this.chkIsClearIot.Size = new System.Drawing.Size(164, 34);
+            this.chkIsClearIot.TabIndex = 91;
+            this.chkIsClearIot.Text = "IOT上传日志";
+            this.chkIsClearIot.UseVisualStyleBackColor = true;
             // 
-            // textBox1
+            // txtClearDay
             // 
-            this.textBox1.Location = new System.Drawing.Point(288, 34);
-            this.textBox1.Margin = new System.Windows.Forms.Padding(4);
-            this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(320, 36);
-            this.textBox1.TabIndex = 89;
+            this.txtClearDay.Location = new System.Drawing.Point(288, 34);
+            this.txtClearDay.Margin = new System.Windows.Forms.Padding(4);
+            this.txtClearDay.Name = "txtClearDay";
+            this.txtClearDay.Size = new System.Drawing.Size(320, 36);
+            this.txtClearDay.TabIndex = 89;
             // 
             // label16
             // 
@@ -1082,16 +1082,16 @@
             this.label16.TabIndex = 90;
             this.label16.Text = "日志保存天数:";
             // 
-            // checkBox1
+            // chkIsClearLog
             // 
-            this.checkBox1.AutoSize = true;
-            this.checkBox1.Location = new System.Drawing.Point(32, 36);
-            this.checkBox1.Margin = new System.Windows.Forms.Padding(4);
-            this.checkBox1.Name = "checkBox1";
-            this.checkBox1.Size = new System.Drawing.Size(83, 34);
-            this.checkBox1.TabIndex = 89;
-            this.checkBox1.Text = "启用";
-            this.checkBox1.UseVisualStyleBackColor = true;
+            this.chkIsClearLog.AutoSize = true;
+            this.chkIsClearLog.Location = new System.Drawing.Point(32, 36);
+            this.chkIsClearLog.Margin = new System.Windows.Forms.Padding(4);
+            this.chkIsClearLog.Name = "chkIsClearLog";
+            this.chkIsClearLog.Size = new System.Drawing.Size(83, 34);
+            this.chkIsClearLog.TabIndex = 89;
+            this.chkIsClearLog.Text = "启用";
+            this.chkIsClearLog.UseVisualStyleBackColor = true;
             // 
             // label17
             // 
@@ -1265,11 +1265,11 @@
         private System.Windows.Forms.CheckBox chkMqttPassResult;
         private System.Windows.Forms.CheckBox chkMqttUpFile;
         private System.Windows.Forms.GroupBox groupBox6;
-        private System.Windows.Forms.CheckBox checkBox4;
-        private System.Windows.Forms.CheckBox checkBox2;
-        private System.Windows.Forms.TextBox textBox1;
+        private System.Windows.Forms.CheckBox chkIsClearMes;
+        private System.Windows.Forms.CheckBox chkIsClearIot;
+        private System.Windows.Forms.TextBox txtClearDay;
         private System.Windows.Forms.Label label16;
-        private System.Windows.Forms.CheckBox checkBox1;
+        private System.Windows.Forms.CheckBox chkIsClearLog;
         private System.ComponentModel.BackgroundWorker backgroundWorker1;
         private System.Windows.Forms.Label label17;
         private System.Windows.Forms.TextBox txtStation2;

+ 7 - 0
MainForm/FaForm/Form_SystemSet.cs

@@ -69,6 +69,13 @@ namespace MainForm
             txtPLCAddress8.Text = IniFile.INIGetStringValue(FilePath, "Machine", "Machine8Address", GlobalContext.ConstMachine8Address);
             txtPLCAddress9.Text = IniFile.INIGetStringValue(FilePath, "Machine", "Machine9Address", GlobalContext.ConstMachine9Address);
 
+            //日志配置
+            txtClearDay.Text = IniFile.INIGetStringValue(FilePath, "Machine", "ClearLogDays", "");  //清理日志天数
+            chkIsClearLog.Checked = bool.Parse(IniFile.INIGetStringValue(FilePath, "Machine", "IsClearLog", "False"));  // 是否 启用AGV            chkIsClearLog.Checked = bool.Parse(IniFile.INIGetStringValue(FilePath, "Machine", "IsClearLog", "False"));  // 是否 启用AGV
+            chkIsClearMes.Checked = bool.Parse(IniFile.INIGetStringValue(FilePath, "Machine", "ClearMes", "False"));  // 是否 启用AGV
+            chkIsClearIot.Checked = bool.Parse(IniFile.INIGetStringValue(FilePath, "Machine", "ClearIot", "False"));  // 是否 启用AGV
+
+
             numPLCPort.Value = int.Parse(IniFile.INIGetStringValue(FilePath, "Machine", "MachinePort", "0"));
 
             // 机器IP配置