1 优化气浮

2 优化Z轴原点和安全检测
master
lhiven 11 months ago
parent 7739516e57
commit 6737c147d8

@ -129,8 +129,8 @@ namespace Rs.MotionPlat.Commom
{ {
Msg.ShowError("laser connect fail!"); Msg.ShowError("laser connect fail!");
} }
//QifuManager.Instance.Init(); QifuManager.Instance.Init();
//QifuManager.Instance.Write(SysConfigParam.GetValue<float>("QifuValue")); QifuManager.Instance.Write(SysConfigParam.GetValue<float>("QifuValue"));
LightManger.Instance.SetStatus(ELightStatus.YellowBlink); LightManger.Instance.SetStatus(ELightStatus.YellowBlink);
Off("启动灯"); Off("启动灯");
Off("停止灯"); Off("停止灯");

@ -10,7 +10,7 @@ namespace Rs.MotionPlat.Commom
{ {
public class QifuManager 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; private static QifuManager instance;
public static QifuManager Instance public static QifuManager Instance

@ -63,11 +63,11 @@ namespace Rs.MotionPlat.Entitys.Trays
} }
private TurnoverTrayManager() { private TurnoverTrayManager() {
slots = new TurnoverTraySlot[32]; slots = new TurnoverTraySlot[16];
int index = 0; int index = 0;
for(int row=1;row<=4;row++) 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() slots[index] = new TurnoverTraySlot()
{ {

@ -339,13 +339,7 @@ namespace Rs.MotionPlat.Flow
errCode = AxisControl.TurnoverZ.MovePos(targetTurnoverZ, GlobalVar.WholeSpeed); errCode = AxisControl.TurnoverZ.MovePos(targetTurnoverZ, GlobalVar.WholeSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis) 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}"; logInfo = GetClassName() + $"到周转盘下方取料位1,tz:{targetTurnoverZ}";
MessageQueue.Instance.Insert(logInfo); MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.1; Step = ETurnoverFlowStep.1;
@ -411,10 +405,18 @@ namespace Rs.MotionPlat.Flow
logInfo = GetClassName() + $"已运动到周转盘下方取料位2 TurnoverZ at:{Ops.GetCurPosition(AxisAlias.TurnoverZ)}"; logInfo = GetClassName() + $"已运动到周转盘下方取料位2 TurnoverZ at:{Ops.GetCurPosition(AxisAlias.TurnoverZ)}";
MessageQueue.Instance.Insert(logInfo); MessageQueue.Instance.Insert(logInfo);
undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal); 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.; Step = ETurnoverFlowStep.;
} }
else else

@ -54,12 +54,7 @@ namespace Rs.MotionPlat.Flow
if(SysConfigParam.GetValue<bool>("CheckSafeEnable")) if(SysConfigParam.GetValue<bool>("CheckSafeEnable"))
{ {
bool bOnOrg = false; bool bOnOrg = false;
if (!Ops.IsOn("上下气缸原位")) for (int i = 1; i < 3; i++)
{
MessageQueue.Instance.Warn("上下气缸原位 off");
return false;
}
for (int i = 1; i < 9; i++)
{ {
AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg); AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg);
if (!bOnOrg) if (!bOnOrg)
@ -78,12 +73,7 @@ namespace Rs.MotionPlat.Flow
if (SysConfigParam.GetValue<bool>("CheckSafeEnable")) if (SysConfigParam.GetValue<bool>("CheckSafeEnable"))
{ {
bool bOnOrg = false; bool bOnOrg = false;
if (!Ops.IsOn("上下气缸原位")) for (int i = 1; i < 3; i ++)
{
MessageQueue.Instance.Warn("上下气缸原位 off");
return false;
}
for (int i = 1; i < 9; i ++)
{ {
AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg); AxisControl.GetAxis($"NozzleZ{i}").GetOrgStatus(out bOnOrg);
if (!bOnOrg) if (!bOnOrg)

@ -32,8 +32,8 @@ namespace Rs.MotionPlat
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); 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.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgv_errinfo.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText; this.dgv_errinfo.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText;
this.dgv_errinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; this.dgv_errinfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.Red; dataGridViewCellStyle1.BackColor = System.Drawing.Color.Red;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.White; dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3; this.dgv_errinfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgv_errinfo.ColumnHeadersHeight = 30; this.dgv_errinfo.ColumnHeadersHeight = 30;
this.dgv_errinfo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgv_errinfo.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn1,
@ -353,8 +353,8 @@ namespace Rs.MotionPlat
// Time // Time
// //
this.Time.DataPropertyName = "Time"; this.Time.DataPropertyName = "Time";
dataGridViewCellStyle4.BackColor = System.Drawing.Color.Red; dataGridViewCellStyle2.BackColor = System.Drawing.Color.Red;
this.Time.DefaultCellStyle = dataGridViewCellStyle4; this.Time.DefaultCellStyle = dataGridViewCellStyle2;
this.Time.FillWeight = 25F; this.Time.FillWeight = 25F;
this.Time.HeaderText = "Time"; this.Time.HeaderText = "Time";
this.Time.MinimumWidth = 6; this.Time.MinimumWidth = 6;
@ -667,10 +667,10 @@ namespace Rs.MotionPlat
this.trayInput1.OffsetX = 0F; this.trayInput1.OffsetX = 0F;
this.trayInput1.OffsetY = 0F; this.trayInput1.OffsetY = 0F;
this.trayInput1.OffsetYEven = 0F; this.trayInput1.OffsetYEven = 0F;
this.trayInput1.RowNum = 26; this.trayInput1.RowNum = 25;
this.trayInput1.RowSpace = 3; this.trayInput1.RowSpace = 3;
this.trayInput1.SelectSlot = null; this.trayInput1.SelectSlot = null;
this.trayInput1.ShowStatus = true; this.trayInput1.ShowStatus = false;
this.trayInput1.ShowText = false; this.trayInput1.ShowText = false;
this.trayInput1.SinglePoint = false; this.trayInput1.SinglePoint = false;
this.trayInput1.Size = new System.Drawing.Size(196, 410); this.trayInput1.Size = new System.Drawing.Size(196, 410);
@ -722,10 +722,10 @@ namespace Rs.MotionPlat
this.trayInput2.OffsetX = 0F; this.trayInput2.OffsetX = 0F;
this.trayInput2.OffsetY = 0F; this.trayInput2.OffsetY = 0F;
this.trayInput2.OffsetYEven = 0F; this.trayInput2.OffsetYEven = 0F;
this.trayInput2.RowNum = 26; this.trayInput2.RowNum = 25;
this.trayInput2.RowSpace = 3; this.trayInput2.RowSpace = 3;
this.trayInput2.SelectSlot = null; this.trayInput2.SelectSlot = null;
this.trayInput2.ShowStatus = true; this.trayInput2.ShowStatus = false;
this.trayInput2.ShowText = false; this.trayInput2.ShowText = false;
this.trayInput2.SinglePoint = false; this.trayInput2.SinglePoint = false;
this.trayInput2.Size = new System.Drawing.Size(196, 410); this.trayInput2.Size = new System.Drawing.Size(196, 410);
@ -751,10 +751,10 @@ namespace Rs.MotionPlat
this.trayInput3.OffsetX = 0F; this.trayInput3.OffsetX = 0F;
this.trayInput3.OffsetY = 0F; this.trayInput3.OffsetY = 0F;
this.trayInput3.OffsetYEven = 0F; this.trayInput3.OffsetYEven = 0F;
this.trayInput3.RowNum = 26; this.trayInput3.RowNum = 25;
this.trayInput3.RowSpace = 3; this.trayInput3.RowSpace = 3;
this.trayInput3.SelectSlot = null; this.trayInput3.SelectSlot = null;
this.trayInput3.ShowStatus = true; this.trayInput3.ShowStatus = false;
this.trayInput3.ShowText = false; this.trayInput3.ShowText = false;
this.trayInput3.SinglePoint = false; this.trayInput3.SinglePoint = false;
this.trayInput3.Size = new System.Drawing.Size(196, 410); this.trayInput3.Size = new System.Drawing.Size(196, 410);
@ -780,10 +780,10 @@ namespace Rs.MotionPlat
this.trayReject.OffsetX = 0F; this.trayReject.OffsetX = 0F;
this.trayReject.OffsetY = 0F; this.trayReject.OffsetY = 0F;
this.trayReject.OffsetYEven = 0F; this.trayReject.OffsetYEven = 0F;
this.trayReject.RowNum = 26; this.trayReject.RowNum = 25;
this.trayReject.RowSpace = 3; this.trayReject.RowSpace = 3;
this.trayReject.SelectSlot = null; this.trayReject.SelectSlot = null;
this.trayReject.ShowStatus = true; this.trayReject.ShowStatus = false;
this.trayReject.ShowText = false; this.trayReject.ShowText = false;
this.trayReject.SinglePoint = false; this.trayReject.SinglePoint = false;
this.trayReject.Size = new System.Drawing.Size(198, 410); this.trayReject.Size = new System.Drawing.Size(198, 410);
@ -838,7 +838,7 @@ namespace Rs.MotionPlat
// //
this.trayTest.CanDraw = true; this.trayTest.CanDraw = true;
this.trayTest.ColSpace = 5; this.trayTest.ColSpace = 5;
this.trayTest.ColumnNum = 8; this.trayTest.ColumnNum = 4;
this.trayTest.Dock = System.Windows.Forms.DockStyle.Fill; this.trayTest.Dock = System.Windows.Forms.DockStyle.Fill;
this.trayTest.HeadText = "Socket"; this.trayTest.HeadText = "Socket";
this.trayTest.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave; this.trayTest.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave;
@ -867,7 +867,7 @@ namespace Rs.MotionPlat
// //
this.trayTurnoverNozzle.CanDraw = true; this.trayTurnoverNozzle.CanDraw = true;
this.trayTurnoverNozzle.ColSpace = 5; this.trayTurnoverNozzle.ColSpace = 5;
this.trayTurnoverNozzle.ColumnNum = 8; this.trayTurnoverNozzle.ColumnNum = 4;
this.trayTurnoverNozzle.Dock = System.Windows.Forms.DockStyle.Fill; this.trayTurnoverNozzle.Dock = System.Windows.Forms.DockStyle.Fill;
this.trayTurnoverNozzle.HeadText = "TurnoverNozzle"; this.trayTurnoverNozzle.HeadText = "TurnoverNozzle";
this.trayTurnoverNozzle.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave; this.trayTurnoverNozzle.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave;
@ -896,7 +896,7 @@ namespace Rs.MotionPlat
// //
this.trayTurnover.CanDraw = true; this.trayTurnover.CanDraw = true;
this.trayTurnover.ColSpace = 5; this.trayTurnover.ColSpace = 5;
this.trayTurnover.ColumnNum = 8; this.trayTurnover.ColumnNum = 4;
this.tableLayoutPanel6.SetColumnSpan(this.trayTurnover, 2); this.tableLayoutPanel6.SetColumnSpan(this.trayTurnover, 2);
this.trayTurnover.Dock = System.Windows.Forms.DockStyle.Fill; this.trayTurnover.Dock = System.Windows.Forms.DockStyle.Fill;
this.trayTurnover.HeadText = "TurnoverTray"; this.trayTurnover.HeadText = "TurnoverTray";
@ -926,7 +926,7 @@ namespace Rs.MotionPlat
// //
this.trayDischargeNozzle.CanDraw = true; this.trayDischargeNozzle.CanDraw = true;
this.trayDischargeNozzle.ColSpace = 10; this.trayDischargeNozzle.ColSpace = 10;
this.trayDischargeNozzle.ColumnNum = 8; this.trayDischargeNozzle.ColumnNum = 2;
this.trayDischargeNozzle.Dock = System.Windows.Forms.DockStyle.Fill; this.trayDischargeNozzle.Dock = System.Windows.Forms.DockStyle.Fill;
this.trayDischargeNozzle.HeadText = "DischargeNozzle"; this.trayDischargeNozzle.HeadText = "DischargeNozzle";
this.trayDischargeNozzle.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave; this.trayDischargeNozzle.InitSlotStatus = Rs.Controls.ESlotStatus.NotHave;
@ -981,11 +981,11 @@ namespace Rs.MotionPlat
this.trayGood1.OffsetX = 0F; this.trayGood1.OffsetX = 0F;
this.trayGood1.OffsetY = 0F; this.trayGood1.OffsetY = 0F;
this.trayGood1.OffsetYEven = 0F; this.trayGood1.OffsetYEven = 0F;
this.trayGood1.RowNum = 26; this.trayGood1.RowNum = 25;
this.trayGood1.RowSpace = 3; this.trayGood1.RowSpace = 3;
this.tableLayoutPanel8.SetRowSpan(this.trayGood1, 2); this.tableLayoutPanel8.SetRowSpan(this.trayGood1, 2);
this.trayGood1.SelectSlot = null; this.trayGood1.SelectSlot = null;
this.trayGood1.ShowStatus = true; this.trayGood1.ShowStatus = false;
this.trayGood1.ShowText = false; this.trayGood1.ShowText = false;
this.trayGood1.SinglePoint = false; this.trayGood1.SinglePoint = false;
this.trayGood1.Size = new System.Drawing.Size(190, 404); this.trayGood1.Size = new System.Drawing.Size(190, 404);
@ -1024,11 +1024,11 @@ namespace Rs.MotionPlat
this.trayMulti.OffsetX = 0F; this.trayMulti.OffsetX = 0F;
this.trayMulti.OffsetY = 0F; this.trayMulti.OffsetY = 0F;
this.trayMulti.OffsetYEven = 0F; this.trayMulti.OffsetYEven = 0F;
this.trayMulti.RowNum = 26; this.trayMulti.RowNum = 25;
this.trayMulti.RowSpace = 3; this.trayMulti.RowSpace = 3;
this.tableLayoutPanel9.SetRowSpan(this.trayMulti, 2); this.tableLayoutPanel9.SetRowSpan(this.trayMulti, 2);
this.trayMulti.SelectSlot = null; this.trayMulti.SelectSlot = null;
this.trayMulti.ShowStatus = true; this.trayMulti.ShowStatus = false;
this.trayMulti.ShowText = false; this.trayMulti.ShowText = false;
this.trayMulti.SinglePoint = false; this.trayMulti.SinglePoint = false;
this.trayMulti.Size = new System.Drawing.Size(190, 404); this.trayMulti.Size = new System.Drawing.Size(190, 404);
@ -1067,11 +1067,11 @@ namespace Rs.MotionPlat
this.trayGood2.OffsetX = 0F; this.trayGood2.OffsetX = 0F;
this.trayGood2.OffsetY = 0F; this.trayGood2.OffsetY = 0F;
this.trayGood2.OffsetYEven = 0F; this.trayGood2.OffsetYEven = 0F;
this.trayGood2.RowNum = 26; this.trayGood2.RowNum = 25;
this.trayGood2.RowSpace = 3; this.trayGood2.RowSpace = 3;
this.tableLayoutPanel10.SetRowSpan(this.trayGood2, 2); this.tableLayoutPanel10.SetRowSpan(this.trayGood2, 2);
this.trayGood2.SelectSlot = null; this.trayGood2.SelectSlot = null;
this.trayGood2.ShowStatus = true; this.trayGood2.ShowStatus = false;
this.trayGood2.ShowText = false; this.trayGood2.ShowText = false;
this.trayGood2.SinglePoint = false; this.trayGood2.SinglePoint = false;
this.trayGood2.Size = new System.Drawing.Size(190, 404); this.trayGood2.Size = new System.Drawing.Size(190, 404);
@ -1110,11 +1110,11 @@ namespace Rs.MotionPlat
this.trayGood3.OffsetX = 0F; this.trayGood3.OffsetX = 0F;
this.trayGood3.OffsetY = 0F; this.trayGood3.OffsetY = 0F;
this.trayGood3.OffsetYEven = 0F; this.trayGood3.OffsetYEven = 0F;
this.trayGood3.RowNum = 26; this.trayGood3.RowNum = 25;
this.trayGood3.RowSpace = 3; this.trayGood3.RowSpace = 3;
this.tableLayoutPanel11.SetRowSpan(this.trayGood3, 2); this.tableLayoutPanel11.SetRowSpan(this.trayGood3, 2);
this.trayGood3.SelectSlot = null; this.trayGood3.SelectSlot = null;
this.trayGood3.ShowStatus = true; this.trayGood3.ShowStatus = false;
this.trayGood3.ShowText = false; this.trayGood3.ShowText = false;
this.trayGood3.SinglePoint = false; this.trayGood3.SinglePoint = false;
this.trayGood3.Size = new System.Drawing.Size(192, 404); this.trayGood3.Size = new System.Drawing.Size(192, 404);

@ -132,10 +132,4 @@
<metadata name="Content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>
Loading…
Cancel
Save