Commit 1b3123b8 LN

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

1 个父辈 8ccc8df4
......@@ -146,5 +146,6 @@ namespace OnlineStore.Common
outstore_abnormal_reel,
bacth_no_fix,
comInitError,
stringDoorSafety,
}
}
......@@ -188,5 +188,18 @@ namespace DeviceLibrary
}
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
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.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();
Setting_Init.CamTestReel_debug = false;
initAgv();
......@@ -810,18 +810,26 @@ namespace DeviceLibrary
//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))
{
Msg.add("料串门光栅被遮挡", MsgLevel.warning);
Msg.add(crc.GetString(L.stringDoorSafety, "料串门光栅被遮挡"), MsgLevel.warning);
if (lastStringSafetyStatus)
{
lastStringSafetyStatus = false;
LogUtil.debug("料串门光栅被遮挡 ,暂停门运行");
StringDoorPause();
}
}
if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.LOW) && StringMoveInfo.MoveStep != MoveStep.Wait)
{
if (StringIsInOut)
{
}
else
if (stringdoorSafetyProcStrategy == 0)
{
Msg.add(crc.GetString(L.stringDoorSafety, "料串门光栅被遮挡"), MsgLevel.warning);
ok = false;
LogUtil.debug("料串门光栅被遮挡 ,暂停运行");
DeviceSuddenStop();
}
}
......@@ -844,6 +852,7 @@ namespace DeviceLibrary
if (!IgnoreSafecheck)
{
ok = false;
LogUtil.debug("左侧防护门没有关闭 ,暂停运行");
DeviceSuddenStop();
}
Msg.add(crc.GetString(L.left_safedoor_not_close, "左侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
......@@ -853,6 +862,7 @@ namespace DeviceLibrary
if (!IgnoreSafecheck)
{
ok = false;
LogUtil.debug("右侧防护门没有关闭 ,暂停运行");
DeviceSuddenStop();
}
Msg.add(crc.GetString(L.right_safedoor_not_close, "右侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
......@@ -862,6 +872,7 @@ namespace DeviceLibrary
if (!IgnoreSafecheck)
{
ok = false;
LogUtil.debug("后侧防护门没有关闭 ,暂停运行");
DeviceSuddenStop();
}
Msg.add(crc.GetString(L.back_safedoor_not_close, "后侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
......@@ -880,7 +891,18 @@ namespace DeviceLibrary
lastSafeCheckStatus = ok;
return ok;
}
void SafetySuddenStop()
{
if (Line.IsRun())
{
}
else
{
LogUtil.error("SafetySuddenStop ,暂停运行");
DeviceSuddenStop();
}
}
void DeviceSuddenStop()
{
if (lastSafeCheckStatus)
......@@ -927,17 +949,36 @@ namespace DeviceLibrary
return IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW);
}
}
bool StringIsInOut
{
get
{
return Line.IsRun();
}
}
public bool DeviceCheck()
{
bool ok = true;
isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW);
if (SafetyLightStop)
{
//如果料串正在流入流出过程中,不暂停
if (StringIsInOut)
{
}
else
{
LogUtil.error("安全光栅被遮挡 ,暂停运行");
DeviceSuddenStop();
lastSafeCheckStatus = false;
Msg.add(crc.GetString(L.SafetyLight_is_block, "安全光栅被遮挡"), MsgLevel.warning);
return false;
}
}
if (UserPause)
{
Msg.add(crc.GetString(L.system_pause, "系统暂停"), MsgLevel.warning);
......
......@@ -152,12 +152,13 @@ namespace DeviceLibrary
if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.HIGH))
{
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02a);
StringMoveInfo.log($"顶起料串固定顶升");
StringMoveInfo.log($"顶起料串固定顶升,线体停止");
//if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
// StringDoorClose(StringMoveInfo);
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);
Line.LineStop("n");
NeedCloseDoor();
}
else
{
......@@ -189,11 +190,15 @@ namespace DeviceLibrary
BatchAxisToP2(StringMoveInfo, true);
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);
StringMoveInfo.log($"等待关门");
}
}
break;
case MoveStep.StringLoad_02b:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_03);
......@@ -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)
{
if (StringMoveInfo.IsStep(MoveStep.StringOut_Released))
......@@ -806,7 +824,14 @@ namespace DeviceLibrary
return;
}
if (StringDoor != null)
{
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
......@@ -53,14 +53,14 @@ namespace TheMachineNView
this.groupBox1.Margin = new System.Windows.Forms.Padding(5);
this.groupBox1.Name = "groupBox1";
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.TabStop = false;
this.groupBox1.Text = "管理密码设置";
//
// 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.Size = new System.Drawing.Size(165, 33);
this.button_ok.TabIndex = 2;
......@@ -70,7 +70,7 @@ namespace TheMachineNView
//
// 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.Name = "label_newpwd2";
this.label_newpwd2.Size = new System.Drawing.Size(134, 23);
......@@ -80,7 +80,7 @@ namespace TheMachineNView
//
// 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.Name = "label_newpwd";
this.label_newpwd.Size = new System.Drawing.Size(134, 23);
......@@ -90,7 +90,7 @@ namespace TheMachineNView
//
// 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.Name = "label_oldpwd";
this.label_oldpwd.Size = new System.Drawing.Size(134, 23);
......@@ -100,7 +100,7 @@ namespace TheMachineNView
//
// 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.Name = "textBox_newpwd2";
this.textBox_newpwd2.PasswordChar = '*';
......@@ -109,7 +109,7 @@ namespace TheMachineNView
//
// 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.Name = "textBox_newpwd";
this.textBox_newpwd.PasswordChar = '*';
......@@ -118,7 +118,7 @@ namespace TheMachineNView
//
// 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.Name = "textBox_oldpwd";
this.textBox_oldpwd.PasswordChar = '*';
......@@ -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.Margin = new System.Windows.Forms.Padding(5);
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.PerformLayout();
this.ResumeLayout(false);
......
......@@ -450,3 +450,4 @@ FlipDoor_R_Axis 右翻转托盘 Right Flip Tray
StringDoor_Axis 料串口折叠门 String Folding Door
FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号 Detection Signal
Res0001 设备未启动 Device Not Started
stringDoorSafety 料串门光栅被遮挡 The grating of the string door is obstructed.
\ No newline at end of file
......@@ -453,3 +453,4 @@ FlipDoor_R_Axis 右翻转托盘 右フリップドア
StringDoor_Axis 料串口折叠门 ストリングドア
FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号 検出信号
Res0001 设备未启动 デバイスは始まっていません
stringDoorSafety 料串门光栅被遮挡 料串口折叠门のグリッドが遮られています
......@@ -438,3 +438,4 @@ FlipDoor_R_Axis 右翻转托盘
StringDoor_Axis 料串口折叠门
FrmPositionTool_groupBox6_groupBox1_ioStatusControl1_label1_Text 检测信号
Res0001 设备未启动
stringDoorSafety 料串门光栅被遮挡
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!