Commit 06f42489 几米阳光

出库等待改为可以配置。叉子伸出时判断门口没有料盘

1 个父辈 90ec3dc4
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
<add key ="AI_ConvertPosition" value ="55"/> <add key ="AI_ConvertPosition" value ="55"/>
<add key ="InOutDefaultPosition" value ="3000"/> <add key ="InOutDefaultPosition" value ="3000"/>
<add key ="Config_Pwd" value ="123456"/> <add key ="Config_Pwd" value ="123456"/>
<!--出库等待料盘拿走的时间,秒-->
<add key ="OutStoreWaitSeconds" value ="600"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -7,13 +7,10 @@ ...@@ -7,13 +7,10 @@
20181107 20181107
1.出库时等待10秒钟,或等待拿走料盘(高度=0)才算出库结束 1.出库时等待10秒钟,或等待拿走料盘(高度=0)才算出库结束
20181108 20181108
// 机器状态 顶灯显示 // 机器状态 顶灯显示
// 绿 黄 红 // 绿 黄 红
//机器复位中 闪 灭 灭 //机器复位中 闪 灭 灭
...@@ -25,10 +22,16 @@ ...@@ -25,10 +22,16 @@
//机器设备故障(非温湿度)报警 亮 灭 闪 //机器设备故障(非温湿度)报警 亮 灭 闪
20181115 20181115
界面显示增加密码框 界面显示增加密码框
旋转轴和升降轴移动时,叉子需要在待机位 旋转轴和升降轴移动时,叉子需要在待机位
20181128
1.出库时叉子伸出门之前先判断门口没有料盘。
2.出库等待盘拿走的时间改为可以配置,LDACSingleStore.exe.config增加配置:
<!--出库等待料盘拿走的时间,秒-->
<add key ="OutStoreWaitSeconds" value ="600"/>
......
...@@ -71,5 +71,9 @@ namespace OnlineStore.Common ...@@ -71,5 +71,9 @@ namespace OnlineStore.Common
public static string InOutDefaultPosition = "InOutDefaultPosition"; public static string InOutDefaultPosition = "InOutDefaultPosition";
public static string Config_Pwd = "Config_Pwd"; public static string Config_Pwd = "Config_Pwd";
/// <summary>
/// 出库等待料盘拿走的时间,秒
/// </summary>
public static string OutStoreWaitSeconds = "OutStoreWaitSeconds";
} }
} }
...@@ -11,7 +11,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -11,7 +11,8 @@ namespace OnlineStore.DeviceLibrary
/// 0132h 原点接近传感器输入 (HOME) 状态 ReadOnly 0: 输入 OFF 1: 输入 ON /// 0132h 原点接近传感器输入 (HOME) 状态 ReadOnly 0: 输入 OFF 1: 输入 ON
/// </summary> /// </summary>
public static string Home_Single = "0132"; public static string Home_Single = "0132";
// 0022h 负方向驱动禁止输入(NOT) ReadOnly 0: 输入 OFF、 1: 输入 ON
// 0023h 正方向驱动禁止输入(POT) ReadOnly 0: 输入 OFF、 1: 输入 ON
/// <summary> /// <summary>
///速度 4601 ///速度 4601
/// </summary> /// </summary>
......
...@@ -181,11 +181,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -181,11 +181,13 @@ namespace OnlineStore.DeviceLibrary
#region 流水线逻辑判断 #region 流水线逻辑判断
public static bool IsMoveEnd(int slvAddr,DateTime time) public static bool IsMoveEnd(int slvAddr,DateTime time, out ShuoKeInfo shuokeInfo)
{ {
shuokeInfo = null;
if (shuokeMap.ContainsKey(slvAddr)) if (shuokeMap.ContainsKey(slvAddr))
{ {
ShuoKeInfo info = shuokeMap[slvAddr]; ShuoKeInfo info = shuokeMap[slvAddr];
shuokeInfo = info;
if (info.IsInMove == 0 && info.UpdateTime > time) if (info.IsInMove == 0 && info.UpdateTime > time)
{ {
return true; return true;
...@@ -193,11 +195,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -193,11 +195,13 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
public static bool IsHomeMoveEnd(int slvAddr, DateTime time) public static bool IsHomeMoveEnd(int slvAddr, DateTime time,out ShuoKeInfo shuokeInfo)
{ {
shuokeInfo = null;
if (shuokeMap.ContainsKey(slvAddr)) if (shuokeMap.ContainsKey(slvAddr))
{ {
ShuoKeInfo info = shuokeMap[slvAddr]; ShuoKeInfo info = shuokeMap[slvAddr];
shuokeInfo = info;
if (info.IsInMove == 0 && info.UpdateTime > time&&info.Org==0) if (info.IsInMove == 0 && info.UpdateTime > time&&info.Org==0)
{ {
return true; return true;
...@@ -487,5 +491,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -487,5 +491,10 @@ namespace OnlineStore.DeviceLibrary
public int En { get; set; } public int En { get; set; }
public DateTime UpdateTime { get; set; } public DateTime UpdateTime { get; set; }
public string ToShowStr()
{
return "运动[" + IsInMove + "]左限位[" + LLimit + "]右限位[" + RLimit + "]原点[" + Org + "]使能[" + En + "]["+UpdateTime.ToShortTimeString()+"]";
}
} }
} }
...@@ -173,16 +173,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -173,16 +173,25 @@ namespace OnlineStore.DeviceLibrary
} }
else if (wait.WaitType == 5) else if (wait.WaitType == 5)
{ {
ShuoKeInfo info = null;
if (wait.IsHomeMove) if (wait.IsHomeMove)
{ {
wait.IsEnd = ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime); wait.IsEnd = ShuoKeControls.IsHomeMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime,out info);
} }
else else
{ {
wait.IsEnd = ShuoKeControls.IsMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime); wait.IsEnd = ShuoKeControls.IsMoveEnd(wait.SlvAddr, StoreMove.LastSetpTime, out info);
} }
if (!wait.IsEnd) if (!wait.IsEnd)
{ {
if (info == null) {
NotOkMsg += "info=null;";
} else
{
NotOkMsg += "" +info.ToShowStr();
}
ShuoKeControls.GetStatus(wait.SlvAddr); ShuoKeControls.GetStatus(wait.SlvAddr);
} }
} }
...@@ -637,6 +646,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -637,6 +646,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
//此处需要等待box门口没有盘 //此处需要等待box门口没有盘
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
//打开舱门 //打开舱门
OpenDoorAndWait(); OpenDoorAndWait();
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_2, IO_VALUE.LOW)); //StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_2, IO_VALUE.LOW));
...@@ -692,9 +702,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -692,9 +702,15 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack)
{ {
int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
if (OutStoreWaitSeconds <= 0)
{
OutStoreWaitSeconds = 600;
}
int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake); StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake);
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待600000"); OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待"+OutStoreWaitSeconds+"秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(600000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW)); //StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0)); StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true; StoreMove.OneWaitCanEndStep = true;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!