Commit 3b0cd387 LN

调整料架进出逻辑

1 个父辈 2ae1c884
......@@ -445,6 +445,30 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType)
{
}
#region 出库
public override bool StartOutStoreMove(InOutParam param)
{
return true;
}
protected override void OutStoreProcess()
{
}
#endregion
#region 入库
public override void StartInStoreMove(InOutParam param)
{
}
protected override void InStoreProcess()
{
}
#endregion
}
}
\ No newline at end of file
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
partial class PackingStoreBean
{
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType)
{
}
protected override void ReturnHomeProcess()
{
}
#region 出库
public override bool StartOutStoreMove(InOutParam param)
{
return true;
}
protected override void OutStoreProcess()
{
}
#endregion
#region 入库
public override void StartInStoreMove(InOutParam param)
{
}
protected override void InStoreProcess()
{
}
#endregion
}
}
\ No newline at end of file
......@@ -160,7 +160,7 @@ namespace OnlineStore.DeviceLibrary
LOGGER.Error("出错:", ex);
}return false;
}
public static bool LoadInoutParam(InOutParam param, AC_BOX_Bean box)
public static bool LoadInoutParam(InOutParam param, bool needCheckShelf, AC_BOX_Bean box)
{
if (param == null)
{
......@@ -177,16 +177,18 @@ namespace OnlineStore.DeviceLibrary
return false;
}
ShelfPosition sp = CSVPositionReader<ShelfPosition>.GetPositon(param.ShelfPosID);
if (sp == null)
if (sp == null&&needCheckShelf)
{
LogUtil.error(box.Name + "GetPositon[" + param.ShelfPosID + "]=null,没有库位不能执行出入库");
return false;
}
p.InOut_P101 = sp.InoutAxis_P101;
p.UpDown_LP101 = sp.UpDownAxis_LP101;
p.UpDown_HP102 = sp.UpDownAxis_HP102;
p.Middle_P101 = sp.MiddleAxis_P101;
if (sp != null)
{
p.InOut_P101 = sp.InoutAxis_P101;
p.UpDown_LP101 = sp.UpDownAxis_LP101;
p.UpDown_HP102 = sp.UpDownAxis_HP102;
p.Middle_P101 = sp.MiddleAxis_P101;
}
p.ComPress_P1 = box.Config.CompAxis_P1_Position;
p.InOut_P1 = box.Config.InOutAxis_P1_Position;
......
......@@ -68,10 +68,8 @@
<ItemGroup>
<Compile Include="ACPackingStore\AC_BOX_Bean.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Partial.cs" />
<Compile Include="ACPackingStore\AC_BOX_Bean_Shelf.cs" />
<Compile Include="ACPackingStore\HumitureBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean.cs" />
<Compile Include="ACPackingStore\PackingStoreBean_Partial.cs" />
<Compile Include="ACPackingStore\StoreManager.cs" />
<Compile Include="agvClient\AgvClient.cs" />
<Compile Include="device\halcon\CodeManager.cs" />
......
......@@ -129,6 +129,6 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
,,,,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,CameraName,,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.101,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
......@@ -128,7 +128,7 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM2,,,,,,,
,,,,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,CameraName,,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.102,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,,
......@@ -83,7 +83,7 @@ namespace OnlineStore.DeviceLibrary
boxBean.LogInfo("自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
boxBean.Reset(false);
autoMsg = "自动出库:" + posid;
boxBean.AddWaitOutInfo(new InOutParam("", posid, shelfPosId));
boxBean.waitOutStoreList.Enqueue(new InOutParam("", posid, shelfPosId));
}
else
{
......@@ -119,7 +119,7 @@ namespace OnlineStore.DeviceLibrary
boxBean.LogInfo("自动进入下一个入库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中");
boxBean.Reset(false);
autoMsg = "自动入库:" + posid;
boxBean.AddWaitOutInfo(new InOutParam("AAAA", posid, shelfPosId));
boxBean.waitOutStoreList.Enqueue(new InOutParam("AAAA", posid, shelfPosId));
}
else
{
......
......@@ -34,7 +34,7 @@ namespace OnlineStore.DeviceLibrary
MoveP = null;
IsSolderPaste = false;
}
public InOutParam(string wareNo, string posId,string plateH,string plateW, string ShelfPosID="")
public InOutParam(string wareNo, string posId,string plateH,string plateW, string ShelfPosID )
{
this.ShelfPosID = ShelfPosID;
WareCode = wareNo;
......@@ -50,6 +50,8 @@ namespace OnlineStore.DeviceLibrary
PosID = posId;
MoveP = linePosition;
IsSolderPaste = false;
NeedEnterShelf = false;
NeedOutShelf = false;
}
/// <summary>
/// 物品二维码信息
......
......@@ -67,8 +67,7 @@ namespace OnlineStore.DeviceLibrary
/// 是否没有检测到气压
/// </summary>
public bool isNoAirCheck = false;
//protected int NeedCheckSafetyLight = 0;
/// <summary>
/// 是否再报警中
/// </summary>
......@@ -142,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
isInPro = false;
break;
case StoreMoveType.ReturnHome:
ReturnHomeProcess();
ResetProcess();
isInPro = false;
break;
case StoreMoveType.StoreReset:
......@@ -226,10 +225,7 @@ namespace OnlineStore.DeviceLibrary
/// 重置处理
/// </summary>
protected abstract void ResetProcess();
/// <summary>
/// 原点返回处理
/// </summary>
protected abstract void ReturnHomeProcess();
/// <summary>
/// 松下伺服轴原点返回运动,等待收到反馈后才会返回
......@@ -474,7 +470,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 阻塞等待IO信号,等到返回true,未等到返回false
/// </summary>c
public bool WaitIo(string ioType, IO_VALUE value, int timeOut, string errName = "")
protected bool WaitIo(string ioType, IO_VALUE value, int timeOut, string errName = "")
{
return WaitUtil.Wait(timeOut, delegate () {
return value.Equals(IOValue(ioType));
......@@ -484,6 +480,12 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.info(Name + logInfo);
}
protected void InOutStoreLog(string msg)
{
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
string shelfId = MoveInfo.MoveParam != null ? "_" + MoveInfo.MoveParam.ShelfPosID : "_";
LogInfo("[" + posId + shelfId + "]" + MoveInfo.MoveStep + ":" + msg);
}
protected int GetAlarmCodeByAxis(ConfigMoveAxis axis)
{
int alarmCode = LineAlarm.InOutAxisAlarm;
......
......@@ -64,7 +64,7 @@ namespace OnlineStore.LoadCSVLibrary
{
if (String.IsNullOrEmpty(ProType) || String.IsNullOrEmpty(ProName) || String.IsNullOrEmpty(ProValue))
{
throw new CVSFieldNotMatchingExection(ToString() + ",【类型:ProType】【名称:ProName】【属性值:ProVale】必须配置值!");
throw new CVSFieldNotMatchingExection(ToString() + ",【类型】【名称】【属性值】必须配置值!");
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!