1、上料盘时增加检测工作位是否有料盘,解决重复上料盘的问题

2、搬运料盘时增加是否搬运成功的判断,解决搬运空料盘过去问题
master
lhiven 1 year ago
parent 106c60471c
commit e03733e773

@ -191,6 +191,11 @@ namespace Rs.AutoDischarge.V3.Flow
public bool Load(EStockTrayLoadMode loadMode,Action loadFinishedEvent)
{
if(HasTray())
{
MessageQueue.Instance.Warn($"{GetTrayName()}工作位有料盘,不能重复上料盘");
return false;
}
logInfo = GetClassName() + $"{GetTrayName()} 料仓收到上料任务";
LogHelper.Debug(logInfo);
if (!isRunning)
@ -219,8 +224,6 @@ namespace Rs.AutoDischarge.V3.Flow
finished = false;
}
actionFinishedEvent.Reset();
logInfo =GetClassName()+ $"{GetTrayName()} 料仓收到上料任务";
MessageQueue.Instance.Insert(logInfo);
Ops.Off($"{(int)m_stockType}号料仓斜推气缸");
Thread.Sleep(50);
logInfo = GetClassName() + $"{(int)m_stockType}号料仓斜推气缸收回";

@ -25,7 +25,7 @@ namespace Rs.MotionPlat.Flow
,
,
,
,
,
,
,
,
@ -217,14 +217,15 @@ namespace Rs.MotionPlat.Flow
{
logInfo = $"检测到上下气缸原位OK";
stopwatch.Restart();
if(GlobalVar.TakeTrayDisableVac)
{
step = ETakeTrayFlowStep.;
}
else
{
step = ETakeTrayFlowStep.;
}
//if(GlobalVar.TakeTrayDisableVac)
//{
// step = ETakeTrayFlowStep.到放料盘上方;
//}
//else
//{
//}
step = ETakeTrayFlowStep.;
}
}
else
@ -237,25 +238,36 @@ namespace Rs.MotionPlat.Flow
stopwatch.Restart();
}
break;
case ETakeTrayFlowStep.:
if (stopwatch.ElapsedMilliseconds < 5000 || GlobalVar.VirtualAxis)
{
if (Ops.IsOn("夹爪真空吸检测") || (GlobalVar.VirtualAxis))
case ETakeTrayFlowStep.:
//if (stopwatch.ElapsedMilliseconds < 5000 || GlobalVar.VirtualAxis)
//{
// if (Ops.IsOn("夹爪真空吸检测") || (GlobalVar.VirtualAxis))
// {
// logInfo = GetClassName()+$"夹爪真空吸检测 OK";
// MessageQueue.Instance.Insert(logInfo);
// step = ETakeTrayFlowStep.到放料盘上方;
// }
//}
if (Ops.IsOff($"{(int)fromTray}号料仓料盘到位光电检测") || (GlobalVar.VirtualAxis))
{
logInfo = GetClassName()+$"夹爪真空吸检测 OK";
logInfo = GetClassName() + $"料盘已被抓起 OK";
MessageQueue.Instance.Insert(logInfo);
step = ETakeTrayFlowStep.;
}
}
else
{
logInfo = "夹爪真空吸检测异常,请处理后点击确定";
logInfo = $"{(int)fromTray}号料仓料盘到位光电检测OK,料盘未抓起";
MessageQueue.Instance.Warn(GetClassName()+ logInfo);
TestCenterMessageBox.Show(AlarmConstID.UpDownCylinderExceptionAlarm, logInfo, ETipButton.Ok);
TestCenterMessageBox.WaitResult(AlarmConstID.UpDownCylinderExceptionAlarm);
stopwatch.Stop();
stopwatch.Restart();
//打开夹爪
Ops.Off("夹爪气缸电磁阀");
logInfo = GetClassName() + $"夹爪气缸off";
MessageQueue.Instance.Insert(logInfo);
Thread.Sleep(1000);
Ops.On("上下气缸电磁阀动位");
logInfo = GetClassName() + "上下气缸电磁阀动位on";
MessageQueue.Instance.Insert(logInfo);
@ -283,10 +295,10 @@ namespace Rs.MotionPlat.Flow
{
speed = GlobalVar.TakeTrayFromNg2InputSpeed;
}
ErrorCode errCode = AxisControl.LoadX.MovePos(targetX + cameraCenterX, GlobalVar.TakeTraySpeed);
ErrorCode errCode = AxisControl.LoadX.MovePos(targetX + cameraCenterX, speed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
{
errCode = AxisControl.LoadY.MovePos(targetY + cameraCenterY - 2, GlobalVar.TakeTraySpeed);
errCode = AxisControl.LoadY.MovePos(targetY + cameraCenterY - 2, speed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
{
if (GlobalVar.VirtualAxis)

@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("2.20.24.19")]
[assembly: AssemblyVersion("2.20.24.21")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

@ -452,7 +452,7 @@
// cboxLocationFailAutoSkip
//
this.cboxLocationFailAutoSkip.AutoSize = true;
this.cboxLocationFailAutoSkip.Location = new System.Drawing.Point(361, 274);
this.cboxLocationFailAutoSkip.Location = new System.Drawing.Point(361, 262);
this.cboxLocationFailAutoSkip.Name = "cboxLocationFailAutoSkip";
this.cboxLocationFailAutoSkip.Size = new System.Drawing.Size(144, 16);
this.cboxLocationFailAutoSkip.TabIndex = 53;
@ -594,7 +594,7 @@
// cboxVirtualAxis
//
this.cboxVirtualAxis.AutoSize = true;
this.cboxVirtualAxis.Location = new System.Drawing.Point(294, 274);
this.cboxVirtualAxis.Location = new System.Drawing.Point(294, 262);
this.cboxVirtualAxis.Name = "cboxVirtualAxis";
this.cboxVirtualAxis.Size = new System.Drawing.Size(60, 16);
this.cboxVirtualAxis.TabIndex = 8;
@ -604,7 +604,7 @@
// cboxCheckSafeEnable
//
this.cboxCheckSafeEnable.AutoSize = true;
this.cboxCheckSafeEnable.Location = new System.Drawing.Point(202, 274);
this.cboxCheckSafeEnable.Location = new System.Drawing.Point(202, 262);
this.cboxCheckSafeEnable.Name = "cboxCheckSafeEnable";
this.cboxCheckSafeEnable.Size = new System.Drawing.Size(72, 16);
this.cboxCheckSafeEnable.TabIndex = 8;
@ -624,7 +624,7 @@
// cboxEnableVirtuleBarCode
//
this.cboxEnableVirtuleBarCode.AutoSize = true;
this.cboxEnableVirtuleBarCode.Location = new System.Drawing.Point(439, 295);
this.cboxEnableVirtuleBarCode.Location = new System.Drawing.Point(349, 295);
this.cboxEnableVirtuleBarCode.Name = "cboxEnableVirtuleBarCode";
this.cboxEnableVirtuleBarCode.Size = new System.Drawing.Size(60, 16);
this.cboxEnableVirtuleBarCode.TabIndex = 8;
@ -634,7 +634,7 @@
// cboxGRR
//
this.cboxGRR.AutoSize = true;
this.cboxGRR.Location = new System.Drawing.Point(391, 295);
this.cboxGRR.Location = new System.Drawing.Point(301, 295);
this.cboxGRR.Name = "cboxGRR";
this.cboxGRR.Size = new System.Drawing.Size(42, 16);
this.cboxGRR.TabIndex = 8;
@ -644,7 +644,7 @@
// cboxEnableTestFixtureFiberCheck
//
this.cboxEnableTestFixtureFiberCheck.AutoSize = true;
this.cboxEnableTestFixtureFiberCheck.Location = new System.Drawing.Point(294, 295);
this.cboxEnableTestFixtureFiberCheck.Location = new System.Drawing.Point(204, 295);
this.cboxEnableTestFixtureFiberCheck.Name = "cboxEnableTestFixtureFiberCheck";
this.cboxEnableTestFixtureFiberCheck.Size = new System.Drawing.Size(96, 16);
this.cboxEnableTestFixtureFiberCheck.TabIndex = 8;
@ -654,7 +654,7 @@
// cboxEnableTwoSpeed
//
this.cboxEnableTwoSpeed.AutoSize = true;
this.cboxEnableTwoSpeed.Location = new System.Drawing.Point(202, 295);
this.cboxEnableTwoSpeed.Location = new System.Drawing.Point(112, 295);
this.cboxEnableTwoSpeed.Name = "cboxEnableTwoSpeed";
this.cboxEnableTwoSpeed.Size = new System.Drawing.Size(84, 16);
this.cboxEnableTwoSpeed.TabIndex = 8;
@ -664,12 +664,13 @@
// cboxEnableScanBarCodeByDownCamera
//
this.cboxEnableScanBarCodeByDownCamera.AutoSize = true;
this.cboxEnableScanBarCodeByDownCamera.Location = new System.Drawing.Point(112, 295);
this.cboxEnableScanBarCodeByDownCamera.Location = new System.Drawing.Point(510, 228);
this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera";
this.cboxEnableScanBarCodeByDownCamera.Size = new System.Drawing.Size(84, 16);
this.cboxEnableScanBarCodeByDownCamera.TabIndex = 8;
this.cboxEnableScanBarCodeByDownCamera.Text = "下相机扫码";
this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true;
this.cboxEnableScanBarCodeByDownCamera.Visible = false;
//
// cboxEnableExceptionHandlingNozzle
//
@ -685,7 +686,7 @@
// cboxRunSpace
//
this.cboxRunSpace.AutoSize = true;
this.cboxRunSpace.Location = new System.Drawing.Point(112, 273);
this.cboxRunSpace.Location = new System.Drawing.Point(112, 261);
this.cboxRunSpace.Name = "cboxRunSpace";
this.cboxRunSpace.Size = new System.Drawing.Size(48, 16);
this.cboxRunSpace.TabIndex = 8;
@ -721,7 +722,7 @@
this.cboxCurRecipe.FormattingEnabled = true;
this.cboxCurRecipe.Items.AddRange(new object[] {
"Default"});
this.cboxCurRecipe.Location = new System.Drawing.Point(112, 238);
this.cboxCurRecipe.Location = new System.Drawing.Point(112, 226);
this.cboxCurRecipe.Name = "cboxCurRecipe";
this.cboxCurRecipe.Size = new System.Drawing.Size(348, 20);
this.cboxCurRecipe.TabIndex = 1;
@ -729,7 +730,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(57, 241);
this.label4.Location = new System.Drawing.Point(57, 229);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(35, 12);
this.label4.TabIndex = 0;
@ -939,6 +940,7 @@
this.txtControlCenterPort.TabIndex = 42;
this.txtControlCenterPort.Text = "2048";
this.txtControlCenterPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtControlCenterPort.Visible = false;
//
// label27
//
@ -948,6 +950,7 @@
this.label27.Size = new System.Drawing.Size(59, 12);
this.label27.TabIndex = 0;
this.label27.Text = "中控端口:";
this.label27.Visible = false;
//
// txtControlCenterIP
//
@ -961,6 +964,7 @@
this.txtControlCenterIP.TabIndex = 42;
this.txtControlCenterIP.Text = "127.0.0.1";
this.txtControlCenterIP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtControlCenterIP.Visible = false;
//
// label26
//
@ -970,6 +974,7 @@
this.label26.Size = new System.Drawing.Size(47, 12);
this.label26.TabIndex = 0;
this.label26.Text = "中控IP:";
this.label26.Visible = false;
//
// CommonConfig
//

@ -100,6 +100,9 @@ namespace Rs.MotionPlat.SysConfig
private void btnSaveSpeedParam_Click(object sender, EventArgs e)
{
QifuManager.Instance.Write(float.Parse(txtQifuValue.Text));
SysConfigParam.Update(txtQifuValue.Name.Replace("txt", ""), txtQifuValue.Text);
foreach (var con in groupBox1.Controls)
{
if(con is TextBox)

Loading…
Cancel
Save