From 6737c147d86092375c7f3279d767c18dc7aba821 Mon Sep 17 00:00:00 2001 From: lhiven Date: Tue, 16 Jul 2024 17:19:45 +0800 Subject: [PATCH] =?UTF-8?q?1=20=E4=BC=98=E5=8C=96=E6=B0=94=E6=B5=AE=202=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96Z=E8=BD=B4=E5=8E=9F=E7=82=B9=E5=92=8C?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.ThreeTemprature/Commom/Ops.cs | 4 +- Rs.ThreeTemprature/Commom/QifuManager.cs | 2 +- .../Entitys/Trays/TurnoverTrayManager.cs | 4 +- .../Flow/NormalFlow/TurnoverFlow.cs | 20 +++--- Rs.ThreeTemprature/Flow/SafeControl.cs | 14 +--- Rs.ThreeTemprature/FormMain.designer.cs | 64 +++++++++---------- Rs.ThreeTemprature/FormMain.resx | 6 -- 7 files changed, 50 insertions(+), 64 deletions(-) diff --git a/Rs.ThreeTemprature/Commom/Ops.cs b/Rs.ThreeTemprature/Commom/Ops.cs index e337386..1f065bd 100644 --- a/Rs.ThreeTemprature/Commom/Ops.cs +++ b/Rs.ThreeTemprature/Commom/Ops.cs @@ -129,8 +129,8 @@ namespace Rs.MotionPlat.Commom { Msg.ShowError("laser connect fail!"); } - //QifuManager.Instance.Init(); - //QifuManager.Instance.Write(SysConfigParam.GetValue("QifuValue")); + QifuManager.Instance.Init(); + QifuManager.Instance.Write(SysConfigParam.GetValue("QifuValue")); LightManger.Instance.SetStatus(ELightStatus.YellowBlink); Off("启动灯"); Off("停止灯"); diff --git a/Rs.ThreeTemprature/Commom/QifuManager.cs b/Rs.ThreeTemprature/Commom/QifuManager.cs index 70d1edc..96c8e71 100644 --- a/Rs.ThreeTemprature/Commom/QifuManager.cs +++ b/Rs.ThreeTemprature/Commom/QifuManager.cs @@ -10,7 +10,7 @@ namespace Rs.MotionPlat.Commom { public class QifuManager { - public ModbusTcp modbusLeft = new ModbusTcp("192.168.1.22", 502); + public ModbusTcp modbusLeft = new ModbusTcp("192.168.10.22", 502); private static QifuManager instance; public static QifuManager Instance diff --git a/Rs.ThreeTemprature/Entitys/Trays/TurnoverTrayManager.cs b/Rs.ThreeTemprature/Entitys/Trays/TurnoverTrayManager.cs index c80164b..ead329b 100644 --- a/Rs.ThreeTemprature/Entitys/Trays/TurnoverTrayManager.cs +++ b/Rs.ThreeTemprature/Entitys/Trays/TurnoverTrayManager.cs @@ -63,11 +63,11 @@ namespace Rs.MotionPlat.Entitys.Trays } private TurnoverTrayManager() { - slots = new TurnoverTraySlot[32]; + slots = new TurnoverTraySlot[16]; int index = 0; for(int row=1;row<=4;row++) { - for(int col=1;col<=8;col++) + for(int col=1;col<=4;col++) { slots[index] = new TurnoverTraySlot() { diff --git a/Rs.ThreeTemprature/Flow/NormalFlow/TurnoverFlow.cs b/Rs.ThreeTemprature/Flow/NormalFlow/TurnoverFlow.cs index 6af9335..ae1e807 100644 --- a/Rs.ThreeTemprature/Flow/NormalFlow/TurnoverFlow.cs +++ b/Rs.ThreeTemprature/Flow/NormalFlow/TurnoverFlow.cs @@ -339,13 +339,7 @@ namespace Rs.MotionPlat.Flow errCode = AxisControl.TurnoverZ.MovePos(targetTurnoverZ, GlobalVar.WholeSpeed); if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis) { - undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal); - /*提前打开周转吸嘴真空吸*/ - VacManager.TransitNozzleVacSuction(EVacOperator.Open, false,undealTasks.Select(t => t.ToIndex + 1).ToArray()); - if (GlobalVar.VirtualAxis) - { - Thread.Sleep(GlobalVar.VirtualAxisMoveTime); - } + logInfo = GetClassName() + $"到周转盘下方取料位1,tz:{targetTurnoverZ}"; MessageQueue.Instance.Insert(logInfo); Step = ETurnoverFlowStep.等待运动到周转盘下方取料位1; @@ -411,10 +405,18 @@ namespace Rs.MotionPlat.Flow logInfo = GetClassName() + $"已运动到周转盘下方取料位2 TurnoverZ at:{Ops.GetCurPosition(AxisAlias.TurnoverZ)}"; MessageQueue.Instance.Insert(logInfo); undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal); + /*提前打开周转吸嘴真空吸*/ + VacManager.TransitNozzleVacSuction(EVacOperator.Open, true, undealTasks.Select(t => t.ToIndex + 1).ToArray()); + if (GlobalVar.VirtualAxis) + { + Thread.Sleep(GlobalVar.VirtualAxisMoveTime); + } + + /*关闭周转盘真空吸*/ - VacManager.TurnoverTrayVacSuction(EVacOperator.Close, true, undealTasks.Select(t => t.FromIndex + 1).ToArray()); + //VacManager.TurnoverTrayVacSuction(EVacOperator.Close, true, undealTasks.Select(t => t.FromIndex + 1).ToArray()); /*打开周转盘真空破*/ - VacManager.TurnoverTrayVacBreak(EVacOperator.Open, true, undealTasks.Select(t => t.FromIndex + 1).ToArray()); + //VacManager.TurnoverTrayVacBreak(EVacOperator.Open, true, undealTasks.Select(t => t.FromIndex + 1).ToArray()); Step = ETurnoverFlowStep.到周转盘取料破真空位; } else diff --git a/Rs.ThreeTemprature/Flow/SafeControl.cs b/Rs.ThreeTemprature/Flow/SafeControl.cs index c652ccd..6bcb8d8 100644 --- a/Rs.ThreeTemprature/Flow/SafeControl.cs +++ b/Rs.ThreeTemprature/Flow/SafeControl.cs @@ -54,12 +54,7 @@ namespace Rs.MotionPlat.Flow if(SysConfigParam.GetValue("CheckSafeEnable")) { bool bOnOrg = false; - if (!Ops.IsOn("上下气缸原位")) - { - MessageQueue.Instance.Warn("上下气缸原位 off"); - return false; - } - for (int i = 1; i < 9; i++) + for (int i = 1; i < 3; i++) { AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg); if (!bOnOrg) @@ -78,12 +73,7 @@ namespace Rs.MotionPlat.Flow if (SysConfigParam.GetValue("CheckSafeEnable")) { bool bOnOrg = false; - if (!Ops.IsOn("上下气缸原位")) - { - MessageQueue.Instance.Warn("上下气缸原位 off"); - return false; - } - for (int i = 1; i < 9; i ++) + for (int i = 1; i < 3; i ++) { AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg); if (!bOnOrg) diff --git a/Rs.ThreeTemprature/FormMain.designer.cs b/Rs.ThreeTemprature/FormMain.designer.cs index a1db5ce..1c2f7bd 100644 --- a/Rs.ThreeTemprature/FormMain.designer.cs +++ b/Rs.ThreeTemprature/FormMain.designer.cs @@ -32,8 +32,8 @@ namespace Rs.MotionPlat private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.panel1 = new System.Windows.Forms.Panel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); @@ -268,14 +268,14 @@ namespace Rs.MotionPlat this.dgv_errinfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgv_errinfo.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText; this.dgv_errinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.Red; - dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.Red; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dgv_errinfo.ColumnHeadersHeight = 30; this.dgv_errinfo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, @@ -353,8 +353,8 @@ namespace Rs.MotionPlat // Time // this.Time.DataPropertyName = "Time"; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.Red; - this.Time.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.Red; + this.Time.DefaultCellStyle = dataGridViewCellStyle2; this.Time.FillWeight = 25F; this.Time.HeaderText = "Time"; this.Time.MinimumWidth = 6; @@ -667,10 +667,10 @@ namespace Rs.MotionPlat this.trayInput1.OffsetX = 0F; this.trayInput1.OffsetY = 0F; this.trayInput1.OffsetYEven = 0F; - this.trayInput1.RowNum = 26; + this.trayInput1.RowNum = 25; this.trayInput1.RowSpace = 3; this.trayInput1.SelectSlot = null; - this.trayInput1.ShowStatus = true; + this.trayInput1.ShowStatus = false; this.trayInput1.ShowText = false; this.trayInput1.SinglePoint = false; this.trayInput1.Size = new System.Drawing.Size(196, 410); @@ -722,10 +722,10 @@ namespace Rs.MotionPlat this.trayInput2.OffsetX = 0F; this.trayInput2.OffsetY = 0F; this.trayInput2.OffsetYEven = 0F; - this.trayInput2.RowNum = 26; + this.trayInput2.RowNum = 25; this.trayInput2.RowSpace = 3; this.trayInput2.SelectSlot = null; - this.trayInput2.ShowStatus = true; + this.trayInput2.ShowStatus = false; this.trayInput2.ShowText = false; this.trayInput2.SinglePoint = false; this.trayInput2.Size = new System.Drawing.Size(196, 410); @@ -751,10 +751,10 @@ namespace Rs.MotionPlat this.trayInput3.OffsetX = 0F; this.trayInput3.OffsetY = 0F; this.trayInput3.OffsetYEven = 0F; - this.trayInput3.RowNum = 26; + this.trayInput3.RowNum = 25; this.trayInput3.RowSpace = 3; this.trayInput3.SelectSlot = null; - this.trayInput3.ShowStatus = true; + this.trayInput3.ShowStatus = false; this.trayInput3.ShowText = false; this.trayInput3.SinglePoint = false; this.trayInput3.Size = new System.Drawing.Size(196, 410); @@ -780,10 +780,10 @@ namespace Rs.MotionPlat this.trayReject.OffsetX = 0F; this.trayReject.OffsetY = 0F; this.trayReject.OffsetYEven = 0F; - this.trayReject.RowNum = 26; + this.trayReject.RowNum = 25; this.trayReject.RowSpace = 3; this.trayReject.SelectSlot = null; - this.trayReject.ShowStatus = true; + this.trayReject.ShowStatus = false; this.trayReject.ShowText = false; this.trayReject.SinglePoint = false; this.trayReject.Size = new System.Drawing.Size(198, 410); @@ -838,7 +838,7 @@ namespace Rs.MotionPlat // this.trayTest.CanDraw = true; this.trayTest.ColSpace = 5; - this.trayTest.ColumnNum = 8; + this.trayTest.ColumnNum = 4; this.trayTest.Dock = System.Windows.Forms.DockStyle.Fill; this.trayTest.HeadText = "Socket"; this.trayTest.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave; @@ -867,7 +867,7 @@ namespace Rs.MotionPlat // this.trayTurnoverNozzle.CanDraw = true; this.trayTurnoverNozzle.ColSpace = 5; - this.trayTurnoverNozzle.ColumnNum = 8; + this.trayTurnoverNozzle.ColumnNum = 4; this.trayTurnoverNozzle.Dock = System.Windows.Forms.DockStyle.Fill; this.trayTurnoverNozzle.HeadText = "TurnoverNozzle"; this.trayTurnoverNozzle.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave; @@ -896,7 +896,7 @@ namespace Rs.MotionPlat // this.trayTurnover.CanDraw = true; this.trayTurnover.ColSpace = 5; - this.trayTurnover.ColumnNum = 8; + this.trayTurnover.ColumnNum = 4; this.tableLayoutPanel6.SetColumnSpan(this.trayTurnover, 2); this.trayTurnover.Dock = System.Windows.Forms.DockStyle.Fill; this.trayTurnover.HeadText = "TurnoverTray"; @@ -926,7 +926,7 @@ namespace Rs.MotionPlat // this.trayDischargeNozzle.CanDraw = true; this.trayDischargeNozzle.ColSpace = 10; - this.trayDischargeNozzle.ColumnNum = 8; + this.trayDischargeNozzle.ColumnNum = 2; this.trayDischargeNozzle.Dock = System.Windows.Forms.DockStyle.Fill; this.trayDischargeNozzle.HeadText = "DischargeNozzle"; this.trayDischargeNozzle.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave; @@ -981,11 +981,11 @@ namespace Rs.MotionPlat this.trayGood1.OffsetX = 0F; this.trayGood1.OffsetY = 0F; this.trayGood1.OffsetYEven = 0F; - this.trayGood1.RowNum = 26; + this.trayGood1.RowNum = 25; this.trayGood1.RowSpace = 3; this.tableLayoutPanel8.SetRowSpan(this.trayGood1, 2); this.trayGood1.SelectSlot = null; - this.trayGood1.ShowStatus = true; + this.trayGood1.ShowStatus = false; this.trayGood1.ShowText = false; this.trayGood1.SinglePoint = false; this.trayGood1.Size = new System.Drawing.Size(190, 404); @@ -1024,11 +1024,11 @@ namespace Rs.MotionPlat this.trayMulti.OffsetX = 0F; this.trayMulti.OffsetY = 0F; this.trayMulti.OffsetYEven = 0F; - this.trayMulti.RowNum = 26; + this.trayMulti.RowNum = 25; this.trayMulti.RowSpace = 3; this.tableLayoutPanel9.SetRowSpan(this.trayMulti, 2); this.trayMulti.SelectSlot = null; - this.trayMulti.ShowStatus = true; + this.trayMulti.ShowStatus = false; this.trayMulti.ShowText = false; this.trayMulti.SinglePoint = false; this.trayMulti.Size = new System.Drawing.Size(190, 404); @@ -1067,11 +1067,11 @@ namespace Rs.MotionPlat this.trayGood2.OffsetX = 0F; this.trayGood2.OffsetY = 0F; this.trayGood2.OffsetYEven = 0F; - this.trayGood2.RowNum = 26; + this.trayGood2.RowNum = 25; this.trayGood2.RowSpace = 3; this.tableLayoutPanel10.SetRowSpan(this.trayGood2, 2); this.trayGood2.SelectSlot = null; - this.trayGood2.ShowStatus = true; + this.trayGood2.ShowStatus = false; this.trayGood2.ShowText = false; this.trayGood2.SinglePoint = false; this.trayGood2.Size = new System.Drawing.Size(190, 404); @@ -1110,11 +1110,11 @@ namespace Rs.MotionPlat this.trayGood3.OffsetX = 0F; this.trayGood3.OffsetY = 0F; this.trayGood3.OffsetYEven = 0F; - this.trayGood3.RowNum = 26; + this.trayGood3.RowNum = 25; this.trayGood3.RowSpace = 3; this.tableLayoutPanel11.SetRowSpan(this.trayGood3, 2); this.trayGood3.SelectSlot = null; - this.trayGood3.ShowStatus = true; + this.trayGood3.ShowStatus = false; this.trayGood3.ShowText = false; this.trayGood3.SinglePoint = false; this.trayGood3.Size = new System.Drawing.Size(192, 404); diff --git a/Rs.ThreeTemprature/FormMain.resx b/Rs.ThreeTemprature/FormMain.resx index 3ebdccf..5c02318 100644 --- a/Rs.ThreeTemprature/FormMain.resx +++ b/Rs.ThreeTemprature/FormMain.resx @@ -132,10 +132,4 @@ True - - True - - - True - \ No newline at end of file