Преглед изворни кода

压机读取信号始终反馈完成;

洺瑀 葛 пре 1 година
родитељ
комит
c77b84f574

BIN
SIMDP/SIMDP.Documents/0611MES--机器人工作站接口规范.xlsx


+ 2 - 4
SIMDP/SIMDP.Project/RWS/PLC1.cs

@@ -579,6 +579,8 @@ namespace SIMDP.Project
                 //  Read("辅助压机左侧NG", out bool bng);
                 Read("辅助压机左侧压装力", out float fforce);
                 Read("辅助压机左侧位移", out int ofdisplacement);
+
+                Write("辅助压机左侧读取请求处理完成", true);
                 float fdisplacement = ofdisplacement / 10000.0f;
 
                 LogHelper.log.Debug($"{plcname}:{serialNum}");
@@ -602,8 +604,6 @@ namespace SIMDP.Project
                     Write("上位机报警", 12);
                     Tool.LogAndNotice($"{plcname}数据存储异常", 3, $"已强制反馈PLC");
                 }
-                //3 反馈完成
-                Write("辅助压机左侧读取请求处理完成", true);
             }
             catch (Exception ex)
             {
@@ -611,8 +611,6 @@ namespace SIMDP.Project
                 //报警信号!
                 Write("上位机报警", 12);
                 Tool.LogAndNotice($"{plcname}数据存储异常", 3, $"已强制反馈PLC");
-
-                Write("辅助压机左侧读取请求处理完成", true);
             }
         }
 

+ 2 - 5
SIMDP/SIMDP.Project/RWS/PLC3.cs

@@ -436,6 +436,8 @@ namespace SIMDP.Project
                 Read("辅助压机NG", out bool bng);
                 Read("辅助压机压装力", out float fforce);
                 Read("辅助压机位移", out int ofdisplacement);
+
+                Write("辅助压机读取请求处理完成", true);
                 float fdisplacement = ofdisplacement / 10000.0f;
 
                 //2 数据绑定:根据流水号查找本地生产数据表
@@ -457,8 +459,6 @@ namespace SIMDP.Project
                     //报警信号!
                     Write("上位机报警", 12);
                 }
-                //3 反馈完成
-                Write("辅助压机读取请求处理完成", true);
             }
             catch (Exception ex)
             {
@@ -466,10 +466,7 @@ namespace SIMDP.Project
                 //报警信号!
                 Write("上位机报警", 12);
                 Tool.LogAndNotice($"{plcname}数据存储异常", 3, $"已强制反馈PLC");
-
-                Write("辅助压机读取请求处理完成", true);
             }
-          
         }
 
         #endregion

+ 7 - 9
SIMDP/SIMDP.Project/RWS/PLC4.cs

@@ -341,7 +341,7 @@ namespace SIMDP.Project
 
                     if (!bSendWMS)
                     {
-                       // LogHelper.log.Error($"PLC4 L型工装下料请求(): 导入WMS库存失败,返回6!");
+                        // LogHelper.log.Error($"PLC4 L型工装下料请求(): 导入WMS库存失败,返回6!");
                         errorMsg = "False;信息导入WMS失败!请查看录入WMS结果";
                         return 6;
                     }
@@ -580,6 +580,7 @@ namespace SIMDP.Project
         }
 
         #endregion
+
         #region 信号函数
 
         public void 大托盘到位请求(object value)
@@ -608,7 +609,7 @@ namespace SIMDP.Project
                     return;
                 }
             }
-            catch 
+            catch
             {
                 Write("大托盘到位处理结果", 2);
                 Write("大托盘到位请求处理完成", true);
@@ -617,7 +618,7 @@ namespace SIMDP.Project
                 Write("上位机报警", 11);
                 return;
             }
-         
+
             //3 解析托盘号
             MoProductTask model = BLLFactory<BlProductTask>.Instance.LargeTrayArrive(sbarcode, line);
             if (model == null)
@@ -659,7 +660,7 @@ namespace SIMDP.Project
             {
                 LogHelper.log.Error($"PLC4 : 工单{model.WorkCode} 存储数据库异常:{ex.Message}");
             }
-          
+
             //6 反馈完成 更新task状态
             Write("大托盘到位请求处理完成", true);
             model.LargeState = 3;
@@ -722,6 +723,8 @@ namespace SIMDP.Project
                 Read("辅助压机NG", out bool bng);
                 Read("辅助压机压装力", out float fforce);
                 Read("辅助压机位移", out int ofdisplacement);
+
+                Write("辅助压机读取请求处理完成", true);
                 float fdisplacement = ofdisplacement / 10000.0f;
 
                 //2 数据绑定:根据流水号查找本地生产数据表
@@ -743,8 +746,6 @@ namespace SIMDP.Project
                     //报警信号!
                     Write("上位机报警", 12);
                 }
-                //3 反馈完成
-                Write("辅助压机读取请求处理完成", true);
             }
             catch (Exception ex)
             {
@@ -752,10 +753,7 @@ namespace SIMDP.Project
                 //报警信号!
                 Write("上位机报警", 12);
                 Tool.LogAndNotice($"{plcname}数据存储异常", 3, $"已强制反馈PLC");
-
-                Write("辅助压机读取请求处理完成", true);
             }
-         
         }
 
         #endregion

+ 1 - 1
SIMDP/SIMDP.Project/RWS/PLC5.cs

@@ -101,7 +101,7 @@ namespace SIMDP.Project
                 //4 延时执行改名操作
                 Task task = Task.Factory.StartNew(async () =>
                 {
-                    await Task.Delay(2000);
+                    await Task.Delay(1000);
 
                     bool bres = PressHelper.FindNewUpload(serialNum.ToString(), SysEnvironment.CSV_ExportPath, out string newfile);
                     if (bres)

+ 1 - 1
SIMDP/SIMDP.Project/RWS/PLC6.cs

@@ -107,7 +107,7 @@ namespace SIMDP.Project
                 //4 延时执行改名操作
                 Task task = Task.Factory.StartNew(async () =>
                 {
-                    await Task.Delay(2000);
+                    await Task.Delay(1000);
 
                     bool bres = PressHelper.FindNewUpload(serialNum.ToString(), SysEnvironment.CSV_ExportPath, out string newfile);
                     if (bres)

+ 1 - 1
SIMDP/SIMDP.Project/RWS/PLC7.cs

@@ -101,7 +101,7 @@ namespace SIMDP.Project
                 //4 延时执行改名操作
                 Task task = Task.Factory.StartNew(async () =>
                 {
-                    await Task.Delay(2000);
+                    await Task.Delay(1000);
 
                     bool bres = PressHelper.FindNewUpload(serialNum.ToString(), SysEnvironment.CSV_ExportPath, out string newfile);
                     if (bres)

+ 1 - 1
SIMDP/SIMDP.Project/RWS/PLC8.cs

@@ -101,7 +101,7 @@ namespace SIMDP.Project
                 //4 延时执行改名操作
                 Task task = Task.Factory.StartNew(async () =>
                 {
-                    await Task.Delay(2000);
+                    await Task.Delay(1000);
 
                     bool bres = PressHelper.FindNewUpload(serialNum.ToString(), SysEnvironment.CSV_ExportPath, out string newfile);
                     if (bres)

+ 11 - 11
SIMDP/SIMDP.View/FormProductTask.Designer.cs

@@ -88,7 +88,7 @@ namespace SIMDP
             this.label_PageInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.label_PageInfo.Location = new System.Drawing.Point(6, 709);
             this.label_PageInfo.Name = "label_PageInfo";
-            this.label_PageInfo.Size = new System.Drawing.Size(92, 18);
+            this.label_PageInfo.Size = new System.Drawing.Size(75, 14);
             this.label_PageInfo.TabIndex = 8;
             this.label_PageInfo.Text = "共 {0} 条记录";
             // 
@@ -539,7 +539,7 @@ namespace SIMDP
             this.lookUp_Line.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat;
             this.lookUp_Line.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.lookUp_Line.Size = new System.Drawing.Size(113, 26);
+            this.lookUp_Line.Size = new System.Drawing.Size(113, 22);
             this.lookUp_Line.TabIndex = 14;
             this.lookUp_Line.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Enter_KeyDown);
             // 
@@ -555,7 +555,7 @@ namespace SIMDP
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.dateEditStart.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.dateEditStart.Size = new System.Drawing.Size(113, 26);
+            this.dateEditStart.Size = new System.Drawing.Size(113, 22);
             this.dateEditStart.TabIndex = 1;
             this.dateEditStart.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Enter_KeyDown);
             // 
@@ -571,7 +571,7 @@ namespace SIMDP
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.dateEditEnd.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.dateEditEnd.Size = new System.Drawing.Size(113, 26);
+            this.dateEditEnd.Size = new System.Drawing.Size(113, 22);
             this.dateEditEnd.TabIndex = 5;
             this.dateEditEnd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Enter_KeyDown);
             // 
@@ -580,9 +580,9 @@ namespace SIMDP
             this.labelControl6.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.labelControl6.Appearance.Options.UseTextOptions = true;
             this.labelControl6.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
-            this.labelControl6.Location = new System.Drawing.Point(176, 6);
+            this.labelControl6.Location = new System.Drawing.Point(176, 8);
             this.labelControl6.Name = "labelControl6";
-            this.labelControl6.Size = new System.Drawing.Size(75, 18);
+            this.labelControl6.Size = new System.Drawing.Size(60, 14);
             this.labelControl6.TabIndex = 21;
             this.labelControl6.Text = "截止日期:";
             // 
@@ -591,9 +591,9 @@ namespace SIMDP
             this.labelControl5.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.labelControl5.Appearance.Options.UseTextOptions = true;
             this.labelControl5.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
-            this.labelControl5.Location = new System.Drawing.Point(3, 6);
+            this.labelControl5.Location = new System.Drawing.Point(3, 8);
             this.labelControl5.Name = "labelControl5";
-            this.labelControl5.Size = new System.Drawing.Size(75, 18);
+            this.labelControl5.Size = new System.Drawing.Size(60, 14);
             this.labelControl5.TabIndex = 21;
             this.labelControl5.Text = "起始日期:";
             // 
@@ -602,9 +602,9 @@ namespace SIMDP
             this.labelControl7.Anchor = System.Windows.Forms.AnchorStyles.Right;
             this.labelControl7.Appearance.Options.UseTextOptions = true;
             this.labelControl7.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
-            this.labelControl7.Location = new System.Drawing.Point(352, 6);
+            this.labelControl7.Location = new System.Drawing.Point(361, 8);
             this.labelControl7.Name = "labelControl7";
-            this.labelControl7.Size = new System.Drawing.Size(45, 18);
+            this.labelControl7.Size = new System.Drawing.Size(36, 14);
             this.labelControl7.TabIndex = 21;
             this.labelControl7.Text = "工位:";
             // 
@@ -665,7 +665,7 @@ namespace SIMDP
             // 
             // FormProductTask
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1364, 736);
             this.Controls.Add(this.panel1);