Commit 78ddea8c 张东亮

1

1 个父辈 41f0bdef

using Asa;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
......@@ -146,6 +147,7 @@ namespace OnlineStore.DeviceLibrary
case MoveStep.Feeder_H_LineRun:
LogUtil.info(Name + " 复位完成");
MoveInfo.EndMove();
AgvClient.SetCancelState(false);
runStatus = RunStatus.Runing;
break;
default: break;
......@@ -236,7 +238,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (runStatus.Equals(RunStatus.Runing))
{
//InLineTimerProcess();
InLineTimerProcess();
OutLineTimerProcess();
TranverseTimerProcess();
......@@ -260,9 +262,56 @@ namespace OnlineStore.DeviceLibrary
private Stopwatch ol_noshelfWatch = new Stopwatch();
private Stopwatch ol_noshelfWatch1 = new Stopwatch();
private Stopwatch il_outstopCheckWarch = new Stopwatch();
private DateTime ol_lastSendShelfTime = DateTime.Now;
private int StopDownMS = 1500;
/// <summary>
/// 入料线体定时处理
/// </summary>
private void InLineTimerProcess()
{
TimeSpan span = DateTime.Now - il_lastCallAgvTime;
//出口有料架,需要通知agv取走料架
//每次叫小车时间间隔3分钟?
//出口信号需要持续1秒钟
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && span.TotalSeconds > 60)
{
//if (LastOutShelfId.Equals("000").Equals(false))
{
if (LineManager.checkWatch(il_outstopCheckWarch, 1000))
{
il_lastCallAgvTime = DateTime.Now;
//StopIOMove(IO_Type.InL_OutStopDown, StopDownMS);
LogUtil.info(" 退料2线体出口有料架" + LastOutShelfId + ",呼叫agv小车[" + Config.L2_AgvName + "] [NeedLeave] ");
AgvClient.NeedLeave(Config.L2_AgvName, LastOutShelfId);
}
}
}
else if (span.TotalMilliseconds > StopDownMS)
{
il_outstopCheckWarch.Stop();
ClientAction currA = AgvClient.GetAction(Config.L2_AgvName);
if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
{
if (IOManager.IOValue(IO_Type.L1_StopDown).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.L1_StopDown, IO_VALUE.LOW);
}
}
}
//如果是出口无料架,NeedLeave状态,改为None
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW) && AgvClient.GetAction(Config.L2_AgvName).Equals(ClientAction.NeedLeave))
{
il_outstopCheckWarch.Stop();
LogUtil.info(" 分盘2线体出口无料架 ,更改[" + Config.L2_AgvName + "] 状态[None] ");
AgvClient.SetToNone(Config.L2_AgvName, "");
}
}
/// <summary>
/// 出料线体定时处理
/// </summary>
private void OutLineTimerProcess()
......@@ -306,7 +355,15 @@ namespace OnlineStore.DeviceLibrary
IOManager.CIOMove(IO_Type.L1_StopDown, IO_VALUE.LOW);
IOManager.CIOMove(IO_Type.L1_OutStopDown, IO_VALUE.LOW);
}
//如果入口无料架即可进入
if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW))
{
AgvClient.NeedEnter(Config.L1_AgvName, "");
}
else
{
AgvClient.SetToNone(Config.L1_AgvName, "");
}
}
private Task TranverseTask;
private static void TranverseProcess()
......
......@@ -93,7 +93,7 @@ namespace OnlineStore.DeviceLibrary
{
Task.Factory.StartNew(delegate
{
// SetStatus(id, "", ClientAction.MayEnter);
SetStatus(id, "", ClientAction.MayEnter);
LogUtil.info(logName + " ,等待OutL_InCheck");
try
{
......@@ -133,7 +133,7 @@ namespace OnlineStore.DeviceLibrary
LineManager.feederLine.UpdateSleep(false);
LineManager.feederLine.StopIOMove(IO_Type.L2_OutStopDown, 1500);
//agvClient.MayLeave(id);
// SetStatus(id, shefId, ClientAction.MayLeave);
SetStatus(id, shefId, ClientAction.MayLeave);
LogUtil.info(logName + "下降 L2_OutStopDown , " + shefId);
Task.Factory.StartNew(delegate
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!