Commit ec655f8a 几米阳光

出料逻辑修改。

1 个父辈 e1ba4c05
......@@ -14,7 +14,7 @@ namespace OnlineStore.AutoInOutStore
{
public class ResourceCulture
{
public static bool ShowLog = true ;
public static bool ShowLog = false ;
public static string China = "zh-CN";
public static string English = "en-US";
public static string German = "ge-DE";
......
......@@ -198,10 +198,11 @@ IO模块读取时间改为可配置。
BUG需要修改:
吸盘吸料过程中需要一直检测吸盘气压信号
门锁未关闭时不能点关闭门锁。
......
......@@ -16,7 +16,8 @@ namespace OnlineStore.DeviceLibrary
private static bool IsStop = false;
private static System.Timers.Timer checkTimer = null;
private static string TargetIoType = IO_Type.TrayCheck_LoadMaterial;
public static bool StartCheck(string targetIo)
private static IO_VALUE TargetIoValue = IO_VALUE.HIGH;
public static bool StartCheck(string targetIo, IO_VALUE value = IO_VALUE.HIGH)
{
if (checkTimer == null)
{
......@@ -26,8 +27,9 @@ namespace OnlineStore.DeviceLibrary
checkTimer.Elapsed += CheckTimer_Elapsed;
checkTimer.Enabled = false;
}
TargetIoValue = value;
TargetIoType = targetIo;
checkTimer.Start();
checkTimer.Start();
return true;
}
......@@ -46,9 +48,9 @@ namespace OnlineStore.DeviceLibrary
if (IsInProcess) { return; }
IsInProcess = true;
bool result = false;
if (IOManager.IOValue(TargetIoType).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(TargetIoType).Equals(TargetIoValue))
{
LogUtil.info("批量上料轴,检测到【" + TargetIoType + "】信号,可以停止运动");
LogUtil.info("批量上料轴,检测到 " + TargetIoType + "="+TargetIoValue+",可以停止运动");
result = true;
}
else if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH))
......
......@@ -262,9 +262,9 @@ namespace OnlineStore.DeviceLibrary
public static bool BatchAxisIsEnd(WaitResultInfo wait,TimeSpan startSpan)
{
bool result = false;
if (IOManager.IOValue(wait.IoType).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(wait.IoType).Equals(wait.IoValue))
{
LogUtil.debug(wait.ToStr() + " 检测到【" + wait.IoType + "】信号,可以停止运动");
LogUtil.debug(wait.ToStr() + " 检测到 " + wait.IoType + "="+wait.IoValue+",可以停止运动");
result = true;
}
else if (IOManager.IOValue(IO_Type.BatchAxis_Limit).Equals(IO_VALUE.HIGH))
......@@ -567,32 +567,37 @@ namespace OnlineStore.DeviceLibrary
{
map.Add(ParamDefine.doorStatus, ResourceControl.GetString(ResourceControl.doorOpen, "Doorlock open"));
}
if ( IsWaitTragGo && ( IsGetTrayGo.Equals(false)))
if (IsWaitTragGo && (IsGetTrayGo.Equals(false)))
{
map[ParamDefine.confirmReelOut] = ParamDefine.enable;
}
else if ( CanOpenBatchDoor())
else if (CanOpenBatchDoor())
{
if ( DoorStatus.Equals(2))
if (DoorStatus.Equals(2))
{
if ( BatchOutStoreCount > 0)
if (BatchOutStoreCount > 0)
{
map[ParamDefine.takeOutReel] = ParamDefine.enable;
}
else
{
map[ParamDefine.openLock] = ParamDefine.enable;
map[ParamDefine.openLock] = ParamDefine.enable;
map[ParamDefine.singleReelIn] = ParamDefine.enable;
}
}
else
else if(IOManager.IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.HIGH))
{
map[ParamDefine.closeLock] = ParamDefine.enable;
map[ParamDefine.startBatchIn] = ParamDefine.enable;
}
}
else if (DoorStatus.Equals(1) && StoreMove.MoveType.Equals(StoreMoveType.OutStore) && IOManager.IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.HIGH))
{
//出库过程中 可以关门
map[ParamDefine.closeLock] = ParamDefine.enable;
}
return map;
}
......@@ -609,20 +614,20 @@ namespace OnlineStore.DeviceLibrary
return ResourceControl.GetString(ResourceControl.CnotOpen, "BUSY,open doorlock failure");
}
}
public static string doStartBatchIn()
public static string doStartBatchIn()
{
if (! DoorIsClose())
if (!DoorIsClose())
{
return ResourceControl.GetString(ResourceControl.batchInError, "Batch storing Error: Close feeding device");
return ResourceControl.GetString(ResourceControl.batchInError, "Batch storing Error: Close feeding device");
}
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
return ResourceControl.GetString(ResourceControl.batchInError2, "Batch storing Error: gripper full, check before restoring");
}
StopOutProcess();
BatchDoorClose(false);
Reset(false,true);
Reset(false, true);
return "";
}
public static string doTakeReel()
......@@ -631,7 +636,7 @@ namespace OnlineStore.DeviceLibrary
{
if (BatchOutStoreCount > 0 && BatchOutStoreHeight > 0)
{
BatchDoorOpen(false);
// BatchDoorOpen(false);
return StartOut();
//return "";
}
......
......@@ -556,22 +556,26 @@ namespace OnlineStore.DeviceLibrary
AUTO_O00_Wait=1300,
/// <summary>
/// 等待门锁打开
/// 批量轴先匀速下降到X12不亮
/// </summary>
AUTO_O01_WaitDoorOpen =1301,
AUTO_O01_BatchAxisDown=1301,
/// <summary>
/// 打开门锁
/// </summary>
AUTO_O02_WaitDoorOpen =1302,
/// <summary>
/// 等待出料检测信号关闭
/// </summary>
AUTO_O02_WaitOutSingleLow=1302,
AUTO_O03_WaitOutSingleLow=1303,
/// <summary>
/// 向上运动,等待DI12亮或者极限亮停止
/// </summary>
AUTO_O03_SpeedMove=1303,
AUTO_O04_SpeedMove=1304,
/// <summary>
/// 极限亮,返回P2点
/// </summary>
AUTO_O05_BackToP2=1304,
AUTO_O05_BackToP2=1305,
#endregion
......
......@@ -277,7 +277,7 @@ namespace OnlineStore.DeviceLibrary
/// 10=等待批量上下料轴运动 停止
/// </summary>
/// <returns></returns>
public static WaitResultInfo WaitBatchAxisStop(ConfigMoveAxis moveAxis,int targetPosition,string targetIoType)
public static WaitResultInfo WaitBatchAxisStop(ConfigMoveAxis moveAxis,int targetPosition,string targetIoType,IO_VALUE value=IO_VALUE.HIGH)
{
WaitResultInfo wait = new WaitResultInfo();
wait.TargetPosition = targetPosition;
......@@ -287,6 +287,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsHomeMove = true;
wait.IsEnd = false;
wait.IoType = targetIoType;
wait.IoValue = value;
return wait;
}
/// <summary>
......@@ -350,11 +351,11 @@ namespace OnlineStore.DeviceLibrary
}
else if (WaitType == (int)Wait_Type.WaitHeight_7)
{
return ResourceControl.GetString(ResourceControl.trayHeight,"料盘高度")+"【" + HeightValue + "】 ";
return ResourceControl.GetString(ResourceControl.trayHeight, "料盘高度") + "【" + HeightValue + "】 ";
}
else if (WaitType == (int)Wait_Type.AxisLimitNegativeSingle_8)
{
return "【" + AxisInfo.DisplayStr + "】"+ ResourceControl.GetString(ResourceControl.FuLimit, "负限位")+"【" + IoValue + "】 ";
return "【" + AxisInfo.DisplayStr + "】" + ResourceControl.GetString(ResourceControl.FuLimit, "负限位") + "【" + IoValue + "】 ";
}
else if (WaitType == (int)Wait_Type.AxisLimitPositiveSingle_9)
{
......@@ -362,20 +363,28 @@ namespace OnlineStore.DeviceLibrary
}
else if (WaitType == (int)Wait_Type.BatchAxisMove_10)
{
return ResourceControl.GetString(ResourceControl.BatchStop,"上料轴运动停止 ");
}else if (WaitType == (int)Wait_Type.ScanCode_11)
return ResourceControl.GetString(ResourceControl.BatchStop, "上料轴运动停止 ");
}
else if (WaitType == (int)Wait_Type.ScanCode_11)
{
return ResourceControl.GetString(ResourceControl.ScanOk, "扫码结束");
}
else if(WaitType == (int)Wait_Type.TakeTrayGo_12)
else if (WaitType == (int)Wait_Type.TakeTrayGo_12)
{
return ResourceControl.GetString(ResourceControl.TakeTrayGo, "操作人员拿走料盘");
if (AutomaticBaiting.WaitIoValue.Equals(IO_VALUE.HIGH))
{
return ResourceControl.GetString("操作人员放入料盘", "操作人员放入料盘");
}
else
{
return ResourceControl.GetString(ResourceControl.TakeTrayGo, "操作人员拿走料盘");
}
}
else if (WaitType == (int)Wait_Type.StoreRuning_13)
{
return ResourceControl.GetString(ResourceControl.WaitEnd, "等待送料结束");
}
else
else
{
return "WaitType=【" + WaitType + "】";
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!