Commit 148e3fdb 张东亮

存储机构-0601最新

1 个父辈 56ad2460
...@@ -97,14 +97,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,14 +97,14 @@ namespace OnlineStore.DeviceLibrary
string inputConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input); string inputConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input);
InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(1, DeviceType.InputEquip, inputConfigPath); InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(1, DeviceType.InputEquip, inputConfigPath);
inputConfig.CID = CID;
inputConfig.SetIO(1); inputConfig.SetIO(1);
allConfigMap.Add(1, inputConfig); allConfigMap.Add(1, inputConfig);
string boxPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box); string boxPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box);
BoxEquip_Config boxConfig = CSVConfigReader.LoadBoxConfig(2, DeviceType.BoxEquip, boxPath); BoxEquip_Config boxConfig = CSVConfigReader.LoadBoxConfig(2, DeviceType.BoxEquip, boxPath);
boxConfig.SetIO(2); boxConfig.SetIO(2);
boxConfig.CID = CID;
allConfigMap.Add(2, boxConfig); allConfigMap.Add(2, boxConfig);
//加载点位 //加载点位
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_BoxPosition); string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_BoxPosition);
......
...@@ -136,6 +136,106 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,6 +136,106 @@ namespace OnlineStore.DeviceLibrary
public bool IsNG { get; set; } = false; public bool IsNG { get; set; } = false;
public string NgMsg { get; set; } = ""; public string NgMsg { get; set; } = "";
public int GetPosType()
{
int startP = 0;
if (String.IsNullOrEmpty(PosId))
{
return 0;
}
if (PosId.Contains("AA"))
{
startP = 1;
}
else if (PosId.Contains("BB"))
{
startP = 2;
}
return startP;
}
/// <summary>
/// 库位在存储机构哪个面
/// 0=未知,1=A面,2=B面
/// 例:05AA03040102
// 05:表示料仓编号,01-08
// AA:存储机构A面或B面,AA或者BB
// 03:表示抽屉在第几行
// 04:表示抽屉在第几列
// 01:表示在抽屉中的第几行
//02:表示在抽屉中的第几列
/// </summary>
public string PosSide
{
get
{
if (PosId.Substring(2, 2).Equals("AA")) return "A";
else if (PosId.Substring(2, 2).Equals("BB")) return "B";
return "";
}
}
/// <summary>
/// 检查库位是否存在
/// </summary>
/// <returns></returns>
public bool CheckPosition()
{
BoxPosition position = CSVPositionReader<BoxPosition>.GetPositon(PosId);
if (position == null)
{
return false;
}
return true;
}
/// <summary>
/// 获取料盘所在料屉的层序号
/// </summary>
/// <returns></returns>
public int GetTrayRow()
{
int.TryParse(PosId.Substring(4, 2), out int result);
return result;
}
/// <summary>
/// 获取料盘所在料屉的列序号
/// </summary>
/// <returns></returns>
public int GetTrayColumn()
{
int.TryParse(PosId.Substring(6, 2), out int result);
return result;
}
/// <summary>
/// 获取料盘在抽屉里的行
/// </summary>
/// <returns></returns>
public int GetRowInTray()
{
int.TryParse(PosId.Substring(8, 2), out int result);
return result;
}
/// <summary>
/// 获取料盘在抽屉里的列
/// </summary>
/// <returns></returns>
public int GetColumnInTray()
{
int.TryParse(PosId.Substring(10, 2), out int result);
return result;
}
/// <summary>
/// 拷贝一个新的实例
/// </summary>
/// <returns></returns>
public InOutPosInfo ToCopy()
{
InOutPosInfo posInfo = new InOutPosInfo();
System.Reflection.PropertyInfo[] info1 = posInfo.GetType().GetProperties();
System.Reflection.PropertyInfo[] info2 = this.GetType().GetProperties();
for (int i = 0; i < info1.Length; i++)
info1[i].SetValue(posInfo, info2[i].GetValue(this));
return posInfo;
}
} }
/// <summary> /// <summary>
/// 出入库位置信息 /// 出入库位置信息
......
...@@ -37,8 +37,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -37,8 +37,8 @@ namespace OnlineStore.DeviceLibrary
if (CurrShelf.ShelfState.Equals(3)) if (CurrShelf.ShelfState.Equals(3))
{ {
bool agvcallresult = AgvClient.NeedLeave(AgvName, CurrShelf.ShelfRfid, ClientLevel.High); bool agvcallresult = AgvClient.NeedLeave(AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
LogUtil.info(Name+ "StartInstore 失败,料串" + CurrShelf.ToStr()+ "需要离开,NeedLeave:" + AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString()); LogUtil.info(Name + "StartInstore 失败,料串" + CurrShelf.ToStr() + "需要离开,NeedLeave:" + AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
return false ; return false;
} }
if (Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH)) if (Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{ {
...@@ -160,13 +160,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -160,13 +160,13 @@ namespace OnlineStore.DeviceLibrary
if (CurrShelf.ShelfRfid.EndsWith("00")) if (CurrShelf.ShelfRfid.EndsWith("00"))
{ {
SendInShelfLeave(" 料串号【" + CurrShelf.ShelfRfid + "】无效 "); SendInShelfLeave(" 料串号【" + CurrShelf.ShelfRfid + "】无效 ");
} }
else else
{ {
IB07_AxisUpMove(); IB07_AxisUpMove();
} }
} }
} }
else else
{ {
...@@ -449,13 +449,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -449,13 +449,13 @@ namespace OnlineStore.DeviceLibrary
{ {
if (ShelfNeedLeave) if (ShelfNeedLeave)
{ {
SendOutShelfLeave("手动送料串离开"); SendOutShelfLeave("手动送料串离开");
} }
else else
{ {
MoveInfo.NextMoveStep(StepEnum.IS11_ShelfReady); MoveInfo.NextMoveStep(StepEnum.IS11_ShelfReady);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
} }
} }
else if (MoveInfo.IsStep(StepEnum.IS12_AxisDown)) else if (MoveInfo.IsStep(StepEnum.IS12_AxisDown))
{ {
...@@ -501,7 +501,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -501,7 +501,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
} }
internal void NewReelOut(InOutPosInfo posInfo,string xnRfid="") internal void NewReelOut(InOutPosInfo posInfo, string xnRfid = "")
{ {
UpdateShelf(2, xnRfid); UpdateShelf(2, xnRfid);
MoveInfo.NextMoveStep(StepEnum.IS12_AxisDown); MoveInfo.NextMoveStep(StepEnum.IS12_AxisDown);
...@@ -748,7 +748,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -748,7 +748,7 @@ namespace OnlineStore.DeviceLibrary
string configStr = ""; string configStr = "";
if (EquipType.Equals(1)) if (EquipType.Equals(1))
{ {
configStr = Setting_Init.AShelfInfo; configStr = Setting_Init.AShelfInfo;
} }
else else
{ {
...@@ -769,7 +769,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -769,7 +769,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
RFIDData rfidD = RFIDManager.ReadRFID(RfidIP); RFIDData rfidD = RFIDManager.ReadRFID(RfidIP);
CurrShelf = new ShelfInfo(rfidD.StrData, state, xnRfid); CurrShelf = new ShelfInfo(rfidD.StrData, state, xnRfid);
BufferDataManager.SaveData<ShelfInfo>(configStr, CurrShelf); BufferDataManager.SaveData<ShelfInfo>(configStr, CurrShelf);
LogUtil.info(Name + "当前料串信息:" + CurrShelf.ToStr()); LogUtil.info(Name + "当前料串信息:" + CurrShelf.ToStr());
...@@ -786,9 +786,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -786,9 +786,10 @@ namespace OnlineStore.DeviceLibrary
} }
} }
public class ShelfInfo { public class ShelfInfo
{
public ShelfInfo (string rfid="",int state = 0,string xnrfid = "") public ShelfInfo(string rfid = "", int state = 0, string xnrfid = "")
{ {
this.ShelfRfid = rfid; this.ShelfRfid = rfid;
this.ShelfState = state; this.ShelfState = state;
...@@ -797,11 +798,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -797,11 +798,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 料串RFID /// 料串RFID
/// </summary> /// </summary>
public string ShelfRfid = ""; public string ShelfRfid = "";
/// <summary> /// <summary>
/// 料串状态,0=未开始,1=入库,2=出库中,3=需要离开 /// 料串状态,0=未开始,1=入库,2=出库中,3=需要离开
/// </summary> /// </summary>
public int ShelfState =0; public int ShelfState = 0;
public string XuniRfid = ""; public string XuniRfid = "";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!