Commit 8197f32d 张东亮

20220914

1 个父辈 e131aee1
...@@ -30,6 +30,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,6 +30,7 @@ namespace OnlineStore.DeviceLibrary
public XLRStore_Config Config = null; public XLRStore_Config Config = null;
private bool canStart = false; private bool canStart = false;
//public SQLite sQLite = null; //public SQLite sQLite = null;
string title = ConfigAppSettings.GetValue(Setting_Init.App_Title);
public XLRStoreBean(XLRStore_Config config, InputEquip_Config inputConfig, BoxEquip_Config boxConfig) public XLRStoreBean(XLRStore_Config config, InputEquip_Config inputConfig, BoxEquip_Config boxConfig)
{ {
equipsMap = new Dictionary<int, EquipBase>(); equipsMap = new Dictionary<int, EquipBase>();
...@@ -42,7 +43,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -42,7 +43,7 @@ namespace OnlineStore.DeviceLibrary
this.Config = config; this.Config = config;
this.DeviceID = config.Id; this.DeviceID = config.Id;
Name = (" 智能存储仓_" + " ").ToUpper(); Name = ($" {title}_" + " ").ToUpper();
MoveInfo = new DeviceMoveInfo(Name); MoveInfo = new DeviceMoveInfo(Name);
......
...@@ -648,13 +648,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -648,13 +648,12 @@ namespace OnlineStore.DeviceLibrary
UpdownAxis.AbsMove(MoveInfo, Config.Updown_P1, Config.Updown_P1_Speed); UpdownAxis.AbsMove(MoveInfo, Config.Updown_P1, Config.Updown_P1_Speed);
MiddleAxis_A.AbsMove(MoveInfo, Config.MiddleAxis_A_P1, Config.MiddleAxis_A_P1_Speed); MiddleAxis_A.AbsMove(MoveInfo, Config.MiddleAxis_A_P1, Config.MiddleAxis_A_P1_Speed);
MiddleAxis_B.AbsMove(MoveInfo, Config.MiddleAxis_B_P1, Config.MiddleAxis_B_P1_Speed); MiddleAxis_B.AbsMove(MoveInfo, Config.MiddleAxis_B_P1, Config.MiddleAxis_B_P1_Speed);
break; break;
case StepEnum.BOX_R04_OtherAxisToP1: case StepEnum.BOX_R04_OtherAxisToP1:
LogInfo($"复位 {MoveInfo.SLog}:所有轴到达待机位完成"); LogInfo($"复位 {MoveInfo.SLog}:所有轴到达待机位完成");
BuffAreaInstoreDoor(true); BuffAreaInstoreDoor(false);
BuffAreaOutstoreDoor(true); BuffAreaOutstoreDoor(false);
SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing); SetBoxStatus(DeviceStatus.StoreOnline, RunStatus.Runing);
MoveInfo.EndMove(); MoveInfo.EndMove();
break; break;
......
...@@ -247,8 +247,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -247,8 +247,9 @@ namespace OnlineStore.DeviceLibrary
break; break;
case StepEnum.SI_05_GetReel: case StepEnum.SI_05_GetReel:
MoveInfo.NextMoveStep(StepEnum.SI_06_InOutBackToP1FromBuff); MoveInfo.NextMoveStep(StepEnum.SI_06_InOutBackToP1FromBuff);
LogInfo($"入库 {MoveInfo.SLog}:移栽X轴到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"入库 {MoveInfo.SLog}:移栽X轴到待机点P1,行走机构到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
XAxis_To_P1(); XAxis_To_P1();
MoveAxisToP1();
break; break;
case StepEnum.SI_06_InOutBackToP1FromBuff: case StepEnum.SI_06_InOutBackToP1FromBuff:
MoveInfo.NextMoveStep(StepEnum.SI_06_ClearBuffInfo); MoveInfo.NextMoveStep(StepEnum.SI_06_ClearBuffInfo);
......
...@@ -266,8 +266,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -266,8 +266,9 @@ namespace OnlineStore.DeviceLibrary
break; break;
case StepEnum.SO_18_PutReel: case StepEnum.SO_18_PutReel:
MoveInfo.NextMoveStep(StepEnum.SO_19_InOutBackFromBuff); MoveInfo.NextMoveStep(StepEnum.SO_19_InOutBackFromBuff);
LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.ToStr()}]出库完成[耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒],移栽X轴到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"出库 {MoveInfo.SLog}:[{MoveInfo.MoveParam.PosInfo.ToStr()}]出库完成[耗时:{(DateTime.Now - startTime).TotalSeconds.ToString("f2")}秒],移栽X轴到待机点P1,行走机构到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
XAxis_To_P1(); XAxis_To_P1();
MoveAxisToP1();
break; break;
case StepEnum.SO_19_InOutBackFromBuff: case StepEnum.SO_19_InOutBackFromBuff:
LogUtil.info("InSO_19"); LogUtil.info("InSO_19");
......
...@@ -255,7 +255,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -255,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamA, Config.PullAxis_InOut_FindPosSpeed); PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamA, Config.PullAxis_InOut_FindPosSpeed);
else else
PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamA, Config.PullAxis_Inout_P1_Speed); PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamA, Config.PullAxis_Inout_P1_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.PullAxis_Inout_A_Check, IO_VALUE.HIGH)); //MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.PullAxis_Inout_A_Check, IO_VALUE.HIGH));
} }
else else
{ {
...@@ -263,7 +263,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -263,7 +263,7 @@ namespace OnlineStore.DeviceLibrary
PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamB, Config.PullAxis_InOut_FindPosSpeed); PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamB, Config.PullAxis_InOut_FindPosSpeed);
else else
PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamB, Config.PullAxis_Inout_P1_Speed); PullAxis_Inout.AbsMove(MoveInfo, Config.PullAxis_Inout_CamB, Config.PullAxis_Inout_P1_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.PullAxis_Inout_B_Check, IO_VALUE.HIGH)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.PullAxis_Inout_B_Check, IO_VALUE.HIGH));
} }
} }
/// <summary> /// <summary>
...@@ -272,7 +272,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -272,7 +272,7 @@ namespace OnlineStore.DeviceLibrary
/// <param name="open">true:开启</param> /// <param name="open">true:开启</param>
private void BuffAreaInstoreDoor(bool open) private void BuffAreaInstoreDoor(bool open)
{ {
if(open) if(open)//开门-上升
{ {
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_InstoreDoor_Up, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_InstoreDoor_Up, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_InstoreDoor_UpCheck, IO_VALUE.HIGH)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UpperArea_InstoreDoor_UpCheck, IO_VALUE.HIGH));
...@@ -298,16 +298,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -298,16 +298,7 @@ namespace OnlineStore.DeviceLibrary
/// <param name="open">true:开启</param> /// <param name="open">true:开启</param>
private void BuffAreaOutstoreDoor(bool open) private void BuffAreaOutstoreDoor(bool open)
{ {
if (open) if (open)//下降-开门
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_UpCheck, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_Down, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_DownCheck, IO_VALUE.LOW));
IOMove(IO_Type.UnderArea_OutstoreDoor_Down, IO_VALUE.LOW);
IOMove(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.HIGH);
}
else
{ {
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_UpCheck, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_UpCheck, IO_VALUE.LOW));
...@@ -316,6 +307,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -316,6 +307,15 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.LOW); IOMove(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.LOW);
IOMove(IO_Type.UnderArea_OutstoreDoor_Down, IO_VALUE.HIGH); IOMove(IO_Type.UnderArea_OutstoreDoor_Down, IO_VALUE.HIGH);
} }
else//上升-关门
{
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_UpCheck, IO_VALUE.HIGH));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_Down, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.UnderArea_OutstoreDoor_DownCheck, IO_VALUE.LOW));
IOMove(IO_Type.UnderArea_OutstoreDoor_Down, IO_VALUE.LOW);
IOMove(IO_Type.UnderArea_OutstoreDoor_Up, IO_VALUE.HIGH);
}
} }
#region 移栽升降轴 #region 移栽升降轴
/// <summary> /// <summary>
......
...@@ -158,8 +158,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -158,8 +158,9 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.SP_04_GetReel: case StepEnum.SP_04_GetReel:
MoveInfo.NextMoveStep(StepEnum.SP_05_XAxisBackToP1); MoveInfo.NextMoveStep(StepEnum.SP_05_XAxisBackToP1);
LogInfo($"库位调试 {MoveInfo.SLog}:移栽X轴到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"库位调试 {MoveInfo.SLog}:移栽X轴到待机点P1,行走机构到待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
XAxis_To_P1(true); XAxis_To_P1(true);
MoveAxisToP1(true);
break; break;
case StepEnum.SP_05_XAxisBackToP1: case StepEnum.SP_05_XAxisBackToP1:
...@@ -358,8 +359,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -358,8 +359,9 @@ namespace OnlineStore.DeviceLibrary
case StepEnum.SP_28_PutReel: case StepEnum.SP_28_PutReel:
MoveInfo.NextMoveStep(StepEnum.SP_29_XAxisBack); MoveInfo.NextMoveStep(StepEnum.SP_29_XAxisBack);
LogInfo($"库位调试 {MoveInfo.SLog}:移栽X轴回待机点[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]"); LogInfo($"库位调试 {MoveInfo.SLog}:移栽X轴回待机点P1,行走机构回待机点P1[{MoveInfo.MoveParam.PosInfo.GetPosSide()}面]");
XAxis_To_P1(true); XAxis_To_P1(true);
MoveAxisToP1(true);
break; break;
case StepEnum.SP_29_XAxisBack: case StepEnum.SP_29_XAxisBack:
......
...@@ -112,7 +112,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -112,7 +112,7 @@ namespace OnlineStore.DeviceLibrary
{ {
runStatus = RunStatus.Wait; runStatus = RunStatus.Wait;
MoveInfo.EndMove(); MoveInfo.EndMove();
SetWarnMsg("启动失败:A料口启动失败"); SetWarnMsg("启动失败:B料口启动失败");
LogUtil.error("复位失败:B料口启动失败"); LogUtil.error("复位失败:B料口启动失败");
return false; return false;
} }
......
...@@ -687,9 +687,10 @@ namespace OnlineStore.XLRStore ...@@ -687,9 +687,10 @@ namespace OnlineStore.XLRStore
/// <param name="e"></param> /// <param name="e"></param>
private void btnInstoreTest_Click(object sender, EventArgs e) private void btnInstoreTest_Click(object sender, EventArgs e)
{ {
InOutParam inoutParam = new InOutParam(new InOutPosInfo("TestIn", posId)); BoxPosition ktkPosition = CSVPositionReader<BoxPosition>.GetPositon(posId);
InOutParam inoutParam = new InOutParam(new InOutPosInfo("TestIn", posId,ktkPosition.BagWidth,ktkPosition.BagHigh));
boxEquip.StartInstore(inoutParam); boxEquip.StartInstore(inoutParam);
LogUtil.info("手动入库测试..."); LogUtil.info($"手动入库测试:{inoutParam.PosInfo.ToStr()}");
} }
/// <summary> /// <summary>
/// 出库测试 /// 出库测试
...@@ -698,9 +699,10 @@ namespace OnlineStore.XLRStore ...@@ -698,9 +699,10 @@ namespace OnlineStore.XLRStore
/// <param name="e"></param> /// <param name="e"></param>
private void btnOutstoreTest_Click(object sender, EventArgs e) private void btnOutstoreTest_Click(object sender, EventArgs e)
{ {
InOutParam inoutParam = new InOutParam(new InOutPosInfo("TestOut", posId)); BoxPosition ktkPosition = CSVPositionReader<BoxPosition>.GetPositon(posId);
InOutParam inoutParam = new InOutParam(new InOutPosInfo("TestOut",posId, ktkPosition.BagWidth, ktkPosition.BagHigh));
boxEquip.StartExecuctOut(inoutParam); boxEquip.StartExecuctOut(inoutParam);
LogUtil.info("手动出库测试[posId]..."); LogUtil.info($"手动出库测试:{inoutParam.PosInfo.ToStr()}");
} }
private void ComboBoxShieldSig_SelectedIndexChanged(object sender, EventArgs e) private void ComboBoxShieldSig_SelectedIndexChanged(object sender, EventArgs e)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!