Commit d45702e0 张东亮

折叠门停止问题

1 个父辈 4972d290
......@@ -325,6 +325,7 @@ namespace DeviceLibrary
public void SuddenStop()
{
AxisManager.SuddenStop(Config.DeviceName, Config.GetAxisValue());
LogUtil.info("SuddenStop【" + AxisName + "】");
}
/// <summary>
/// 判断轴运动是否安全
......
......@@ -116,7 +116,7 @@ namespace DeviceLibrary
}
if (!string.IsNullOrEmpty(saftylight) && IOManager.IOValue(saftylight).Equals(IO_VALUE.LOW) && IOManager.IOValue(down.ToString()).Equals(IO_VALUE.LOW))
{
moveInfo.log("安全光栅触发停止");
moveInfo.log($"{saftylight}触发停止");
Pause();
return;
}
......@@ -214,7 +214,7 @@ namespace DeviceLibrary
}
if (!string.IsNullOrEmpty(saftylight) && IOManager.IOValue(saftylight).Equals(IO_VALUE.LOW))
{
moveInfo.log("安全光栅触发停止");
moveInfo.log($"{saftylight}触发停止");
Pause();
return;
}
......@@ -275,7 +275,7 @@ namespace DeviceLibrary
}
public void Pause()
{
if (!isDoorClose())
// if (!isDoorClose())
{
paused = true;
axisBean.SuddenStop();
......@@ -290,6 +290,10 @@ namespace DeviceLibrary
public int ResumeWaitTimeSec = 0;
public void Resume()
{
}
public void ResumeSingle()
{
LastResumeTime = DateTime.Now;
try
{
......
......@@ -124,8 +124,8 @@ namespace DeviceLibrary
{
RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Work);
RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Home);
MotorFlipDoorB = new LiftMonitor(IO_Type.ReelFlipDoor_L_Home, IO_Type.ReelFlipDoor_L_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_L_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed,0,"B翻转门");
MotorFlipDoorA = new LiftMonitor(IO_Type.ReelFlipDoor_R_Home, IO_Type.ReelFlipDoor_R_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_R_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed,0, "A翻转门");
MotorFlipDoorB = new LiftMonitor(IO_Type.ReelFlipDoor_L_Home, IO_Type.ReelFlipDoor_L_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_L_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, "B翻转门");
MotorFlipDoorA = new LiftMonitor(IO_Type.ReelFlipDoor_R_Home, IO_Type.ReelFlipDoor_R_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_R_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, "A翻转门");
MotorFlipDoorB.SlowAftPause = true;
MotorFlipDoorB.SlowAftPause = true;
LogUtil.info("加载翻板门类型为:步进");
......@@ -143,7 +143,7 @@ namespace DeviceLibrary
var sf = "";
if (ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
sf = IO_Type.AGV_OnPosition;
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed,0,"折叠门");
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed, 0, "折叠门");
StringDoor.DownOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_DownOverTimeMS", 0);
StringDoor.UpOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_UpOverTimeMS", 0);
StringDoor.ResumeWaitTimeSec = 5;
......@@ -151,17 +151,16 @@ namespace DeviceLibrary
}
else
LogUtil.info("加载料串门类型为:气缸");
if (!ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
{
RobotManage.Config.DIList.Remove(IO_Type.AGV_OnPosition);
}
if (ConfigHelper.Config.Get("Device_Disable_DoorSafeCheck", false))
{
RobotManage.Config.DIList.Remove(IO_Type.LeftDoorClose_Check);
RobotManage.Config.DIList.Remove(IO_Type.RightDoorClose_Check);
RobotManage.Config.DIList.Remove(IO_Type.BackDoorClose_Check);
if (!ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
{
RobotManage.Config.DIList.Remove(IO_Type.AGV_OnPosition);
}
RobotManage.Config.DOList.Remove(IO_Type.DoorSafe_Disable);
}
if (!ConfigHelper.Config.Get("Device_IO_HasX29", true))
......@@ -481,9 +480,11 @@ namespace DeviceLibrary
case MoveStep.H13_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset);
var h = NGDoor_Tray_Test_Reel;
if (!h.HasValue) {
if (!h.HasValue)
{
Msg.add(crc.GetString(L.x29_low_no_reel, "检测相机打开失败."), MsgLevel.alarm);
}else
}
else
if (!h.Value)
{
Msg.add(crc.GetString(L.x29_low_no_reel, "传感器未检测到单料口料盘."), MsgLevel.alarm);
......@@ -499,7 +500,7 @@ namespace DeviceLibrary
Msg.add(crc.GetString(L.x29_low_no_reel, "检测相机打开失败."), MsgLevel.alarm);
}
else
if (h.Value)
if (h.Value)
{
Msg.add(crc.GetString(L.x29_higt_has_reel, "系统启动检测到有无信息料盘,等待取走单料口料盘"), MsgLevel.alarm);
if (ConfigHelper.Config.Get("CamTestReel_Ability", false))
......@@ -535,7 +536,8 @@ namespace DeviceLibrary
if (!h.HasValue)
{
Msg.add(crc.GetString(L.x29_low_no_reel, "检测相机打开失败."), MsgLevel.alarm);
}else
}
else
if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH) && h.Value)
{
ResetMoveInfo.log("NG口还是检测到料盘");
......@@ -582,7 +584,7 @@ namespace DeviceLibrary
&& IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
var pos = BoxStorePosition.GetFixPos(Config, reelParam);
if(pos!=null)
if (pos != null)
{
LogUtil.info($"复位完成,校准库位出库:{pos.posid}");
RobotManage.mainMachine.AddSingleStoreTask(pos.posid, reelParam.PlateW, reelParam.PlateH);
......@@ -591,7 +593,7 @@ namespace DeviceLibrary
}
else
{
RobotManage.ClearReelInFixPos() ;
RobotManage.ClearReelInFixPos();
}
}
runStatus = RunStatus.Running;
......@@ -617,6 +619,7 @@ namespace DeviceLibrary
public bool IgnoreGratingSignal = false;
bool lastSafeCheckStatus = true;
bool lastStringSafetyStatus = true;
bool SafeCheck()
{
bool ok = true;
......@@ -633,11 +636,19 @@ namespace DeviceLibrary
if (ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
{
//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))
{
ok = false;
DeviceSuddenStop();
Msg.add("料串门光栅被遮挡", MsgLevel.warning);
if (lastStringSafetyStatus)
{
lastStringSafetyStatus = false;
StringDoor.Pause();
}
}
else if (!lastStringSafetyStatus)
{
StringDoor.ResumeSingle();
lastStringSafetyStatus = true;
}
}
if (!ConfigHelper.Config.Get("Device_Disable_DoorSafeCheck", false))
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!