Commit 1b3123b8 LN

光栅调整:滚筒转动时光栅遮挡不停止。料串进入时自动关闭折叠门。

1 个父辈 8ccc8df4
...@@ -146,5 +146,6 @@ namespace OnlineStore.Common ...@@ -146,5 +146,6 @@ namespace OnlineStore.Common
outstore_abnormal_reel, outstore_abnormal_reel,
bacth_no_fix, bacth_no_fix,
comInitError, comInitError,
stringDoorSafety,
} }
} }
...@@ -188,5 +188,18 @@ namespace DeviceLibrary ...@@ -188,5 +188,18 @@ namespace DeviceLibrary
} }
return canStop; return canStop;
} }
/// <summary>
/// 线体是否转动中
/// </summary>
/// <returns></returns>
public bool IsRun()
{
if (DOValue(LineIO).Equals(IO_VALUE.HIGH) || DOValue(LineRevIO).Equals(IO_VALUE.HIGH))
{
return true;
}
return false;
}
} }
} }
...@@ -193,7 +193,7 @@ namespace DeviceLibrary ...@@ -193,7 +193,7 @@ namespace DeviceLibrary
IOMonitor.RegisterIO(IO_Type.SuddenStop_BTN, Config, IO_VALUE.LOW, SuddenStop_BTN, 2500, 100); IOMonitor.RegisterIO(IO_Type.SuddenStop_BTN, Config, IO_VALUE.LOW, SuddenStop_BTN, 2500, 100);
IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, Reset_BTN, 2500, 100); IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, Reset_BTN, 2500, 100);
IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500, 100); IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500, 100);
IOMonitor.RegisterIO(IO_Type.SafetyLightCurtains, Config, IO_VALUE.LOW, DeviceSuddenStop, 1, 1); IOMonitor.RegisterIO(IO_Type.SafetyLightCurtains, Config, IO_VALUE.LOW, SafetySuddenStop, 1, 1);
LedProcessInit(); LedProcessInit();
Setting_Init.CamTestReel_debug = false; Setting_Init.CamTestReel_debug = false;
initAgv(); initAgv();
...@@ -810,18 +810,26 @@ namespace DeviceLibrary ...@@ -810,18 +810,26 @@ namespace DeviceLibrary
//IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW) && //IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW) &&
if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.LOW))
{ {
Msg.add("料串门光栅被遮挡", MsgLevel.warning); Msg.add(crc.GetString(L.stringDoorSafety, "料串门光栅被遮挡"), MsgLevel.warning);
if (lastStringSafetyStatus) if (lastStringSafetyStatus)
{ {
lastStringSafetyStatus = false; lastStringSafetyStatus = false;
LogUtil.debug("料串门光栅被遮挡 ,暂停门运行");
StringDoorPause(); StringDoorPause();
} }
} }
if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.LOW) && StringMoveInfo.MoveStep != MoveStep.Wait) if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.LOW) && StringMoveInfo.MoveStep != MoveStep.Wait)
{ {
if (StringIsInOut)
{
}
else
if (stringdoorSafetyProcStrategy == 0) if (stringdoorSafetyProcStrategy == 0)
{ {
Msg.add(crc.GetString(L.stringDoorSafety, "料串门光栅被遮挡"), MsgLevel.warning);
ok = false; ok = false;
LogUtil.debug("料串门光栅被遮挡 ,暂停运行");
DeviceSuddenStop(); DeviceSuddenStop();
} }
} }
...@@ -844,6 +852,7 @@ namespace DeviceLibrary ...@@ -844,6 +852,7 @@ namespace DeviceLibrary
if (!IgnoreSafecheck) if (!IgnoreSafecheck)
{ {
ok = false; ok = false;
LogUtil.debug("左侧防护门没有关闭 ,暂停运行");
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add(crc.GetString(L.left_safedoor_not_close, "左侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning); Msg.add(crc.GetString(L.left_safedoor_not_close, "左侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
...@@ -853,6 +862,7 @@ namespace DeviceLibrary ...@@ -853,6 +862,7 @@ namespace DeviceLibrary
if (!IgnoreSafecheck) if (!IgnoreSafecheck)
{ {
ok = false; ok = false;
LogUtil.debug("右侧防护门没有关闭 ,暂停运行");
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add(crc.GetString(L.right_safedoor_not_close, "右侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning); Msg.add(crc.GetString(L.right_safedoor_not_close, "右侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
...@@ -862,6 +872,7 @@ namespace DeviceLibrary ...@@ -862,6 +872,7 @@ namespace DeviceLibrary
if (!IgnoreSafecheck) if (!IgnoreSafecheck)
{ {
ok = false; ok = false;
LogUtil.debug("后侧防护门没有关闭 ,暂停运行");
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add(crc.GetString(L.back_safedoor_not_close, "后侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning); Msg.add(crc.GetString(L.back_safedoor_not_close, "后侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
...@@ -880,7 +891,18 @@ namespace DeviceLibrary ...@@ -880,7 +891,18 @@ namespace DeviceLibrary
lastSafeCheckStatus = ok; lastSafeCheckStatus = ok;
return ok; return ok;
} }
void SafetySuddenStop()
{
if (Line.IsRun())
{
}
else
{
LogUtil.error("SafetySuddenStop ,暂停运行");
DeviceSuddenStop();
}
}
void DeviceSuddenStop() void DeviceSuddenStop()
{ {
if (lastSafeCheckStatus) if (lastSafeCheckStatus)
...@@ -927,17 +949,36 @@ namespace DeviceLibrary ...@@ -927,17 +949,36 @@ namespace DeviceLibrary
return IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW); return IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW);
} }
} }
bool StringIsInOut
{
get
{
return Line.IsRun();
}
}
public bool DeviceCheck() public bool DeviceCheck()
{ {
bool ok = true; bool ok = true;
isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW); isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW);
if (SafetyLightStop) if (SafetyLightStop)
{ {
//如果料串正在流入流出过程中,不暂停
if (StringIsInOut)
{
}
else
{
LogUtil.error("安全光栅被遮挡 ,暂停运行");
DeviceSuddenStop(); DeviceSuddenStop();
lastSafeCheckStatus = false; lastSafeCheckStatus = false;
Msg.add(crc.GetString(L.SafetyLight_is_block, "安全光栅被遮挡"), MsgLevel.warning); Msg.add(crc.GetString(L.SafetyLight_is_block, "安全光栅被遮挡"), MsgLevel.warning);
return false; return false;
} }
}
if (UserPause) if (UserPause)
{ {
Msg.add(crc.GetString(L.system_pause, "系统暂停"), MsgLevel.warning); Msg.add(crc.GetString(L.system_pause, "系统暂停"), MsgLevel.warning);
......
...@@ -152,12 +152,13 @@ namespace DeviceLibrary ...@@ -152,12 +152,13 @@ namespace DeviceLibrary
if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02a); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02a);
StringMoveInfo.log($"顶起料串固定顶升"); StringMoveInfo.log($"顶起料串固定顶升,线体停止");
//if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false)) //if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
// StringDoorClose(StringMoveInfo); // StringDoorClose(StringMoveInfo);
CylinderMove(StringMoveInfo, IO_Type.StringFix_Bottom, IO_Type.StringFix_Top, IO_VALUE.HIGH); CylinderMove(StringMoveInfo, IO_Type.StringFix_Bottom, IO_Type.StringFix_Top, IO_VALUE.HIGH);
CylinderMove(StringMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.HIGH); CylinderMove(StringMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.HIGH);
Line.LineStop("n"); Line.LineStop("n");
NeedCloseDoor();
} }
else else
{ {
...@@ -189,11 +190,15 @@ namespace DeviceLibrary ...@@ -189,11 +190,15 @@ namespace DeviceLibrary
BatchAxisToP2(StringMoveInfo, true); BatchAxisToP2(StringMoveInfo, true);
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0009", "料串正在上升"), MsgLevel.info)); StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0009", "料串正在上升"), MsgLevel.info));
} }
else if (StringMoveInfo.IsTimeOut(10)) else
{
NeedCloseDoor();
if (StringMoveInfo.IsTimeOut(10))
{ {
Msg.add(crc.GetString(L.wait_stringdoor_close, "等待关门折叠门"), MsgLevel.warning); Msg.add(crc.GetString(L.wait_stringdoor_close, "等待关门折叠门"), MsgLevel.warning);
StringMoveInfo.log($"等待关门"); StringMoveInfo.log($"等待关门");
} }
}
break; break;
case MoveStep.StringLoad_02b: case MoveStep.StringLoad_02b:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_03); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_03);
...@@ -564,6 +569,19 @@ namespace DeviceLibrary ...@@ -564,6 +569,19 @@ namespace DeviceLibrary
} }
} }
private void NeedCloseDoor()
{
if ((!Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains) || IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.HIGH))
{
CloseDoor(null);
StringMoveInfo.log($"自动关闭折叠门");
}
else
{
StringMoveInfo.log($"折叠门光栅遮挡,需要手动关闭折叠门");
}
}
bool StringStartOut(string msg) bool StringStartOut(string msg)
{ {
if (StringMoveInfo.IsStep(MoveStep.StringOut_Released)) if (StringMoveInfo.IsStep(MoveStep.StringOut_Released))
...@@ -806,7 +824,14 @@ namespace DeviceLibrary ...@@ -806,7 +824,14 @@ namespace DeviceLibrary
return; return;
} }
if (StringDoor != null) if (StringDoor != null)
{
StringDoor.Pause(); StringDoor.Pause();
} }
else
{
IOMove(IO_Type.StringDoor_Close, IO_VALUE.LOW);
IOMove(IO_Type.StringDoor_Open, IO_VALUE.LOW);
}
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -53,14 +53,14 @@ namespace TheMachineNView ...@@ -53,14 +53,14 @@ namespace TheMachineNView
this.groupBox1.Margin = new System.Windows.Forms.Padding(5); this.groupBox1.Margin = new System.Windows.Forms.Padding(5);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5); this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(388, 258); this.groupBox1.Size = new System.Drawing.Size(394, 199);
this.groupBox1.TabIndex = 0; this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "管理密码设置"; this.groupBox1.Text = "管理密码设置";
// //
// button_ok // button_ok
// //
this.button_ok.Location = new System.Drawing.Point(155, 188); this.button_ok.Location = new System.Drawing.Point(155, 139);
this.button_ok.Name = "button_ok"; this.button_ok.Name = "button_ok";
this.button_ok.Size = new System.Drawing.Size(165, 33); this.button_ok.Size = new System.Drawing.Size(165, 33);
this.button_ok.TabIndex = 2; this.button_ok.TabIndex = 2;
...@@ -70,7 +70,7 @@ namespace TheMachineNView ...@@ -70,7 +70,7 @@ namespace TheMachineNView
// //
// label_newpwd2 // label_newpwd2
// //
this.label_newpwd2.Location = new System.Drawing.Point(11, 134); this.label_newpwd2.Location = new System.Drawing.Point(11, 107);
this.label_newpwd2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label_newpwd2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_newpwd2.Name = "label_newpwd2"; this.label_newpwd2.Name = "label_newpwd2";
this.label_newpwd2.Size = new System.Drawing.Size(134, 23); this.label_newpwd2.Size = new System.Drawing.Size(134, 23);
...@@ -80,7 +80,7 @@ namespace TheMachineNView ...@@ -80,7 +80,7 @@ namespace TheMachineNView
// //
// label_newpwd // label_newpwd
// //
this.label_newpwd.Location = new System.Drawing.Point(11, 88); this.label_newpwd.Location = new System.Drawing.Point(11, 73);
this.label_newpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label_newpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_newpwd.Name = "label_newpwd"; this.label_newpwd.Name = "label_newpwd";
this.label_newpwd.Size = new System.Drawing.Size(134, 23); this.label_newpwd.Size = new System.Drawing.Size(134, 23);
...@@ -90,7 +90,7 @@ namespace TheMachineNView ...@@ -90,7 +90,7 @@ namespace TheMachineNView
// //
// label_oldpwd // label_oldpwd
// //
this.label_oldpwd.Location = new System.Drawing.Point(11, 43); this.label_oldpwd.Location = new System.Drawing.Point(11, 37);
this.label_oldpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label_oldpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_oldpwd.Name = "label_oldpwd"; this.label_oldpwd.Name = "label_oldpwd";
this.label_oldpwd.Size = new System.Drawing.Size(134, 23); this.label_oldpwd.Size = new System.Drawing.Size(134, 23);
...@@ -100,7 +100,7 @@ namespace TheMachineNView ...@@ -100,7 +100,7 @@ namespace TheMachineNView
// //
// textBox_newpwd2 // textBox_newpwd2
// //
this.textBox_newpwd2.Location = new System.Drawing.Point(155, 131); this.textBox_newpwd2.Location = new System.Drawing.Point(155, 105);
this.textBox_newpwd2.Margin = new System.Windows.Forms.Padding(5); this.textBox_newpwd2.Margin = new System.Windows.Forms.Padding(5);
this.textBox_newpwd2.Name = "textBox_newpwd2"; this.textBox_newpwd2.Name = "textBox_newpwd2";
this.textBox_newpwd2.PasswordChar = '*'; this.textBox_newpwd2.PasswordChar = '*';
...@@ -109,7 +109,7 @@ namespace TheMachineNView ...@@ -109,7 +109,7 @@ namespace TheMachineNView
// //
// textBox_newpwd // textBox_newpwd
// //
this.textBox_newpwd.Location = new System.Drawing.Point(155, 85); this.textBox_newpwd.Location = new System.Drawing.Point(155, 71);
this.textBox_newpwd.Margin = new System.Windows.Forms.Padding(5); this.textBox_newpwd.Margin = new System.Windows.Forms.Padding(5);
this.textBox_newpwd.Name = "textBox_newpwd"; this.textBox_newpwd.Name = "textBox_newpwd";
this.textBox_newpwd.PasswordChar = '*'; this.textBox_newpwd.PasswordChar = '*';
...@@ -118,7 +118,7 @@ namespace TheMachineNView ...@@ -118,7 +118,7 @@ namespace TheMachineNView
// //
// textBox_oldpwd // textBox_oldpwd
// //
this.textBox_oldpwd.Location = new System.Drawing.Point(155, 40); this.textBox_oldpwd.Location = new System.Drawing.Point(155, 35);
this.textBox_oldpwd.Margin = new System.Windows.Forms.Padding(5); this.textBox_oldpwd.Margin = new System.Windows.Forms.Padding(5);
this.textBox_oldpwd.Name = "textBox_oldpwd"; this.textBox_oldpwd.Name = "textBox_oldpwd";
this.textBox_oldpwd.PasswordChar = '*'; this.textBox_oldpwd.PasswordChar = '*';
...@@ -132,7 +132,7 @@ namespace TheMachineNView ...@@ -132,7 +132,7 @@ namespace TheMachineNView
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(5); this.Margin = new System.Windows.Forms.Padding(5);
this.Name = "UC_SetUserPassword"; this.Name = "UC_SetUserPassword";
this.Size = new System.Drawing.Size(405, 272); this.Size = new System.Drawing.Size(405, 209);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
......
...@@ -450,3 +450,4 @@ FlipDoor_R_Axis 右翻转托盘 Right Flip Tray ...@@ -450,3 +450,4 @@ FlipDoor_R_Axis 右翻转托盘 Right Flip Tray
StringDoor_Axis 料串口折叠门 String Folding Door StringDoor_Axis 料串口折叠门 String Folding Door
FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号 Detection Signal FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号 Detection Signal
Res0001 设备未启动 Device Not Started Res0001 设备未启动 Device Not Started
stringDoorSafety 料串门光栅被遮挡 The grating of the string door is obstructed.
\ No newline at end of file \ No newline at end of file
...@@ -453,3 +453,4 @@ FlipDoor_R_Axis 右翻转托盘 右フリップドア ...@@ -453,3 +453,4 @@ FlipDoor_R_Axis 右翻转托盘 右フリップドア
StringDoor_Axis 料串口折叠门 ストリングドア StringDoor_Axis 料串口折叠门 ストリングドア
FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号 検出信号 FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号 検出信号
Res0001 设备未启动 デバイスは始まっていません Res0001 设备未启动 デバイスは始まっていません
stringDoorSafety 料串门光栅被遮挡 料串口折叠门のグリッドが遮られています
...@@ -438,3 +438,4 @@ FlipDoor_R_Axis 右翻转托盘 ...@@ -438,3 +438,4 @@ FlipDoor_R_Axis 右翻转托盘
StringDoor_Axis 料串口折叠门 StringDoor_Axis 料串口折叠门
FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号 FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号
Res0001 设备未启动 Res0001 设备未启动
stringDoorSafety 料串门光栅被遮挡
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!