Commit 16f81d91 lailai.xing

修改夹爪类别换成吸盘可设置参数

1 个父辈 780a7474
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ConfigHelper"> <Reference Include="ConfigHelper">
<HintPath>..\..\..\..\..\SharedRefDll\Neotel\DL.Common\Debug\net462\ConfigHelper.dll</HintPath> <HintPath>..\TheMachineNView\bin\Debug\ConfigHelper.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
...@@ -257,6 +257,11 @@ namespace OnlineStore.Common ...@@ -257,6 +257,11 @@ namespace OnlineStore.Common
[MyConfigComment("盘点_料盘Y坐标")] [MyConfigComment("盘点_料盘Y坐标")]
public static MyConfig<int> Device_SelfAudit_ReelY = 1; public static MyConfig<int> Device_SelfAudit_ReelY = 1;
//夹爪类型配置
//kmon
//2025-7-1
[MyConfigComment("夹爪类型")]
public static MyConfig<Claw_Type_Mode> Device_Claw_Type_Mode = Claw_Type_Mode.SingleoIn_Claw;
...@@ -266,4 +271,14 @@ namespace OnlineStore.Common ...@@ -266,4 +271,14 @@ namespace OnlineStore.Common
SingleIoIn_SingleIoOut = 0, SingleIoIn_SingleIoOut = 0,
SingleIoIn_DoubltIoOut = 1 SingleIoIn_DoubltIoOut = 1
} }
//夹爪类型枚举
//kmon
//2025-7-1
public enum Claw_Type_Mode {
//吸盘
SingleoIn_Sucker=0,
//夹爪
SingleoIn_Claw=1
}
} }
...@@ -180,6 +180,12 @@ namespace DeviceLibrary ...@@ -180,6 +180,12 @@ namespace DeviceLibrary
RobotManage.Config.DIList.Remove(IO_Type.BackDoorClose_Check); RobotManage.Config.DIList.Remove(IO_Type.BackDoorClose_Check);
RobotManage.Config.DOList.Remove(IO_Type.DoorSafe_Disable); RobotManage.Config.DOList.Remove(IO_Type.DoorSafe_Disable);
} }
//添加判读是否吸盘
if (Setting_Init.Device_Claw_Type_Mode == Claw_Type_Mode.SingleoIn_Sucker)
{
RobotManage.Config.DIList.Remove(IO_Type.Clamping_Relax);
RobotManage.Config.DIList.Remove(IO_Type.Clamping_Work);
}
if (!ConfigHelper.Config.Get("Device_IO_HasX29", true)) if (!ConfigHelper.Config.Get("Device_IO_HasX29", true))
{ {
RobotManage.Config.DIList.Remove(IO_Type.NGDoor_Tray_Check); RobotManage.Config.DIList.Remove(IO_Type.NGDoor_Tray_Check);
...@@ -565,7 +571,10 @@ namespace DeviceLibrary ...@@ -565,7 +571,10 @@ namespace DeviceLibrary
case MoveStep.H10_HomeReset: case MoveStep.H10_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H11_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H11_HomeReset);
ResetMoveInfo.log("释放夹爪"); ResetMoveInfo.log("释放夹爪");
CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW); // CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
//修改为下面,2025-7-1
StringClowClose(ResetMoveInfo);
break; break;
case MoveStep.H11_HomeReset: case MoveStep.H11_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H12_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H12_HomeReset);
......
...@@ -98,7 +98,8 @@ namespace DeviceLibrary ...@@ -98,7 +98,8 @@ namespace DeviceLibrary
case MoveStep.ReelClamp_02: case MoveStep.ReelClamp_02:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_03); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_03);
ClampMoveInfo.log($"取料夹爪张开"); ClampMoveInfo.log($"取料夹爪张开");
CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.HIGH); // CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.HIGH);
StringClowOpen(ResetMoveInfo);
break; break;
case MoveStep.ReelClamp_03: case MoveStep.ReelClamp_03:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_04); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_04);
...@@ -152,7 +153,8 @@ namespace DeviceLibrary ...@@ -152,7 +153,8 @@ namespace DeviceLibrary
//case MoveStep.ReelClamp_071: //case MoveStep.ReelClamp_071:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_08); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_08);
ClampMoveInfo.log($"取料夹爪释放"); ClampMoveInfo.log($"取料夹爪释放");
CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW); //CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
StringClowOpen(ClampMoveInfo);
break; break;
case MoveStep.ReelClamp_08: case MoveStep.ReelClamp_08:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09);
......
...@@ -290,7 +290,9 @@ namespace DeviceLibrary ...@@ -290,7 +290,9 @@ namespace DeviceLibrary
var tpos4 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * (Config.Batch_DetectDownMM + 2); var tpos4 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * (Config.Batch_DetectDownMM + 2);
Batch_Axis.AbsMove(StringMoveInfo, tpos4, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos4, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW); //CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
StringClowOpen(ClampMoveInfo);
//OpenFlipDoor(StringMoveInfo); //OpenFlipDoor(StringMoveInfo);
StringType = StringTypeE.In; StringType = StringTypeE.In;
} }
...@@ -800,7 +802,7 @@ namespace DeviceLibrary ...@@ -800,7 +802,7 @@ namespace DeviceLibrary
{ {
if (Setting_Init.Disable_StringDoor) if (Setting_Init.Disable_StringDoor)
{ {
LogUtil.info($"料串门已屏蔽,不打开"); moveInfo.log($"料串门已屏蔽,不打开");
return; return;
} }
if (StringDoor != null) if (StringDoor != null)
...@@ -830,6 +832,39 @@ namespace DeviceLibrary ...@@ -830,6 +832,39 @@ namespace DeviceLibrary
CyStringDoor.ToLow(moveInfo); CyStringDoor.ToLow(moveInfo);
} }
} }
#region 夹爪开关*K-Mon*2025-7-1
//夹爪开
public void StringClowOpen(MoveInfo moveInfo)
{
moveInfo.log("打开夹爪");
if (Setting_Init.Device_Claw_Type_Mode == Claw_Type_Mode.SingleoIn_Sucker)
{
IOMove(IO_Type.Clamping_Work, IO_VALUE.HIGH);
IOMove(IO_Type.Clamping_Relax, IO_VALUE.LOW);
}
else
{
CylinderMove(moveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.HIGH);
}
}
public void StringClowClose(MoveInfo moveInfo)
{
moveInfo.log("关闭夹爪");
if (Setting_Init.Device_Claw_Type_Mode == Claw_Type_Mode.SingleoIn_Sucker)
{
IOMove(IO_Type.Clamping_Work, IO_VALUE.LOW);
IOMove(IO_Type.Clamping_Relax, IO_VALUE.HIGH);
}
else
{
CylinderMove(moveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
}
}
#endregion
public void StringDoorPause() public void StringDoorPause()
{ {
if (Setting_Init.Disable_StringDoor) if (Setting_Init.Disable_StringDoor)
......
...@@ -54,7 +54,7 @@ namespace TheMachineNView ...@@ -54,7 +54,7 @@ namespace TheMachineNView
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{ {
LogUtil.error($"CurrentDomain_UnhandledException:" + e.ToString()); LogUtil.error($"CurrentDomain_UnhandledException:" + e.ExceptionObject.ToString());
} }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="UserFromControl"> <Reference Include="UserFromControl">
<HintPath>..\..\SO775-DUOStore\dll\UserFromControl.dll</HintPath> <HintPath>C:\Users\HY\Desktop\UserFromControl.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -207,7 +207,7 @@ namespace TheMachineNView ...@@ -207,7 +207,7 @@ namespace TheMachineNView
this.dataGridView1.ShowCellToolTips = false; this.dataGridView1.ShowCellToolTips = false;
this.dataGridView1.ShowEditingIcon = false; this.dataGridView1.ShowEditingIcon = false;
this.dataGridView1.ShowRowErrors = false; this.dataGridView1.ShowRowErrors = false;
this.dataGridView1.Size = new System.Drawing.Size(676, 312); this.dataGridView1.Size = new System.Drawing.Size(669, 312);
this.dataGridView1.TabIndex = 103; this.dataGridView1.TabIndex = 103;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown); this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!