增加大力吸嘴取异常料功能

增加公共测试窗体
master
lhiven 1 year ago
parent 1088998c13
commit 93b56ceaa3

@ -28,6 +28,7 @@ namespace Rs.MotionPlat.Flow
public enum EDischargeFlowStep
{
,
/*取料*/
,
,
,
@ -37,12 +38,14 @@ namespace Rs.MotionPlat.Flow
,
,
,
/*拍照*/
,
,
,
,
,
,
/*放料*/
,
,
,
@ -53,8 +56,8 @@ namespace Rs.MotionPlat.Flow
,
,
,
,
,
,
,
,
,
@ -1312,6 +1315,7 @@ namespace Rs.MotionPlat.Flow
}
else
{
//异常处理
bool exit = false;
Dictionary<ETipButton, string> buttons = new Dictionary<ETipButton, string>()
{
@ -1322,6 +1326,7 @@ namespace Rs.MotionPlat.Flow
while (!exit)
{
alarmInfo = $"周转盘{curNozzle.ToIndex + 1}号穴位真空吸异常";
MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
TestCenterMessageBox.Show(AlarmConstID.TurnoverDumpFailAlarm, alarmInfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.TurnoverDumpFailAlarm);
if (msgBox != null)
@ -1342,16 +1347,25 @@ namespace Rs.MotionPlat.Flow
case ETipButton.Skip://跳过
logInfo = GetClassName() + $"选择了跳过";
MessageQueue.Instance.Insert(logInfo);
//logInfo = $"{nameof(DischargeFlow)}-通知强力吸头到{curNozzle.ToType}盘{curNozzle.ToIndex}穴位处理异常料";
//MessageQueue.Instance.Insert(logInfo);
//WarningSuckerNgFlow.Instance.Start(ETrayType.Turnover, curNozzle.ToIndex);
//WarningSuckerNgFlow.Instance.Wait();
if (!UpCameraCheckFlow.Instance.CheckTurnoverTrayHasProduct(null, curNozzle.ToIndex + 1))
if (GlobalVar.EnableExceptionHandlingNozzle)
{
VacManager.TurnoverTrayVacSuction(EVacOperator.Close,curNozzle.ToIndex+1);
exit = true;
//排料轴先回到安全位,等待异常处理吸嘴过来处理这颗异常料
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
WarningSuckerNgFlow.Instance.DealNgProduct(ETrayType.Turnover, curNozzle.ToIndex + 1);
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, curNozzle.ToIndex + 1);
curNozzle.Reset();
flowStep = EDischargeFlowStep.;
exit = true;
}
else
{
if (!UpCameraCheckFlow.Instance.CheckTurnoverTrayHasProduct(null, curNozzle.ToIndex + 1))
{
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, curNozzle.ToIndex + 1);
curNozzle.Reset();
flowStep = EDischargeFlowStep.;
exit = true;
}
}
break;
case ETipButton.Yes://移动到安全位

@ -4,6 +4,7 @@ using Rs.Framework;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys.Trays;
using Rs.MotionPlat.Flow.Camera;
using Rs.MotionPlat.Flow.NgFlow;
using Rs.MotionPlat.Flow.SafePosFlow;
using Rs.MotionPlat.Flow.SubFlow;
using System;
@ -178,32 +179,38 @@ namespace Rs.MotionPlat.Flow
}
break;
case ETurnoverFlowStep.:
targetPos = SysConfigParam.GetValue<double>("TurnoverTakeX");
errCode = AxisControl.TurnoverX.MovePos(targetPos, GlobalVar.WholeSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
if(CanGoTurnoverTrayPos())
{
targetPos = SysConfigParam.GetValue<double>("TurnoverTakeY");
errCode = AxisControl.TurnoverY.MovePos(targetPos, GlobalVar.WholeSpeed);
targetPos = SysConfigParam.GetValue<double>("TurnoverTakeX");
errCode = AxisControl.TurnoverX.MovePos(targetPos, GlobalVar.WholeSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
{
if (GlobalVar.VirtualAxis)
targetPos = SysConfigParam.GetValue<double>("TurnoverTakeY");
errCode = AxisControl.TurnoverY.MovePos(targetPos, GlobalVar.WholeSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
{
Thread.Sleep(GlobalVar.VirtualAxisMoveTime);
if (GlobalVar.VirtualAxis)
{
Thread.Sleep(GlobalVar.VirtualAxisMoveTime);
}
logInfo = GetClassName() + $"到周转盘取料位上方";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
}
else
{
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverY, errCode);
}
logInfo = GetClassName() + $"到周转盘取料位上方";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
}
else
{
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverY, errCode);
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverX, errCode);
}
}
else
{
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverX, errCode);
Msg.ShowError("turnovery axis move is unsafe");
}
break;
case ETurnoverFlowStep.:
if (Ops.IsStop(AxisControl.TurnoverX,AxisControl.TurnoverY) || GlobalVar.VirtualAxis)
@ -246,7 +253,15 @@ namespace Rs.MotionPlat.Flow
MessageQueue.Instance.Insert(logInfo);
if (GlobalVar.EnableExceptionHandlingNozzle)
{
//周转吸头过来取料
foreach (TurnoverTraySlot slot in untestSlots)
{
WarningSuckerNgFlow.Instance.DealNgProduct(ETrayType.Turnover, slot.Index);
slot.ClearProduct();
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, slot.Index);
GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
}
exit = true;
Step = ETurnoverFlowStep.;
}
else
{
@ -255,6 +270,7 @@ namespace Rs.MotionPlat.Flow
{
if (!LaserFlow.Instance.HasProduct(ETrayType.Turnover, slot.Index))
{
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, slot.Index);
slot.ClearProduct();
GlobalTray.TurnoverTray.ChangeStatus(slot.Index, ESlotStatus.NotHave);
}
@ -270,7 +286,7 @@ namespace Rs.MotionPlat.Flow
case ETipButton.Yes:
logInfo = $"选择了移动到安全位";
MessageQueue.Instance.Insert(logInfo);
TransitModuleSafePosFlow.Instance.GoSafePostion( EExceptionSafePos.TurnoverTray);
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.TurnoverTray);
break;
default:
break;
@ -398,7 +414,7 @@ namespace Rs.MotionPlat.Flow
undealTasks = LoadAndUnloadTask.Instance.GetTurnoverToTestTasks(ETaskDealStatus.Undeal);
foreach (TurnoverInfo task in undealTasks)
{
if (Ops.IsOn($"周转{task.FromIndex+1}号吸嘴真空吸检测") || GlobalVar.VirtualAxis || GlobalVar.RunSpace)
if (Ops.IsOn($"周转{task.FromIndex + 1}号吸嘴真空吸检测") || GlobalVar.VirtualAxis || GlobalVar.RunSpace)
{
//如果真空检测OK带料产品已经吸上了
TransitNozzleManager.Instance.Nozzle(task.ToIndex + 1).AddProduct(task);
@ -409,7 +425,7 @@ namespace Rs.MotionPlat.Flow
}
}
hasProductNozzles = TransitNozzleManager.Instance.GetHasProductNozzles();
if (hasProductNozzles.Count > 0||GlobalVar.RunSpace || GlobalVar.VirtualAxis)
if (hasProductNozzles.Count > 0)
{
logInfo = GetClassName()+ $"周转吸头{hasProductNozzles.Select(n => n.NozzleIndex).ToJoinString()}真空检测OK";
MessageQueue.Instance.Insert(logInfo);
@ -691,17 +707,56 @@ namespace Rs.MotionPlat.Flow
}
break;
case ETurnoverFlowStep.:
//如果不启用光纤检测,先通过真空来判断穴位中是否放料,如果真空值达到说明有产品,如果真空值未达到,说明未放好,先用强力吸嘴压一下
//ngList = TestVacCheck();
if(GlobalVar.EnableTestFixtureFiberCheck)
{
}
else
/*
1
2
*/
foreach (var nozzle in TransitNozzleManager.Instance.GetHasProductNozzles())
{
foreach (var nozzle in TransitNozzleManager.Instance.GetHasProductNozzles())
//先检测光纤
if(GlobalVar.EnableTestFixtureFiberCheck)//如果启用光纤
{
if(Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位真空吸检测") || GlobalVar.RunSpace)
if (Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位光纤检测") || GlobalVar.RunSpace)
{
bool exit = false;
while (!exit)
{
alarmInfo = $"测试治具{nozzle.NozzleIndex}号光纤异常,有可能叠料,请处理";
MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
switch (msgBox.Button)
{
case ETipButton.Retry:
VacManager.TestTrayVacSuction(EVacOperator.Open, nozzle.NozzleIndex);
if (!Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位光纤检测") || GlobalVar.RunSpace)
{
//GlobalTray.TestTray.ChangeStatus(nozzle.NozzleIndex, ESlotStatus.Have);
//TestTrayManager.Instance.Slot(nozzle.NozzleIndex).AddProduct(nozzle);
//nozzle.Clear();
exit = true;
}
break;
case ETipButton.Skip:
//镭射头过来复检,有产品则继续报警,
if (!LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex))
{
VacManager.TestTrayVacSuction(EVacOperator.Close, nozzle.NozzleIndex);
nozzle.Clear();
exit = true;
}
break;
case ETipButton.Yes://移动到安全位
VacManager.TestTrayVacSuction(EVacOperator.Close, nozzle.NozzleIndex);
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
break;
}
}
}
}
if(nozzle.IsHasProduct)
{
if (Ops.IsOn($"测试{nozzle.NozzleIndex}号穴位真空吸检测") || GlobalVar.RunSpace)
{
GlobalTray.TestTray.ChangeStatus(nozzle.NozzleIndex, ESlotStatus.Have);
TestTrayManager.Instance.Slot(nozzle.NozzleIndex).AddProduct(nozzle);
@ -713,6 +768,7 @@ namespace Rs.MotionPlat.Flow
while (!exit)
{
alarmInfo = $"测试治具{nozzle.NozzleIndex}号真空吸异常";
MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
TestCenterMessageBox.Show(AlarmConstID.NozzlesLoseMaterialAlarm, alarmInfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
msgBox = TestCenterMessageBox.WaitResult(AlarmConstID.NozzlesLoseMaterialAlarm);
switch (msgBox.Button)
@ -726,10 +782,10 @@ namespace Rs.MotionPlat.Flow
nozzle.Clear();
exit = true;
}
break;
break;
case ETipButton.Skip:
//镭射头过来复检,有产品则继续报警,
if(!LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex))
if (!LaserFlow.Instance.HasProduct(ETrayType.Test, nozzle.NozzleIndex))
{
nozzle.Clear();
exit = true;
@ -737,24 +793,23 @@ namespace Rs.MotionPlat.Flow
break;
case ETipButton.Yes://移动到安全位
VacManager.TestTrayVacSuction(EVacOperator.Close, nozzle.NozzleIndex);
TransitModuleSafePosFlow.Instance.GoSafePostion( EExceptionSafePos.Socket);
TransitModuleSafePosFlow.Instance.GoSafePostion(EExceptionSafePos.Socket);
break;
}
}
}
}
if (!turnoverTakeFinishe)
{
Step = ETurnoverFlowStep.;
}
else
{
Step = ETurnoverFlowStep.;
}
}
if (!turnoverTakeFinishe)
{
Step = ETurnoverFlowStep.;
}
else
{
Step = ETurnoverFlowStep.;
}
break;
case ETurnoverFlowStep.:
targetPos = SysConfigParam.GetValue<double>("PressDumpX");
@ -932,9 +987,15 @@ namespace Rs.MotionPlat.Flow
case ETurnoverFlowStep.:
if (Ops.IsStop(AxisControl.PressZ) || GlobalVar.VirtualAxis)
{
logInfo = GetClassName() + $"测试完成已抬起到安全位 PressZ at:{Ops.GetCurPosition(AxisAlias.PressZ)}";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
//AxisControl.PressZ.Get_Target_Position(out double pos);
//double tpos = Ops.GetCurPosition(AxisControl.PressZ);
//AxisControl.PressZ.IsArrived(out bool isArrived);
if (Ops.IsArrived(AxisAlias.PressZ))
{
logInfo = GetClassName() + $"测试完成已抬起到安全位 PressZ at:{Ops.GetCurPosition(AxisAlias.PressZ)}";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
}
}
break;
case ETurnoverFlowStep.:
@ -1242,30 +1303,37 @@ namespace Rs.MotionPlat.Flow
}
break;
case ETurnoverFlowStep.:
targetPos = SysConfigParam.GetValue<double>("TurnoverDumpX");
errCode = AxisControl.TurnoverX.MovePos(targetPos, GlobalVar.WholeSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
if(CanGoTurnoverTrayPos())
{
targetPos = SysConfigParam.GetValue<double>("TurnoverDumpY");
errCode = AxisControl.TurnoverY.MovePos(targetPos, GlobalVar.WholeSpeed);
targetPos = SysConfigParam.GetValue<double>("TurnoverDumpX");
errCode = AxisControl.TurnoverX.MovePos(targetPos, GlobalVar.WholeSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
{
if (GlobalVar.VirtualAxis)
targetPos = SysConfigParam.GetValue<double>("TurnoverDumpY");
errCode = AxisControl.TurnoverY.MovePos(targetPos, GlobalVar.WholeSpeed);
if (errCode == Motion.ErrorCode.Ok || GlobalVar.VirtualAxis)
{
Thread.Sleep(GlobalVar.VirtualAxisMoveTime);
if (GlobalVar.VirtualAxis)
{
Thread.Sleep(GlobalVar.VirtualAxisMoveTime);
}
logInfo = GetClassName() + $"到周转盘放料位上方";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
}
else
{
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverY, errCode);
}
logInfo = GetClassName() + $"到周转盘放料位上方";
MessageQueue.Instance.Insert(logInfo);
Step = ETurnoverFlowStep.;
}
else
{
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverY, errCode);
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverX, errCode);
}
}
else
{
MsgBox.ShowAxisAlarmDialog(AxisControl.TurnoverX, errCode);
Msg.ShowError("turnovery axis move is unsafe");
}
break;
case ETurnoverFlowStep.:
@ -1583,12 +1651,25 @@ namespace Rs.MotionPlat.Flow
case ETipButton.Skip:
logInfo = GetClassName() + "选择了跳过";
MessageQueue.Instance.Insert(logInfo);
//检测穴位中还是否有料
if (!UpCameraCheckFlow.Instance.CheckTurnoverTrayHasProduct(null, slot.Index, true))
if(GlobalVar.EnableExceptionHandlingNozzle)//启用大力吸嘴
{
exit = true;
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
WarningSuckerNgFlow.Instance.DealNgProduct(ETrayType.Turnover, slot.Index);
nozzle.Clear();
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, slot.Index);
exit = true;
}
else
{
//检测穴位中还是否有料
if (!UpCameraCheckFlow.Instance.CheckTurnoverTrayHasProduct(null, slot.Index, true))
{
nozzle.Clear();
VacManager.TurnoverTrayVacSuction(EVacOperator.Close, slot.Index);
exit = true;
}
}
break;
case ETipButton.Yes:
logInfo = GetClassName() + "选择了移动到安全位";
@ -1599,7 +1680,6 @@ namespace Rs.MotionPlat.Flow
break;
}
}
}
else
{
@ -1611,9 +1691,9 @@ namespace Rs.MotionPlat.Flow
}
}
}
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
//排料轴回安全位
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
//检测治具盘中是否还有待取的料,如果有继续取,如果没有回安全位
if (TestTrayManager.Instance.GetSlots( ETestTraySlotStatus.Have).Count>0)
{
retakeNum++;
@ -1714,5 +1794,18 @@ namespace Rs.MotionPlat.Flow
return Step.ToString();
}
/// <summary>
/// 检测周转Y轴是否可以到周转盘位置
/// </summary>
/// <returns></returns>
private bool CanGoTurnoverTrayPos()
{
double curPos = Ops.GetCurPosition(AxisControl.LoadY);
if(Math.Abs(GlobalVar.LoadYStartPos-curPos)<0.5)
{
return true;
}
return false;
}
}
}

@ -124,11 +124,11 @@ namespace Rs.MotionPlat.Flow.SubFlow
MessageQueue.Instance.Insert(logInfo);
if(trayType== ETrayType.Turnover)
{
hasProduct = !(Math.Abs(GlobalVar.TurnoverCheckBaseHeight-heightVal) < 0.5);
hasProduct = !(Math.Abs(GlobalVar.TurnoverCheckBaseHeight-heightVal) < 0.7);
}
else if(trayType== ETrayType.Test)
{
hasProduct = !(Math.Abs(GlobalVar.TestFixtureCheckBaseHeight - heightVal) < 0.5);
hasProduct = !(Math.Abs(GlobalVar.TestFixtureCheckBaseHeight - heightVal) < 0.7);
}
finished = true;

@ -2,6 +2,7 @@
using Rs.Motion;
using Rs.Motion.Base;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys.Trays;
using Rs.MotionPlat.Flow.SafePosFlow;
using Rs.MotionPlat.Flow.SubFlow;
using System;
@ -93,9 +94,14 @@ namespace Rs.MotionPlat.Flow.NgFlow
switch (step)
{
case EWarningSuckerNgFlowStep.:
logInfo = GetClassName() + "测试工位已完成";
MessageQueue.Instance.Insert(logInfo);
step = EWarningSuckerNgFlowStep.;
if(TurnoverFlow.Instance.GetStep()=="等待任务"
|| TurnoverFlow.Instance.GetStep() == "取料异常报警"
|| TurnoverFlow.Instance.GetStep()== "周转盘放料完成后真空检测")
{
logInfo = GetClassName() + "测试工位已完成";
MessageQueue.Instance.Insert(logInfo);
step = EWarningSuckerNgFlowStep.;
}
break;
case EWarningSuckerNgFlowStep.:
if (exceptionTray == ETrayType.Turnover)
@ -167,9 +173,9 @@ namespace Rs.MotionPlat.Flow.NgFlow
case EWarningSuckerNgFlowStep.:
if (Ops.IsStop(AxisAlias.TurnoverZ) || GlobalVar.VirtualAxis)
{
Thread.Sleep(100);
if (Ops.IsArrived(AxisAlias.TurnoverZ) || GlobalVar.VirtualAxis)
{
Thread.Sleep(100);
logInfo = GetClassName() + "已运动到异常处理位下方";
MessageQueue.Instance.Insert(logInfo);
//打开强力吸嘴真空
@ -262,7 +268,15 @@ namespace Rs.MotionPlat.Flow.NgFlow
}
break;
case EWarningSuckerNgFlowStep.:
targetSlot = TrayPointManager.GetExceptiontTrayPoint(exceptionSlotIndex);
int exceptionRow = TurnoverTrayManager.Instance.Slot(exceptionSlotIndex).Row;
if(exceptionRow % 2 == 0)
{
targetSlot = TrayPointManager.GetExceptiontTrayPoint(1);
}
else
{
targetSlot = TrayPointManager.GetExceptiontTrayPoint(2);
}
errCode = AxisControl.TurnoverX.MovePos(targetSlot.X, GlobalVar.WholeSpeed);
if(errCode== ErrorCode.Ok ||GlobalVar.VirtualAxis)
{
@ -394,11 +408,12 @@ namespace Rs.MotionPlat.Flow.NgFlow
else
{
alarmInfo = "NG料盘中有产品请手动取出";
MessageQueue.Instance.Warn(GetClassName() + alarmInfo);
msgBox = MsgBox.ShowDialog(AlarmConstID.NgProductFiberCheckAlarm, alarmInfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
switch (msgBox.Button)
{
case ETipButton.Skip:
logInfo = "选择了跳过按钮";
logInfo = GetClassName()+ "选择了跳过按钮";
MessageQueue.Instance.Insert(logInfo);
break;
case ETipButton.Yes://移动到安全位

@ -128,11 +128,7 @@ namespace Rs.MotionPlat
form.ShowMax = false;
form.ShowMin = false;
form.ShowInTaskbar = false;
//form.StartPosition = FormStartPosition.CenterScreen;
//MessageBox.Show(form.Width.ToString());
//MessageBox.Show(form.Height.ToString());
//form.Location= new Point(this.Width-form.Width, this.Height-form.Height);
//form.mov = new Point(0,0);
form.Location = new Point(this.Width - form.Width, this.Height - form.Height);
form.Show(this);
}
else if (button == btnPermission)

@ -468,6 +468,12 @@
<Compile Include="SysConfig\VarConfig.Designer.cs">
<DependentUpon>VarConfig.cs</DependentUpon>
</Compile>
<Compile Include="TestFrm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TestFrm.Designer.cs">
<DependentUpon>TestFrm.cs</DependentUpon>
</Compile>
<Compile Include="UserForm.cs">
<SubType>Form</SubType>
</Compile>
@ -637,6 +643,9 @@
<EmbeddedResource Include="SysConfig\VarConfig.resx">
<DependentUpon>VarConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TestFrm.resx">
<DependentUpon>TestFrm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UserForm.resx">
<DependentUpon>UserForm.cs</DependentUpon>
</EmbeddedResource>

@ -56,6 +56,8 @@
this.label6 = new System.Windows.Forms.Label();
this.cboxVirtualAxis = new System.Windows.Forms.CheckBox();
this.cboxCheckSafeEnable = new System.Windows.Forms.CheckBox();
this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox();
this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox();
this.cboxRunSpace = new System.Windows.Forms.CheckBox();
this.panelEx1 = new Rs.Controls.PanelEx();
this.btnSaveSpeedParam = new System.Windows.Forms.Button();
@ -77,8 +79,8 @@
this.label27 = new System.Windows.Forms.Label();
this.txtControlCenterIP = new System.Windows.Forms.TextBox();
this.label26 = new System.Windows.Forms.Label();
this.cboxEnableExceptionHandlingNozzle = new System.Windows.Forms.CheckBox();
this.cboxEnableScanBarCodeByDownCamera = new System.Windows.Forms.CheckBox();
this.txtQifuValue = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox10.SuspendLayout();
@ -319,6 +321,8 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtQifuValue);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.comboBox1);
this.groupBox1.Controls.Add(this.panel1);
this.groupBox1.Controls.Add(this.label2);
@ -354,7 +358,7 @@
this.groupBox1.Size = new System.Drawing.Size(778, 432);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "参数设定";
this.groupBox1.Text = "系统配置";
//
// comboBox1
//
@ -441,6 +445,26 @@
this.cboxCheckSafeEnable.Text = "安全检查";
this.cboxCheckSafeEnable.UseVisualStyleBackColor = true;
//
// cboxEnableScanBarCodeByDownCamera
//
this.cboxEnableScanBarCodeByDownCamera.AutoSize = true;
this.cboxEnableScanBarCodeByDownCamera.Location = new System.Drawing.Point(112, 277);
this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera";
this.cboxEnableScanBarCodeByDownCamera.Size = new System.Drawing.Size(84, 16);
this.cboxEnableScanBarCodeByDownCamera.TabIndex = 8;
this.cboxEnableScanBarCodeByDownCamera.Text = "下相机扫码";
this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true;
//
// cboxEnableExceptionHandlingNozzle
//
this.cboxEnableExceptionHandlingNozzle.AutoSize = true;
this.cboxEnableExceptionHandlingNozzle.Location = new System.Drawing.Point(332, 240);
this.cboxEnableExceptionHandlingNozzle.Name = "cboxEnableExceptionHandlingNozzle";
this.cboxEnableExceptionHandlingNozzle.Size = new System.Drawing.Size(96, 16);
this.cboxEnableExceptionHandlingNozzle.TabIndex = 8;
this.cboxEnableExceptionHandlingNozzle.Text = "启用强力吸嘴";
this.cboxEnableExceptionHandlingNozzle.UseVisualStyleBackColor = true;
//
// cboxRunSpace
//
this.cboxRunSpace.AutoSize = true;
@ -666,25 +690,29 @@
this.label26.TabIndex = 0;
this.label26.Text = "中控IP:";
//
// cboxEnableExceptionHandlingNozzle
//
this.cboxEnableExceptionHandlingNozzle.AutoSize = true;
this.cboxEnableExceptionHandlingNozzle.Location = new System.Drawing.Point(332, 240);
this.cboxEnableExceptionHandlingNozzle.Name = "cboxEnableExceptionHandlingNozzle";
this.cboxEnableExceptionHandlingNozzle.Size = new System.Drawing.Size(96, 16);
this.cboxEnableExceptionHandlingNozzle.TabIndex = 8;
this.cboxEnableExceptionHandlingNozzle.Text = "启用强力吸嘴";
this.cboxEnableExceptionHandlingNozzle.UseVisualStyleBackColor = true;
//
// cboxEnableScanBarCodeByDownCamera
//
this.cboxEnableScanBarCodeByDownCamera.AutoSize = true;
this.cboxEnableScanBarCodeByDownCamera.Location = new System.Drawing.Point(112, 277);
this.cboxEnableScanBarCodeByDownCamera.Name = "cboxEnableScanBarCodeByDownCamera";
this.cboxEnableScanBarCodeByDownCamera.Size = new System.Drawing.Size(84, 16);
this.cboxEnableScanBarCodeByDownCamera.TabIndex = 8;
this.cboxEnableScanBarCodeByDownCamera.Text = "下相机扫码";
this.cboxEnableScanBarCodeByDownCamera.UseVisualStyleBackColor = true;
// txtQifuValue
//
this.txtQifuValue.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(16)))), ((int)(((byte)(16)))), ((int)(((byte)(16)))));
this.txtQifuValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtQifuValue.Font = new System.Drawing.Font("宋体", 9F);
this.txtQifuValue.ForeColor = System.Drawing.Color.White;
this.txtQifuValue.Location = new System.Drawing.Point(370, 325);
this.txtQifuValue.Name = "txtQifuValue";
this.txtQifuValue.Size = new System.Drawing.Size(85, 21);
this.txtQifuValue.TabIndex = 51;
this.txtQifuValue.Tag = "PressZ";
this.txtQifuValue.Text = "0.01";
this.txtQifuValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtQifuValue.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtQifuValue_KeyUp);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(308, 329);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(47, 12);
this.label9.TabIndex = 50;
this.label9.Text = "气压值:";
//
// CommonConfig
//
@ -768,5 +796,7 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox cboxEnableExceptionHandlingNozzle;
private System.Windows.Forms.CheckBox cboxEnableScanBarCodeByDownCamera;
private System.Windows.Forms.TextBox txtQifuValue;
private System.Windows.Forms.Label label9;
}
}

@ -68,7 +68,7 @@ namespace Rs.MotionPlat.SysConfig
}
}
//LoadSysParam(groupBox2);
txtQifuValue.Text = SysConfigParam.GetValue<string>(txtQifuValue.Name.Replace("txt", ""));
PositionHelper.BindPosition(groupBox9,"int");
PositionHelper.BindPosition(groupBox10, "int");
}
@ -103,7 +103,7 @@ namespace Rs.MotionPlat.SysConfig
}
}
Msg.ShowInfo("Save camera param success!");
Msg.ShowInfo("Save success!");
}
private void tbarWholeSpeed_ValueChanged(object sender, EventArgs e)
@ -130,5 +130,16 @@ namespace Rs.MotionPlat.SysConfig
{
UpdateSysParam((TextBox)sender);
}
private void txtQifuValue_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
TextBox txt = (TextBox)sender;
string value = txt.Text;
QifuManager.Instance.Write(float.Parse(value));
SysConfigParam.Update(txt.Name.Replace("txt", ""), value);
}
}
}
}

@ -0,0 +1,112 @@
namespace Rs.MotionPlat
{
partial class TestFrm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnTurnoverSlotException = new System.Windows.Forms.Button();
this.btnDischargeGoSafePoint = new System.Windows.Forms.Button();
this.btnSocketExceptionGoSafePoint = new System.Windows.Forms.Button();
this.btnTransiteNozzleExceptionGoSafePoint = new System.Windows.Forms.Button();
this.btnTurnoverTrayExceptionGoSafePoint = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnTurnoverSlotException
//
this.btnTurnoverSlotException.Location = new System.Drawing.Point(12, 12);
this.btnTurnoverSlotException.Name = "btnTurnoverSlotException";
this.btnTurnoverSlotException.Size = new System.Drawing.Size(152, 37);
this.btnTurnoverSlotException.TabIndex = 0;
this.btnTurnoverSlotException.Text = "周转盘穴位异常处理";
this.btnTurnoverSlotException.UseVisualStyleBackColor = true;
this.btnTurnoverSlotException.Click += new System.EventHandler(this.btnTurnoverSlotException_Click);
//
// btnDischargeGoSafePoint
//
this.btnDischargeGoSafePoint.Location = new System.Drawing.Point(202, 12);
this.btnDischargeGoSafePoint.Name = "btnDischargeGoSafePoint";
this.btnDischargeGoSafePoint.Size = new System.Drawing.Size(152, 37);
this.btnDischargeGoSafePoint.TabIndex = 0;
this.btnDischargeGoSafePoint.Text = "排料到安全位";
this.btnDischargeGoSafePoint.UseVisualStyleBackColor = true;
this.btnDischargeGoSafePoint.Click += new System.EventHandler(this.btnDischargeGoSafePoint_Click);
//
// btnSocketExceptionGoSafePoint
//
this.btnSocketExceptionGoSafePoint.Location = new System.Drawing.Point(391, 12);
this.btnSocketExceptionGoSafePoint.Name = "btnSocketExceptionGoSafePoint";
this.btnSocketExceptionGoSafePoint.Size = new System.Drawing.Size(152, 37);
this.btnSocketExceptionGoSafePoint.TabIndex = 0;
this.btnSocketExceptionGoSafePoint.Text = "Socket异常到安全位";
this.btnSocketExceptionGoSafePoint.UseVisualStyleBackColor = true;
this.btnSocketExceptionGoSafePoint.Click += new System.EventHandler(this.btnSocketExceptionGoSafePoint_Click);
//
// btnTransiteNozzleExceptionGoSafePoint
//
this.btnTransiteNozzleExceptionGoSafePoint.Location = new System.Drawing.Point(562, 12);
this.btnTransiteNozzleExceptionGoSafePoint.Name = "btnTransiteNozzleExceptionGoSafePoint";
this.btnTransiteNozzleExceptionGoSafePoint.Size = new System.Drawing.Size(152, 37);
this.btnTransiteNozzleExceptionGoSafePoint.TabIndex = 0;
this.btnTransiteNozzleExceptionGoSafePoint.Text = "周转吸嘴异常到安全位";
this.btnTransiteNozzleExceptionGoSafePoint.UseVisualStyleBackColor = true;
this.btnTransiteNozzleExceptionGoSafePoint.Click += new System.EventHandler(this.btnTransiteNozzleExceptionGoSafePoint_Click);
//
// btnTurnoverTrayExceptionGoSafePoint
//
this.btnTurnoverTrayExceptionGoSafePoint.Location = new System.Drawing.Point(730, 12);
this.btnTurnoverTrayExceptionGoSafePoint.Name = "btnTurnoverTrayExceptionGoSafePoint";
this.btnTurnoverTrayExceptionGoSafePoint.Size = new System.Drawing.Size(152, 37);
this.btnTurnoverTrayExceptionGoSafePoint.TabIndex = 0;
this.btnTurnoverTrayExceptionGoSafePoint.Text = "周转吸嘴异常到安全位";
this.btnTurnoverTrayExceptionGoSafePoint.UseVisualStyleBackColor = true;
this.btnTurnoverTrayExceptionGoSafePoint.Click += new System.EventHandler(this.btnTurnoverTrayExceptionGoSafePoint_Click);
//
// TestFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1336, 854);
this.Controls.Add(this.btnTurnoverTrayExceptionGoSafePoint);
this.Controls.Add(this.btnTransiteNozzleExceptionGoSafePoint);
this.Controls.Add(this.btnSocketExceptionGoSafePoint);
this.Controls.Add(this.btnDischargeGoSafePoint);
this.Controls.Add(this.btnTurnoverSlotException);
this.Name = "TestFrm";
this.Text = "TestFrm";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnTurnoverSlotException;
private System.Windows.Forms.Button btnDischargeGoSafePoint;
private System.Windows.Forms.Button btnSocketExceptionGoSafePoint;
private System.Windows.Forms.Button btnTransiteNozzleExceptionGoSafePoint;
private System.Windows.Forms.Button btnTurnoverTrayExceptionGoSafePoint;
}
}

@ -0,0 +1,49 @@
using Rs.MotionPlat.Flow.NgFlow;
using Rs.MotionPlat.Flow.SafePosFlow;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Rs.MotionPlat
{
public partial class TestFrm : BaseForm
{
public TestFrm()
{
InitializeComponent();
}
private void btnTurnoverSlotException_Click(object sender, EventArgs e)
{
Task.Run(() => {
WarningSuckerNgFlow.Instance.DealNgProduct(Commom.ETrayType.Turnover, 1);
});
}
private void btnTransiteNozzleExceptionGoSafePoint_Click(object sender, EventArgs e)
{
TransitModuleSafePosFlow.Instance.GoSafePostion(Commom.EExceptionSafePos.TransitNozzle);
}
private void btnSocketExceptionGoSafePoint_Click(object sender, EventArgs e)
{
TransitModuleSafePosFlow.Instance.GoSafePostion(Commom.EExceptionSafePos.Socket);
}
private void btnDischargeGoSafePoint_Click(object sender, EventArgs e)
{
DischargeModuleGoSafePosFlow.Instance.GoSafePostion();
}
private void btnTurnoverTrayExceptionGoSafePoint_Click(object sender, EventArgs e)
{
TransitModuleSafePosFlow.Instance.GoSafePostion(Commom.EExceptionSafePos.TurnoverTray);
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Loading…
Cancel
Save