Commit e3a55949 LN

出入库拿到料盘和放下料盘必须判断叉子料盘检测信号

1 个父辈 bb52b56c
......@@ -1143,16 +1143,16 @@ namespace OnlineStore.ACSingleStore
显示ToolStripMenuItem.Text = ResourceCulture.GetString(ResourceCulture.GetTextIdStr(className, 显示ToolStripMenuItem.Name), 显示ToolStripMenuItem.Text);
toolStripMenuItem1.Text = ResourceCulture.GetString(ResourceCulture.GetTextIdStr(className, toolStripMenuItem1.Name), toolStripMenuItem1.Text);
notifyIcon1.Text = this.Text;
if (CurrLanguage.Equals(ResourceCulture.China))
{
LogUtil.logBox = this.richTextBox1;
}
else
{
LogUtil.ClearLog();
LogUtil.logBox = null;
this.richTextBox1.Clear();
}
//if (CurrLanguage.Equals(ResourceCulture.China))
//{
// LogUtil.logBox = this.richTextBox1;
//}
//else
//{
// LogUtil.ClearLog();
// LogUtil.logBox = null;
// this.richTextBox1.Clear();
//}
}
}
}
......@@ -105,3 +105,6 @@ DeCodeType=解码类型,0=halcon,1=zxing解码 西安料仓解析方式。2=
20200224
漏掉的中英文修改。
出入库拿到料盘和放下料盘必须判断叉子料盘检测信号
英文版本显示中文日志
......@@ -312,6 +312,10 @@ namespace OnlineStore.DeviceLibrary
//关闭所有的DO
public override void CloseAllDO()
{
if (AIOMap == null)
{
return;
}
foreach (AIOBOX aio in AIOMap.Values)
{
ushort length = StoreManager.Config.GetDOLength(aio.IP);
......
......@@ -148,7 +148,7 @@ namespace OnlineStore.DeviceLibrary
{
wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = Config.IOSingle_TimerOut;
if (StoreMove.MoveStep == StoreMoveStep.SO_14_WaitTake)
if (StoreMove.MoveStep == StoreMoveStep.SO_15_WaitTake)
{
timeOutMs = 650000;
}
......@@ -322,7 +322,7 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3");
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
......@@ -337,7 +337,7 @@ namespace OnlineStore.DeviceLibrary
{
InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始");
StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
}
......@@ -358,7 +358,7 @@ namespace OnlineStore.DeviceLibrary
NeedCheckSafetyLight = 0;
InStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice);
ComMoveToPosition(moveP.ComPress_P2,Config.CompAxis_P2_Speed);
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2);
......@@ -377,7 +377,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_07_DeviceBackFromDoor)
{
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
InStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
......@@ -389,16 +389,16 @@ namespace OnlineStore.DeviceLibrary
}
else
{
InStoreLog("入库:SI_08 定位气缸伸出 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_08_LocationCylinder_Up);
LocationUpAndWait();
InStoreLog("入库:SI_08 检测叉子料盘检测信号 ");
StoreMove.NextMoveStep(StoreMoveStep.SI_08_CheckTray);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_08_LocationCylinder_Up)
else if (StoreMove.MoveStep == StoreMoveStep.SI_08_CheckTray)
{
InStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点)),关闭舱门 ");
InStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
//关闭舱门
IOManager.IOMove(IO_Type.Door_Down, IO_VALUE.HIGH);
......@@ -452,19 +452,31 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_13_DeviceBackFromBag)
{
InStoreLog("入库:SI_14 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭");
StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack);
ComMoveToPosition(moveP.ComPress_P1,Config.CompAxis_P1_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1);
// StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false));
//}
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
InStoreLog("入库:SI_15 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭");
StoreMove.NextMoveStep(StoreMoveStep.SI_15_GoBack);
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
}
else
{
InStoreLog("入库:SI_14 放料完成,等待TrayCheck_Fixture=LOW");
StoreMove.NextMoveStep(StoreMoveStep.SI_14_CheckTray);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
}
}else if(StoreMove.MoveStep == StoreMoveStep.SI_14_CheckTray)
{
InStoreLog("入库:SI_15 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭");
StoreMove.NextMoveStep(StoreMoveStep.SI_15_GoBack);
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_14_GoBack)
else if (StoreMove.MoveStep == StoreMoveStep.SI_15_GoBack)
{
TimeSpan span = DateTime.Now - startInStoreTime;
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
......@@ -555,7 +567,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition);
OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)");
ComMoveToPosition(moveP.ComPress_P3,Config.CompAxis_P3_Speed);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
......@@ -595,12 +607,15 @@ namespace OnlineStore.DeviceLibrary
{
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
CodeMsg = "出库[" + posId + "]叉子从库位退出后,未检测到料盘有料";
CodeMsgEn = ResourceControl.GetEnglishString("出库{0}叉子从库位退出后,未检测到料盘有料", posId);
LogUtil.error(CodeMsg);
StoreMove.NextMoveStep(StoreMoveStep.SO_07_CheckTray);
OutStoreLog("出库:SO_07 等待TrayCheck_Fixture=High ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.HIGH));
//string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
//CodeMsg = "出库[" + posId + "]叉子从库位退出后,未检测到料盘有料";
//CodeMsgEn = ResourceControl.GetEnglishString("出库{0}叉子从库位退出后,未检测到料盘有料", posId);
//LogUtil.error(CodeMsg);
}
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 ");
......@@ -609,30 +624,23 @@ namespace OnlineStore.DeviceLibrary
//打开舱门
//OpenDoorAndWait();
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_07_LocationCylinder_Up);
OutStoreLog("出库:SO_07 定位气缸伸出 ");
LocationUpAndWait();
}
//else
//{
// StoreMove.NextMoveStep(StoreMoveStep.SO_07_LocationCylinder_Up);
// OutStoreLog("出库:SO_07 定位气缸伸出 ");
// LocationUpAndWait();
//}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_LocationCylinder_Up)
else if (StoreMove.MoveStep == StoreMoveStep.SO_07_CheckTray)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_08_ToDoorPosition);
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点) ");
OutStoreLog("出库:SO_08 走到料门口,旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
//此处需要等待box门口没有盘
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
//StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
//打开舱门
//OpenDoorAndWait();
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_2, IO_VALUE.LOW));
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_08_ToDoorPosition)
{
if (IsHasCompress_Axis|| Config.IsHasLocationCylinder.Equals(0))
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
{
//SO_10_DeviceToDoorPro();
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
......@@ -667,7 +675,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog("出库:SO_11 放下物品,升降轴至P8(进料口出料缓冲点) ");
StoreMove.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare);
NeedCheckSafetyLight = 0;
ComMoveToPosition(moveP.ComPress_P1,Config.CompAxis_P1_Speed);
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
//if (IsHasCompress_Axis)
//{
// ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1);
......@@ -683,12 +691,28 @@ namespace OnlineStore.DeviceLibrary
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_12_DeviceOutFromDoor)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_13_GoBack);
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack);
OutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
}
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_13_CheckTray);
OutStoreLog("出库:SO_13 等待TrayCheck_Fixture= LOW ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_13_CheckTray)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack);
OutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack)
else if (StoreMove.MoveStep == StoreMoveStep.SO_14_GoBack)
{
int OutStoreWaitSeconds = ConfigAppSettings.GetIntValue(Setting_Init.OutStoreWaitSeconds);
if (OutStoreWaitSeconds <= 0)
......@@ -696,14 +720,14 @@ namespace OnlineStore.DeviceLibrary
OutStoreWaitSeconds = 600;
}
int ms = OutStoreWaitSeconds * 1000;
StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake);
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待"+OutStoreWaitSeconds+"秒");
StoreMove.NextMoveStep(StoreMoveStep.SO_15_WaitTake);
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true;
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_14_WaitTake)
else if (StoreMove.MoveStep == StoreMoveStep.SO_15_WaitTake)
{
TimeSpan span = DateTime.Now - startOutStoreTime;
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
......
......@@ -205,9 +205,9 @@ namespace OnlineStore.DeviceLibrary
SO_06_BagDeviceBack = 106,
/// <summary>
/// 料仓出库,定位气缸伸出(有压紧轴的不需要此步骤),,定位气缸伸出 Y103-1/PCI5O1-83) Y103-2/PCI5O1-90) Y103-3/PCI5O1-95) 伸出到位
/// 料仓出库,等待检测到料盘信号
/// </summary>
SO_07_LocationCylinder_Up = 107,
SO_07_CheckTray= 107,
/// <summary>
/// 料仓出库,,所有设备运行到门,,轴1( 转盘) 至P1( 待机点)轴2( 上下) 至P2( 进料口出料前点)
......@@ -221,7 +221,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 等待门口无料盘
/// </summary>
SO_091_WaitNoTray=115,
SO_091_WaitNoTray=120,
/// <summary>
/// 料仓出库,,叉子进出料口,,轴3( 叉子) 至P2( 进料口取料点)
......@@ -237,13 +237,17 @@ namespace OnlineStore.DeviceLibrary
SO_12_DeviceOutFromDoor = 112,
/// <summary>
/// 料仓出库:等待叉子无料盘
/// </summary>
SO_13_CheckTray=113,
/// <summary>
/// 料仓出库,,升降轴返回,, 轴2至P1( 待机点)
/// </summary>
SO_13_GoBack = 113,
SO_14_GoBack = 114,
/// <summary>
/// 等待拿走物品
/// </summary>
SO_14_WaitTake=114,
SO_15_WaitTake=115,
#endregion
......@@ -282,9 +286,9 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
SI_07_DeviceBackFromDoor = 207,
/// <summary>
/// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤)
/// 入库。。,验证是否检测到料盘信号
/// </summary>
SI_08_LocationCylinder_Up = 208,
SI_08_CheckTray= 208,
/// <summary>
/// 入库。。移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)
/// </summary>
......@@ -306,9 +310,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
SI_13_DeviceBackFromBag = 213,
/// <summary>
/// 入库。。检测叉子是否还有物料
/// </summary>
SI_14_CheckTray=214,
/// <summary>
/// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
/// </summary>
SI_14_GoBack = 214,
SI_15_GoBack = 215,
#endregion
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!