Commit 2249979a LN

1

1 个父辈 ebfa4432
doc/1.png

142.9 KB

......@@ -80,10 +80,10 @@ DO,1,进仓1升降上升SOL,UpDownCylinder_Up,12,PRO_AOI_IP_36,,进仓1升降上升SOL,Y563,
DO,1,进仓1升降下降SOL,UpDownCylinder_Down,13,PRO_AOI_IP_36,,进仓1升降下降SOL,Y564,Y564
,,,,14,PRO_AOI_IP_36,,,Y565,Y565
,,,,,,,,,
DI,1000,环形线横移4托盘检测,SW4_SideWay_TrayCheck,5,192.168.200.46,0,环形线横移4托盘检测,X556,X556
DI,1000,环形线横移4料盘检测1,SW4_SideWay_ReelCheck,6,192.168.200.46,0,环形线横移4料盘检测1,X557,X557
DI,1000,环形线横移4顶升上升端,SW4_TopCylinder_Up,7,192.168.200.46,0,环形线横移4顶升上升端,X558,X558
DI,1000,环形线横移4顶升下降端,SW4_TopCylinder_Down,8,192.168.200.46,0,环形线横移4顶升下降端,X559,X559
DI,1000,环形线横移4托盘检测,SW4_SideWay_TrayCheck,5,PRO_AOI_IP_36,0,环形线横移4托盘检测,X556,X556
DI,1000,环形线横移4料盘检测1,SW4_SideWay_ReelCheck,6,PRO_AOI_IP_36,0,环形线横移4料盘检测1,X557,X557
DI,1000,环形线横移4顶升上升端,SW4_TopCylinder_Up,7,PRO_AOI_IP_36,0,环形线横移4顶升上升端,X558,X558
DI,1000,环形线横移4顶升下降端,SW4_TopCylinder_Down,8,PRO_AOI_IP_36,0,环形线横移4顶升下降端,X559,X559
,,,,,,,,,
DO,1000,环形线横移4顶升上升SOL,SW4_TopCylinder_Up,6,192.168.200.46,0,环形线横移4顶升上升SOL,Y557,Y557
DO,1000,环形线横移4顶升下降SOL,SW4_TopCylinder_Down,7,192.168.200.46,0,环形线横移4顶升下降SOL,Y558,Y558
DO,1000,环形线横移4顶升上升SOL,SW4_TopCylinder_Up,6,PRO_AOI_IP_36,0,环形线横移4顶升上升SOL,Y557,Y557
DO,1000,环形线横移4顶升下降SOL,SW4_TopCylinder_Down,7,PRO_AOI_IP_36,0,环形线横移4顶升下降SOL,Y558,Y558
......@@ -234,12 +234,10 @@ namespace OnlineStore.DeviceLibrary
//上下气缸上升
if (UseAxis.Equals(false))
{
IOMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.HIGH);
CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Down);
}
//顶升气缸下降
IOMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW);
IOMove(IO_Type.TopCylinder_Down, IO_VALUE.HIGH);
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
}
}
internal virtual void CloseCylinderStop()
......@@ -459,12 +457,27 @@ namespace OnlineStore.DeviceLibrary
protected void InStoreLog(string msg)
{
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
LogUtil.info(Name + "【" + posId + "】" + msg);
if (posId.Equals(""))
{
LogUtil.info(Name + msg);
}
else
{
LogUtil.info(Name + "[" + posId + "]" + msg);
}
}
protected void OutStoreLog(string msg)
{
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
LogUtil.info(Name + "【" + posId + "】" + msg);
if (posId.Equals(""))
{
LogUtil.info(Name + msg);
}
else
{
LogUtil.info(Name + "[" + posId + "]" + msg);
}
}
public string GetMoveStr()
......
......@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
lineStatus = LineStatus.ResetMove;
IOMove(IO_Type.SL_HddLed, IO_VALUE.HIGH);
MoveInfo.NextMoveStep(LineMoveStep.FR_01_MoveCylinder_Up);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.MoveStep + ":上料横移机构上升,出口顶升下降,所有阻挡气缸上升");
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":上料横移机构上升,出口顶升下降,所有阻挡气缸上升");
CylinderMove(MoveInfo, IO_Type.SL_MoveCylinder_Down, IO_Type.SL_MoveCylinder_Up);
CylinderMove(MoveInfo, IO_Type.SL_OutTopCylinder_Up, IO_Type.SL_OutTopCylinder_Down);
if (Config.SidesWayNum <= 0)
......@@ -147,7 +147,7 @@ namespace OnlineStore.DeviceLibrary
case LineMoveStep.FR_01_MoveCylinder_Up:
MoveInfo.NextMoveStep(LineMoveStep.FR_02_BatchAxisHome);
MoveInfo.TimeOutSeconds = 120;
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.MoveStep + ":提升伺服回原点,升降伺服回原点,所有阻挡气缸上升");
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":提升伺服回原点,升降伺服回原点,所有阻挡气缸上升");
BatchAxis.HomeMove(MoveInfo);
UpdownAxis.HomeMove(MoveInfo);
break;
......@@ -314,7 +314,7 @@ namespace OnlineStore.DeviceLibrary
StartInStoreP();
}
}
if (LineManager.Line.CanProcessLine() && SecondMoveInfo.MoveType.Equals(LineMoveType.None))
if ( SecondMoveInfo.MoveType.Equals(LineMoveType.None))
{
StartCheckFixture();
}
......
......@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
public bool CanProcessLine(bool isCheckSleep = true)
{
if (IsDebug)
if (runStatus<=LineRunStatus.Wait)
{
return true;
}
......@@ -356,7 +356,7 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 横移处理
#region 横移处理-
/// <summary>
/// 横移无处理
/// </summary>
......@@ -386,19 +386,7 @@ namespace OnlineStore.DeviceLibrary
}
private static LineMoveInfo SW41_MoveInfo = null;
private static LineMoveInfo SW23_MoveInfo = null;
private bool SideWayReset()
{
SideWayStop();
CylinderMove(null, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
CylinderMove(null, IO_Type.SW1_TopCylinder_Up, IO_Type.SW1_TopCylinder_Down);
CylinderMove(null, IO_Type.SW4_TopCylinder_Up, IO_Type.SW4_TopCylinder_Down);
CylinderMove(null, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
CylinderMove(null, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
return true;
}
private void SideWayStop()
{
SideWay41IsWait = false;
......
......@@ -130,13 +130,13 @@ namespace OnlineStore.DeviceLibrary
{
case LineMoveStep.MH_UpDownHomeMove:
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownCylinder_Up);
LogInfo(MoveInfo.MoveType+ " : (上下轴原点返回完成,上下轴走到待机点 )开始");
LogInfo(MoveInfo.MoveType+ " : (上下轴原点返回完成,上下轴走到待机点 )开始");
UpdownUpMove();
break;
case LineMoveStep.MH_UpDownCylinder_Up:
MoveInfo.NextMoveStep(LineMoveStep.MH_OtherCylinder_Back);
LogInfo(MoveInfo.MoveType + " :: (上升到位,顶升气缸下降,前后气缸回退 )开始");
LogInfo(MoveInfo.MoveType + " : (上升到位,顶升气缸下降,前后气缸回退 )开始");
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
......
......@@ -62,41 +62,41 @@ namespace OnlineStore.DeviceLibrary
#region 移载装置 移栽物品操作
if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_50_StartOutProcess))
{
OutStoreLog("出库: MO_51_BeforeAfterCylinderBefore ( 前后气缸前进 )");
MoveInfo.NextMoveStep(LineMoveStep.MO_51_BeforeAfterCylinderBefore);
OutStoreLog("出库 "+MoveInfo.MoveStep+": 前后气缸前进 )");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_51_BeforeAfterCylinderBefore))
{
OutStoreLog("出库: MO_52_UpDownCylinderDown ( 上下气缸1下降 )");
MoveInfo.NextMoveStep(LineMoveStep.MO_52_UpDownCylinderDown);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 )");
UpdownDownBoxMove(MoveInfo.MoveParam.PlateH);
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_52_UpDownCylinderDown))
{
OutStoreLog("出库: MO_53_UpDownCylinderDownWait ( 上下气缸1下降 后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作)");
MoveInfo.NextMoveStep(LineMoveStep.MO_53_UpDownCylinderDownWait);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1下降 后,等待0.3秒再夹紧,防止没有下降到位就夹紧操作)");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_53_UpDownCylinderDownWait))
{
OutStoreLog("出库: MO_54_ClampCylinderSlack ( 夹料气缸1夹紧)");
MoveInfo.NextMoveStep(LineMoveStep.MO_54_ClampCylinderSlack);
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_54_ClampCylinderSlack))
{
OutStoreLog("出库: MO_55_UpDownCylinderUp ( 上下气缸1上升)");
MoveInfo.NextMoveStep(LineMoveStep.MO_55_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove();
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_55_UpDownCylinderUp))
{
OutStoreLog("出库: MO_56_BeforeAfterCylinderAfter( 前后气缸1后退)");
MoveInfo.NextMoveStep(LineMoveStep.MO_56_BeforeAfterCylinderAfter);
OutStoreLog("出库 " + MoveInfo.SLog + ": 前后气缸1后退)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
}
#endregion
......@@ -106,7 +106,9 @@ namespace OnlineStore.DeviceLibrary
&& MoveInfo.MoveStep.Equals(LineMoveStep.MO_56_BeforeAfterCylinderAfter)
&& !SecondMoveInfo.IsInWait)
{
OutStoreLog("出库:( MO_06_UpDownCylinderDown,夹具检测编码完成, 上下气缸1下降 )");
//去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown);
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹具检测编码完成, 上下气缸1下降 )");
if (MoveInfo.MoveParam != null)
{
MoveInfo.MoveParam.TrayNumber = SecondMoveInfo.MoveParam.TrayNumber;
......@@ -116,8 +118,6 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam = SecondMoveInfo.MoveParam;
}
//去掉直接丢盘处理
MoveInfo.NextMoveStep(LineMoveStep.MO_58_UpDownCylinderDown);
UpdownDownMove(MoveInfo.MoveParam.PlateH);
////判断盘号,如果是七寸盘,不需要下降,直接放盘
......@@ -137,7 +137,7 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_58_UpDownCylinderDown))
{
OutStoreLog("出库:(MO_07_ClampCylinderTighten 夹料气缸1放松 )");
OutStoreLog("出库 " + MoveInfo.SLog + ": 夹料气缸1放松 )");
int bagWidth = MoveInfo.MoveParam.PlateW;
LogInfo("【" + posId + "】出库时,更新盘空满信息 托盘号【" + MoveInfo.MoveParam.TrayNumber + "】,是否有料盘【" + true + "】,出库入库【" + 2 + "】");
......@@ -150,8 +150,8 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_59_ClampCylinderTighten))
{
OutStoreLog("出库:(MO_08_UpDownCylinderUp 上下气缸1上升)");
this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MO_60_UpDownCylinderUp))
......@@ -224,21 +224,21 @@ namespace OnlineStore.DeviceLibrary
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDown))
{
InStoreLog("入库:(MI_07_UpDownCylinderDownWait, 编码与仓位一致,上下气缸1下降后等待0.3秒再夹紧,防止没有下降到位就夹紧");
MoveInfo.NextMoveStep(LineMoveStep.MI_07_UpDownCylinderDownWait);
InStoreLog("入库 " + MoveInfo.SLog + ": 编码与仓位一致,上下气缸1下降后等待0.3秒再夹紧,防止没有下降到位就夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
}
//只有当BOX可以进行出入库时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_07_UpDownCylinderDownWait))
{
InStoreLog("入库:(MI_08_ClampCylinderSlack,夹料气缸1夹紧)");
MoveInfo.NextMoveStep(LineMoveStep.MI_08_ClampCylinderSlack);
InStoreLog("入库 " + MoveInfo.SLog + ": 夹料气缸1夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_08_ClampCylinderSlack))
{
InStoreLog("入库:(MI_09_UpDownCylinderUp,上下气缸1上升)");
MoveInfo.NextMoveStep(LineMoveStep.MI_09_UpDownCylinderUp);
InStoreLog("入库 " + MoveInfo.SLog + ": 上下气缸1上升)");
UpdownUpMove();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_09_UpDownCylinderUp))
......
......@@ -255,21 +255,21 @@ namespace OnlineStore.DeviceLibrary
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosId : "";
if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_UpDownCylinderDown))
{
InStoreLog("出料:(PO_02_UpDownCylinderDownWait, 上下气缸1下降后等待0.3秒再夹紧");
MoveInfo.NextMoveStep(LineMoveStep.PO_02_UpDownCylinderDownWait);
OutStoreLog("出库 "+MoveInfo.SLog+" : 上下气缸1下降后等待0.3秒再夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
}
//只有当BOX可以进行出出料时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_UpDownCylinderDownWait))
{
InStoreLog("出料:(PO_02_UpDownCylinderDownWait,夹料气缸夹紧)");
MoveInfo.NextMoveStep(LineMoveStep.PO_03_ClampCylinderSlack);
OutStoreLog("出库 " + MoveInfo.SLog + " : 夹料气缸夹紧)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_03_ClampCylinderSlack))
{
InStoreLog("出料:(PO_04_UpDownCylinderUp,上下气缸上升)");
MoveInfo.NextMoveStep(LineMoveStep.PO_04_UpDownCylinderUp);
OutStoreLog("出库 " + MoveInfo.SLog + " : 上下气缸上升)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove();
}
......@@ -292,34 +292,34 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_05_WaitBox))
{
InStoreLog("出料:(PO_06_BeforeAfterCylinderBefore,前后气缸前进)");
MoveInfo.NextMoveStep(LineMoveStep.PO_06_BeforeAfterCylinderBefore);
OutStoreLog("出库:PO_06_BeforeAfterCylinderBefore,前后气缸前进)");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_After, IO_Type.BeforeAfterCylinder_Before);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_06_BeforeAfterCylinderBefore))
{
InStoreLog("出料:(PO_07_UpDownCylinderDown ,上下气缸下降)");
MoveInfo.NextMoveStep(LineMoveStep.PO_07_UpDownCylinderDown);
OutStoreLog("出库:PO_07_UpDownCylinderDown ,上下气缸下降)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
UpdownDownP3Move(MoveInfo.MoveParam.PlateH);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_07_UpDownCylinderDown))
{
InStoreLog("出料: (PO_08_ClampCylinderTighten,夹料气缸放松)");
MoveInfo.NextMoveStep(LineMoveStep.PO_08_ClampCylinderTighten);
InStoreLog("出料: (PO_08_ClampCylinderTighten,夹料气缸放松)");
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Slack, IO_Type.ClampCylinder_Tighten);
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_08_ClampCylinderTighten))
{
InStoreLog("出料:(PO_09_UpdownCylinderUp,上下气缸上升)");
MoveInfo.NextMoveStep(LineMoveStep.PO_09_UpdownCylinderUp);
OutStoreLog("出库:PO_09_UpdownCylinderUp,上下气缸上升)");
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
UpdownUpMove();
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_09_UpdownCylinderUp))
{
InStoreLog("出料:(PO_10_BeforeAfterCylinderAfter,前后气缸后退,等待4000 )");
MoveInfo.NextMoveStep(LineMoveStep.PO_10_BeforeAfterCylinderAfter);
OutStoreLog("出库:PO_10_BeforeAfterCylinderAfter,前后气缸后退,等待4000 )");
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(4000));
......
......@@ -152,6 +152,7 @@ namespace OnlineStore.DeviceLibrary
internal static bool RightTrayCode(int trayNum, int preTrayNum, bool isCanUpdateMax)
{
return true;
int defNext = preTrayNum + 1;
if (preTrayNum.Equals(0) || MaxTrayNum.Equals(0) || trayNum.Equals(defNext))
{
......
......@@ -24,7 +24,7 @@ namespace OnlineStore.DeviceLibrary
{
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
Thread.Sleep(60);
Thread.Sleep(10);
}
else
{
......
......@@ -82,6 +82,10 @@ namespace OnlineStore.DeviceLibrary
{
get { return moveStep; }
}
public string SLog
{
get { return moveStep + ""; }
}
public void NextMoveStep(LineMoveStep step)
{
......
......@@ -623,7 +623,10 @@ namespace OnlineStore.DeviceLibrary
/// 料盘移栽:上料横移机构上升,同时伺服运动到P3
/// </summary>
FI_17_UpdownAxisToP1 ,
/// <summary>
/// 料盘移栽:批量轴到P3点,检测是否有料盘
/// </summary>
FI_17_BatchAxisToP3,
/// <summary>
/// 料盘移栽:记录高度尺寸
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!