Commit 120633de LN

1

1 个父辈 3315e408
......@@ -129,17 +129,17 @@ namespace OnlineStore.DeviceLibrary
public static bool SetToNone(string id, string shelfId = "")
{
ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{
SetStatus(id, shelfId, ClientAction.None);
return true;
}
return false;
}
public static bool NeedEnter(string id, string shelfId = "")
public static bool NeedEnter(string id, string shelfId="")
{
ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{
SetStatus(id, shelfId, ClientAction.NeedEnter);
return true;
......@@ -148,28 +148,27 @@ namespace OnlineStore.DeviceLibrary
}
public static bool NeedLeave(string id, string shelfId="")
{
ClientAction currA = GetAction(id);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.FinishLeave) || currA.Equals(ClientAction.FinishEnter) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{
SetStatus(id, shelfId, ClientAction.NeedLeave);
return true;
}
return false;
}
internal static void MayEnter(string NodeName, string shelfId = "")
{
SetStatus(NodeName, shelfId, ClientAction.MayEnter, ClientLevel.High);
}
internal static void FinishEnter(string NodeName, string shelfId = "")
{
SetStatus(NodeName, shelfId, ClientAction.FinishEnter, ClientLevel.High);
}
//internal static void MayEnter(string NodeName, string shelfId = "")
//{
// SetStatus(NodeName, shelfId, ClientAction.MayEnter, ClientLevel.High);
//}
//internal static void FinishEnter(string NodeName, string shelfId = "")
//{
// SetStatus(NodeName, shelfId, ClientAction.FinishEnter, ClientLevel.High);
//}
internal static void MayLeave(string NodeName, string shelfId = "")
{
SetStatus(NodeName, shelfId, ClientAction.MayLeave, ClientLevel.High);
}
//internal static void MayLeave(string NodeName, string shelfId = "")
//{
// SetStatus(NodeName, shelfId, ClientAction.MayLeave, ClientLevel.High);
//}
private static bool isLog = ConfigAppSettings.GetIntValue(Setting_Init.Agv_Log_Open).Equals(1);
private static void AgvClient_Log(string s)
......
......@@ -102,6 +102,9 @@ namespace OnlineStore.DeviceLibrary
{
LogInfo("复位前,清理出库高度:" + OutStoreHeight);
}
//复位时设置状态为none
AgvClient.SetStatus(Config.AgvInName);
AgvClient.SetStatus(Config.AgvOutName);
OutStoreHeight = -1;
//OutStoreCount = 0;
......@@ -673,7 +676,7 @@ namespace OnlineStore.DeviceLibrary
if (IOValue(IO_Type.SL_Out_Check).Equals(IO_VALUE.HIGH))
{
LogUtil.info(logName+"开始");
AgvClient.MayLeave(Config.AgvOutName);
AgvClient.SetStatus(Config.AgvOutName,"",ClientAction.MayLeave,ClientLevel.High);
ProcessShelfOut = true;
//出口阻挡下降,出口线体转动
IOMove(IO_Type.SL_Out_StopDown, IO_VALUE.HIGH);
......@@ -697,7 +700,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate
{
Thread.Sleep(10000);
AgvClient.SetStatus(Config.AgvOutName, "", ClientAction.None);
AgvClient.SetStatus(Config.AgvOutName, "", ClientAction.None, ClientLevel.High);
});
ProcessShelfOut = false;
LogUtil.info(logName + " 结束");
......@@ -728,7 +731,7 @@ namespace OnlineStore.DeviceLibrary
if (IOValue(IO_Type.SL_Entry_Check).Equals(IO_VALUE.LOW))
{
LogUtil.info(logName+ " 开始");
AgvClient.MayEnter(Config.AgvInName);
AgvClient.SetStatus(Config.AgvInName,"",ClientAction.MayEnter,ClientLevel.High);
ProcessShelfEnter = true;
////进料阻挡上升
//IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);
......@@ -751,11 +754,11 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(3000);
IOMove(IO_Type.SL_Line_Run, IO_VALUE.LOW);
//料架可离开
AgvClient.FinishEnter(Config.AgvInName);
AgvClient.SetStatus(Config.AgvInName,"",ClientAction.FinishEnter,ClientLevel.High);
Task.Factory.StartNew(delegate
{
Thread.Sleep(10000);
AgvClient.SetStatus(Config.AgvInName, "", ClientAction.None);
AgvClient.SetStatus(Config.AgvInName, "", ClientAction.None, ClientLevel.High);
});
ProcessShelfEnter = false;
LogUtil.info(logName + " 结束");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!