Commit 3ca007c1 张东亮

添加料串门光栅处理方式配置

1 个父辈 0145d73d
......@@ -624,6 +624,10 @@ namespace DeviceLibrary
bool lastSafeCheckStatus = true;
bool lastStringSafetyStatus = true;
/// <summary>
/// 料串门光栅触发处理方式
/// </summary>
int stringdoorSafetyProcStrategy = ConfigAppSettings.GetValue("StringDoor_SafetyLightCurtainsProcStrategy", 1, "料串门光栅触发处理方式:0-设备急停;1-仅料串门停止");
bool SafeCheck()
{
bool ok = true;
......@@ -648,18 +652,23 @@ namespace DeviceLibrary
lastStringSafetyStatus = false;
StringDoor.Pause();
}
ok = false;
DeviceSuddenStop();
if (stringdoorSafetyProcStrategy == 0)
{
ok = false;
DeviceSuddenStop();
}
}
else if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.HIGH))
{
if(stringdoorSafetyProcStrategy==1)
{
if (!lastStringSafetyStatus)
{
StringDoor.ResumeSingle();
lastStringSafetyStatus = true;
}
}
}
//else if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.HIGH))
//{
// if (!lastStringDoorSafetyStatus)
// {
// StringDoor.ResumeSingle();
// lastStringDoorSafetyStatus = true;
// }
//}
}
if (!ConfigHelper.Config.Get("Device_Disable_DoorSafeCheck", false))
{
......
......@@ -72,6 +72,8 @@ namespace DeviceLibrary
/// </summary>
void needEnter(NodeStatus nodeStatus)
{
if (!UseAgv())
return;
if (nodeStatus.Equals(NodeStatus.NeedEnter) ||
nodeStatus.Equals(NodeStatus.NeedEnter_Empty) ||
nodeStatus.Equals(NodeStatus.NeedEnter_Full))
......@@ -91,6 +93,8 @@ namespace DeviceLibrary
/// </summary>
void needLeave(NodeStatus nodeStatus)
{
if (!UseAgv())
return;
if (nodeStatus.Equals(NodeStatus.NeedLeave) ||
nodeStatus.Equals(NodeStatus.NeedLeave_Full) ||
nodeStatus.Equals(NodeStatus.NeedLeave_Empty))
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!