Commit 06f42489 几米阳光

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

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