Commit 148e3fdb 张东亮

存储机构-0601最新

1 个父辈 56ad2460
......@@ -97,14 +97,14 @@ namespace OnlineStore.DeviceLibrary
string inputConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input);
InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(1, DeviceType.InputEquip, inputConfigPath);
inputConfig.CID = CID;
inputConfig.SetIO(1);
allConfigMap.Add(1, inputConfig);
string boxPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box);
BoxEquip_Config boxConfig = CSVConfigReader.LoadBoxConfig(2, DeviceType.BoxEquip, boxPath);
boxConfig.SetIO(2);
boxConfig.CID = CID;
allConfigMap.Add(2, boxConfig);
//加载点位
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_BoxPosition);
......
......@@ -136,6 +136,106 @@ namespace OnlineStore.DeviceLibrary
public bool IsNG { get; set; } = false;
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>
/// 出入库位置信息
......
......@@ -37,8 +37,8 @@ namespace OnlineStore.DeviceLibrary
if (CurrShelf.ShelfState.Equals(3))
{
bool agvcallresult = AgvClient.NeedLeave(AgvName, CurrShelf.ShelfRfid, ClientLevel.High);
LogUtil.info(Name+ "StartInstore 失败,料串" + CurrShelf.ToStr()+ "需要离开,NeedLeave:" + AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
return false ;
LogUtil.info(Name + "StartInstore 失败,料串" + CurrShelf.ToStr() + "需要离开,NeedLeave:" + AgvName + "," + CurrShelf.ShelfRfid + ",agvcallresult:" + agvcallresult.ToString());
return false;
}
if (Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.HIGH) && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{
......@@ -501,7 +501,7 @@ namespace OnlineStore.DeviceLibrary
#endregion
}
internal void NewReelOut(InOutPosInfo posInfo,string xnRfid="")
internal void NewReelOut(InOutPosInfo posInfo, string xnRfid = "")
{
UpdateShelf(2, xnRfid);
MoveInfo.NextMoveStep(StepEnum.IS12_AxisDown);
......@@ -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.ShelfState = state;
......@@ -801,7 +802,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 料串状态,0=未开始,1=入库,2=出库中,3=需要离开
/// </summary>
public int ShelfState =0;
public int ShelfState = 0;
public string XuniRfid = "";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!