Commit 89af521e 张东亮

机器人连接ok,rfid读取ok

1 个父辈 eddb5fd6
此文件类型无法预览
此文件类型无法预览
...@@ -44,8 +44,11 @@ ...@@ -44,8 +44,11 @@
<Reference Include="Asa.IOModule.AIOBOX"> <Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath> <HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.RFID"> <Reference Include="Asa.RFID.HiStation">
<HintPath>..\..\dll\Asa.RFID.dll</HintPath> <HintPath>..\..\dll\Asa.RFID.HiStation.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID.IReadAll">
<HintPath>..\..\dll\Asa.RFID.IReadAll.dll</HintPath>
</Reference> </Reference>
<Reference Include="AsaPL.AgvClient"> <Reference Include="AsaPL.AgvClient">
<HintPath>..\..\dll\AsaPL.AgvClient.dll</HintPath> <HintPath>..\..\dll\AsaPL.AgvClient.dll</HintPath>
...@@ -115,7 +118,7 @@ ...@@ -115,7 +118,7 @@
<Compile Include="packageLine\AgvProcess.cs" /> <Compile Include="packageLine\AgvProcess.cs" />
<Compile Include="packageLine\bean\StepInfo.cs" /> <Compile Include="packageLine\bean\StepInfo.cs" />
<Compile Include="packageLine\PackageLine.cs" /> <Compile Include="packageLine\PackageLine.cs" />
<Compile Include="packageLine\BenQProcess.cs" /> <Compile Include="packageLine\LineAGVProcess.cs" />
<Compile Include="packageLine\PackageLine_BuffShelf.cs" /> <Compile Include="packageLine\PackageLine_BuffShelf.cs" />
<Compile Include="packageLine\PackageLine_BenQInShelf.cs" /> <Compile Include="packageLine\PackageLine_BenQInShelf.cs" />
<Compile Include="packageLine\PackageLine_PkgInShelf.cs" /> <Compile Include="packageLine\PackageLine_PkgInShelf.cs" />
......
using ABB.Robotics.Controllers; using ABB.Robotics.Controllers;
using ABB.Robotics.Controllers.Discovery; using ABB.Robotics.Controllers.Discovery;
using ABB.Robotics.Controllers.IOSystemDomain; using ABB.Robotics.Controllers.IOSystemDomain;
using ABB.Robotics.Controllers.RapidDomain;
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -14,7 +13,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,7 +13,7 @@ namespace OnlineStore.DeviceLibrary
{ {
public class ABBControl public class ABBControl
{ {
public static int DefaultSpeed = ConfigAppSettings.GetIntValue(Setting_Init.DefaultSpeed); public static int DefaultSpeed = ConfigAppSettings.GetIntValue(Setting_Init.DefaultSpeed);
public static string DI_Start = "di_start";//启动程序 public static string DI_Start = "di_start";//启动程序
public static string DI_Stop = "di_stop";//停止程序 public static string DI_Stop = "di_stop";//停止程序
public static string DO_ES = "do_ES";//急停状态 public static string DO_ES = "do_ES";//急停状态
...@@ -368,7 +367,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -368,7 +367,7 @@ namespace OnlineStore.DeviceLibrary
ErrorInfo = msg; ErrorInfo = msg;
} }
else if ((!preCmd.Equals("")) && msg.Contains(preCmd)) else if ((!preCmd.Equals("")) && msg.Contains(preCmd))
{ {
if (msg.Contains(OkStr)) if (msg.Contains(OkStr))
{ {
UpdateAbbCmd(add, ""); UpdateAbbCmd(add, "");
...@@ -391,7 +390,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -391,7 +390,7 @@ namespace OnlineStore.DeviceLibrary
//} //}
else if (msg.Contains(OkStr)) else if (msg.Contains(OkStr))
{ {
LogUtil.info("Revice[" + add + "]:[" + msg + "] 未找到相关处理,preCmd="+preCmd); LogUtil.info("Revice[" + add + "]:[" + msg + "] 未找到相关处理,preCmd=" + preCmd);
//OnCmdEnd?.Invoke(add, msg); //OnCmdEnd?.Invoke(add, msg);
} }
return false; return false;
...@@ -411,7 +410,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -411,7 +410,7 @@ namespace OnlineStore.DeviceLibrary
{ } { }
else else
{ {
LogUtil.error ("Send [" + robotIp + "] : [" + str + "] 失败,命令无效"); LogUtil.error("Send [" + robotIp + "] : [" + str + "] 失败,命令无效");
return false; return false;
} }
Client client = null; Client client = null;
...@@ -437,9 +436,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -437,9 +436,9 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error("Send [" + robotIp + "] : [" + str + "] 失败,客户端未连接"); LogUtil.error("Send [" + robotIp + "] : [" + str + "] 失败,客户端未连接");
} }
return false; return false;
} }
private static void UpdateAbbCmd(string robotIp, string moveCmd) private static void UpdateAbbCmd(string robotIp, string moveCmd)
{ {
if (AbbCurrCmd.ContainsKey(robotIp)) if (AbbCurrCmd.ContainsKey(robotIp))
{ {
AbbCurrCmd.Remove(robotIp); AbbCurrCmd.Remove(robotIp);
...@@ -470,8 +469,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -470,8 +469,8 @@ namespace OnlineStore.DeviceLibrary
#region 连续动作 #region 连续动作
public static bool IsAutoMove = false; public static bool IsAutoMove = false;
public static string LastAutoP = ""; public static string LastAutoP = "";
public static void StartConMove(string ip, List<string> movePList, string mType = "L", string getp = "p1", int speed = 0) public static void StartConMove(string ip, List<string> movePList, string mType = "L", string getp = "p1", int speed = 0)
{ {
if (speed <= 0) if (speed <= 0)
...@@ -587,7 +586,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -587,7 +586,7 @@ namespace OnlineStore.DeviceLibrary
} }
return ""; return "";
} }
private static void SaveLastCmd(string ip, string cmd) private static void SaveLastCmd(string ip, string cmd)
{ {
try try
{ {
...@@ -604,11 +603,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -604,11 +603,11 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error("SaveLastCmd[" + ip + "][" + cmd + "]error :" + ex.ToString()); LogUtil.error("SaveLastCmd[" + ip + "][" + cmd + "]error :" + ex.ToString());
} }
} }
#endregion #endregion
} }
#endregion #endregion
} }
...@@ -135,7 +135,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -135,7 +135,6 @@ namespace OnlineStore.DeviceLibrary
IOValue(IO_Type.S1_StopCheck4).Equals(IO_VALUE.LOW) && IOValue(IO_Type.S1_StopCheck4).Equals(IO_VALUE.LOW) &&
CylinderIsOk(IO_Type.S1_TopCylinderUp, IO_Type.S1_TopCylinderDown) && CylinderIsOk(IO_Type.S1_TopCylinderUp, IO_Type.S1_TopCylinderDown) &&
IOValue(IO_Type.S2_StopCheck1).Equals(IO_VALUE.LOW) && IOValue(IO_Type.S2_StopCheck1).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.S2_StopCheck2).Equals(IO_VALUE.LOW) &&
CylinderIsOk(IO_Type.S2_TopCylinderUp, IO_Type.S2_TopCylinderDown) && CylinderIsOk(IO_Type.S2_TopCylinderUp, IO_Type.S2_TopCylinderDown) &&
IOManager.DOValue(IO_Type.S2_TopCylinderUp).Equals(IO_VALUE.LOW) && IOManager.DOValue(IO_Type.S2_TopCylinderDown).Equals(IO_VALUE.HIGH) IOManager.DOValue(IO_Type.S2_TopCylinderUp).Equals(IO_VALUE.LOW) && IOManager.DOValue(IO_Type.S2_TopCylinderDown).Equals(IO_VALUE.HIGH)
) )
...@@ -239,7 +238,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -239,7 +238,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("双层线_S1" + AllTaskInfo.ToStr() + "S1需要新料架【" + needNewShelf + "】,等待 LLow_StopCheck3"); LogUtil.info("双层线_S1" + AllTaskInfo.ToStr() + "S1需要新料架【" + needNewShelf + "】,等待 LLow_StopCheck3");
//放一个C料架 //放一个C料架
SOneMoveInfo.NewMove(LineMoveType.S1Shelf, MoveStep.S1_C01_GetC); SOneMoveInfo.NewMove(LineMoveType.S1Shelf, MoveStep.S1_C01_GetC);
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LLow_StopCheck3, IO_VALUE.HIGH)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LLow_StopCheck2, IO_VALUE.HIGH));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_LeftStopCheck, IO_VALUE.LOW)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_LeftStopCheck, IO_VALUE.LOW));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_RightStopCheck, IO_VALUE.LOW)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_RightStopCheck, IO_VALUE.LOW));
} }
...@@ -248,7 +247,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -248,7 +247,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info("双层线_S1" + AllTaskInfo.ToStr() + "S1需要新料架【" + needNewShelf + "】,等待 LHigh_StopCheck3"); LogUtil.info("双层线_S1" + AllTaskInfo.ToStr() + "S1需要新料架【" + needNewShelf + "】,等待 LHigh_StopCheck3");
//放一个D料架 //放一个D料架
SOneMoveInfo.NewMove(LineMoveType.S1Shelf, MoveStep.S1_D10_GetD); SOneMoveInfo.NewMove(LineMoveType.S1Shelf, MoveStep.S1_D10_GetD);
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LHigh_StopCheck3, IO_VALUE.HIGH)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LHigh_StopCheck2, IO_VALUE.HIGH));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_LeftStopCheck, IO_VALUE.LOW)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_LeftStopCheck, IO_VALUE.LOW));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_RightStopCheck, IO_VALUE.LOW)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.M_RightStopCheck, IO_VALUE.LOW));
} }
...@@ -275,7 +274,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -275,7 +274,7 @@ namespace OnlineStore.DeviceLibrary
S1Log(" 下层阻挡3下降, 链条转动,开始放大料架到左侧,阻挡1需要上升"); S1Log(" 下层阻挡3下降, 链条转动,开始放大料架到左侧,阻挡1需要上升");
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2500)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2500));
IOMove(IO_Type.LLow_StopCylinder3, IO_VALUE.HIGH, 3000); IOMove(IO_Type.LLow_StopCylinder2, IO_VALUE.HIGH, 3000);
IOMove(IO_Type.M_LeftStopCylinder, IO_VALUE.HIGH); IOMove(IO_Type.M_LeftStopCylinder, IO_VALUE.HIGH);
IOMove(IO_Type.M_RightStopCylinder, IO_VALUE.HIGH); IOMove(IO_Type.M_RightStopCylinder, IO_VALUE.HIGH);
...@@ -297,12 +296,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -297,12 +296,12 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SOneMoveInfo.MoveStep.Equals(MoveStep.S1_C03_MStopDown)) else if (SOneMoveInfo.MoveStep.Equals(MoveStep.S1_C03_MStopDown))
{ {
IOMove(IO_Type.LLow_StopCylinder3, IO_VALUE.LOW); IOMove(IO_Type.LLow_StopCylinder2, IO_VALUE.LOW);
SOneMoveInfo.NextMoveStep(MoveStep.S1_C04_DToLeft); SOneMoveInfo.NextMoveStep(MoveStep.S1_C04_DToLeft);
SOneMoveInfo.TimeOutSeconds = 20; SOneMoveInfo.TimeOutSeconds = 20;
S1Log("等待料架到达左侧工位,S1阻挡1上升,S1正转"); S1Log("等待料架到达左侧工位,S1阻挡1上升,S1正转");
IOMove(IO_Type.LLow_StopCylinder3, IO_VALUE.LOW); IOMove(IO_Type.LLow_StopCylinder2, IO_VALUE.LOW);
CheckAndMove(IO_Type.S1_StopCylinder1, IO_VALUE.LOW); CheckAndMove(IO_Type.S1_StopCylinder1, IO_VALUE.LOW);
CheckAndMove(IO_Type.S1_StopCylinder3, IO_VALUE.HIGH); CheckAndMove(IO_Type.S1_StopCylinder3, IO_VALUE.HIGH);
...@@ -347,7 +346,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -347,7 +346,7 @@ namespace OnlineStore.DeviceLibrary
S1_StopMove(SOneMoveInfo, IO_VALUE.HIGH); S1_StopMove(SOneMoveInfo, IO_VALUE.HIGH);
IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.LOW); IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.LOW);
IOMove(IO_Type.LLown_LineRun, IO_VALUE.LOW); IOMove(IO_Type.LLown_LineRun, IO_VALUE.LOW);
IOMove(IO_Type.LLow_StopCylinder3, IO_VALUE.LOW); IOMove(IO_Type.LLow_StopCylinder2, IO_VALUE.LOW);
// IOMove(IO_Type.S1_LineRun, IO_VALUE.HIGH); // IOMove(IO_Type.S1_LineRun, IO_VALUE.HIGH);
IOMove(IO_Type.M_LineRun, IO_VALUE.HIGH); IOMove(IO_Type.M_LineRun, IO_VALUE.HIGH);
// SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S1_LineRun, IO_VALUE.HIGH)); // SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S1_LineRun, IO_VALUE.HIGH));
...@@ -392,7 +391,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -392,7 +391,7 @@ namespace OnlineStore.DeviceLibrary
if (!IsUseRightHigh) if (!IsUseRightHigh)
{ {
S1Log(" 上层阻挡下降,上层链条转,中间链条转"); S1Log(" 上层阻挡下降,上层链条转,中间链条转");
IOMove(IO_Type.LHigh_StopCylinder3, IO_VALUE.HIGH, 2000); IOMove(IO_Type.LHigh_StopCylinder2, IO_VALUE.HIGH, 2000);
CheckAndMove(IO_Type.M_LeftStopCylinder, IO_VALUE.LOW); CheckAndMove(IO_Type.M_LeftStopCylinder, IO_VALUE.LOW);
CheckAndMove(IO_Type.M_RightStopCylinder, IO_VALUE.HIGH); CheckAndMove(IO_Type.M_RightStopCylinder, IO_VALUE.HIGH);
...@@ -546,7 +545,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -546,7 +545,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SOneMoveInfo.MoveStep.Equals(MoveStep.S1_27_S1ShelfGo)) else if (SOneMoveInfo.MoveStep.Equals(MoveStep.S1_27_S1ShelfGo))
{ {
S2LineStop(); //S2LineStop();
IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.LOW); IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.LOW);
//IOMove(IO_Type.S2_LineRun, IO_VALUE.LOW); //IOMove(IO_Type.S2_LineRun, IO_VALUE.LOW);
string log = S1SName + "已离开,阻挡2上升 ,清空绑定信息"; string log = S1SName + "已离开,阻挡2上升 ,清空绑定信息";
...@@ -588,7 +587,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -588,7 +587,7 @@ namespace OnlineStore.DeviceLibrary
S1_RightShelfId = S1_CurrShelfId; S1_RightShelfId = S1_CurrShelfId;
S1_CurrShelfId = ""; S1_CurrShelfId = "";
// IOMove(IO_Type.S2_LineRun, IO_VALUE.LOW); // IOMove(IO_Type.S2_LineRun, IO_VALUE.LOW);
S2LineStop(); //S2LineStop();
IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.LOW); IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.LOW);
Start_LeftShelfToS1(MoveStep.S1_32_LeftToS1, " 左->S1切换 :" + S1SName + "到达右侧,记录料架号,清空S1信息,"); Start_LeftShelfToS1(MoveStep.S1_32_LeftToS1, " 左->S1切换 :" + S1SName + "到达右侧,记录料架号,清空S1信息,");
...@@ -638,7 +637,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -638,7 +637,7 @@ namespace OnlineStore.DeviceLibrary
S1_CurrShelfId = ""; S1_CurrShelfId = "";
S2CanGetShelf = false; S2CanGetShelf = false;
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_LineRun, IO_VALUE.LOW)); //SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_LineRun, IO_VALUE.LOW));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCheck1, IO_VALUE.HIGH)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCheck1, IO_VALUE.HIGH));
CheckAndMove(IO_Type.S1_StopCylinder4, IO_VALUE.LOW); CheckAndMove(IO_Type.S1_StopCylinder4, IO_VALUE.LOW);
CheckAndMove(IO_Type.S1_StopCylinder2, IO_VALUE.HIGH); CheckAndMove(IO_Type.S1_StopCylinder2, IO_VALUE.HIGH);
...@@ -656,7 +655,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -656,7 +655,7 @@ namespace OnlineStore.DeviceLibrary
CheckAndMove(IO_Type.S1_StopCylinder1, IO_VALUE.HIGH); CheckAndMove(IO_Type.S1_StopCylinder1, IO_VALUE.HIGH);
S1BackRun(); S1BackRun();
S2BackRun(); //S2BackRun();
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S1_StopCheck2, IO_VALUE.HIGH)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S1_StopCheck2, IO_VALUE.HIGH));
} }
...@@ -677,7 +676,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -677,7 +676,7 @@ namespace OnlineStore.DeviceLibrary
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
S1LineStop(SOneMoveInfo); S1LineStop(SOneMoveInfo);
S2LineStop(SOneMoveInfo); //S2LineStop(SOneMoveInfo);
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
...@@ -957,7 +956,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -957,7 +956,7 @@ namespace OnlineStore.DeviceLibrary
S2CanGetShelf = false; S2CanGetShelf = false;
} }
CylinderMove(null, IO_Type.S1_TopCylinderUp, IO_Type.S1_TopCylinderDown); CylinderMove(null, IO_Type.S1_TopCylinderUp, IO_Type.S1_TopCylinderDown);
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_LineRun, IO_VALUE.LOW)); // SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_LineRun, IO_VALUE.LOW));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCheck1, IO_VALUE.LOW)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCheck1, IO_VALUE.LOW));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCylinder1, IO_VALUE.LOW)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCylinder1, IO_VALUE.LOW));
} }
...@@ -965,7 +964,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -965,7 +964,7 @@ namespace OnlineStore.DeviceLibrary
private void Start_S1ShelfToRight(MoveStep nextStep, string movetype, bool ShelfIsCanGo = false) private void Start_S1ShelfToRight(MoveStep nextStep, string movetype, bool ShelfIsCanGo = false)
{ {
SOneMoveInfo.NextMoveStep(nextStep); SOneMoveInfo.NextMoveStep(nextStep);
S1Log(" " + movetype + ":" + S1SName + " 先到右侧,阻挡1上升,S1正转,S2正转"); S1Log(" " + movetype + ":" + S1SName + " 先到右侧,阻挡1上升,S1正转");
S2CanGetShelf = ShelfIsCanGo; S2CanGetShelf = ShelfIsCanGo;
IOMove(IO_Type.S1_StopCylinder1, IO_VALUE.LOW); IOMove(IO_Type.S1_StopCylinder1, IO_VALUE.LOW);
IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.HIGH); IOMove(IO_Type.S1_StopCylinder2, IO_VALUE.HIGH);
...@@ -975,7 +974,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -975,7 +974,7 @@ namespace OnlineStore.DeviceLibrary
} }
CylinderMove(SOneMoveInfo, IO_Type.S1_TopCylinderUp, IO_Type.S1_TopCylinderDown); CylinderMove(SOneMoveInfo, IO_Type.S1_TopCylinderUp, IO_Type.S1_TopCylinderDown);
S1LineRun(); S1LineRun();
S2LineRun(); //S2LineRun();
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S1_StopCheck2, IO_VALUE.LOW)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S1_StopCheck2, IO_VALUE.LOW));
SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCheck1, IO_VALUE.HIGH)); SOneMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.S2_StopCheck1, IO_VALUE.HIGH));
} }
......
...@@ -29,9 +29,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -29,9 +29,9 @@ namespace OnlineStore.DeviceLibrary
//料架满 //料架满
} }
if (IOValue(IO_Type.LHigh_StopCheck3).Equals(IO_VALUE.LOW) && if (IOValue(IO_Type.LHigh_StopCheck2).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.LHigh_StopCylinder3).Equals(IO_VALUE.LOW) && IOValue(IO_Type.LHigh_StopCylinder2).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.LHigh_StopCheck2).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.LHigh_StopCheck1).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.LHigh_LineRun).Equals(IO_VALUE.LOW) && HighProcess.Equals(false) IOValue(IO_Type.LHigh_LineRun).Equals(IO_VALUE.LOW) && HighProcess.Equals(false)
) )
{ {
...@@ -43,10 +43,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -43,10 +43,10 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
HighProcess = true; HighProcess = true;
LogUtil.info("左侧双层线_" + "左上层放料架到阻挡3"); LogUtil.info("左侧双层线_" + "左上层放料架到阻挡2");
IOMove(IO_Type.LHigh_LineRun, IO_VALUE.HIGH, 30000); IOMove(IO_Type.LHigh_LineRun, IO_VALUE.HIGH, 30000);
IOMove(IO_Type.LHigh_StopCylinder2, IO_VALUE.HIGH, 3000); IOMove(IO_Type.LHigh_StopCylinder1, IO_VALUE.HIGH, 3000);
if (WaitIo(IO_Type.LHigh_StopCheck3, IO_VALUE.HIGH, 30000, "左侧_上层放料架到阻挡3")) if (WaitIo(IO_Type.LHigh_StopCheck2, IO_VALUE.HIGH, 30000, "左侧_上层放料架到阻挡2"))
{ {
IOMove(IO_Type.LHigh_LineRun, IO_VALUE.LOW); IOMove(IO_Type.LHigh_LineRun, IO_VALUE.LOW);
} }
...@@ -60,10 +60,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -60,10 +60,10 @@ namespace OnlineStore.DeviceLibrary
} }
if (IOValue(IO_Type.LLow_StopCheck3).Equals(IO_VALUE.LOW) && if (IOValue(IO_Type.LLow_StopCheck2).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.LLow_StopCylinder3).Equals(IO_VALUE.LOW) && IOValue(IO_Type.LLow_StopCheck1).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.LLow_StopCheck2).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.LLow_StopCylinder2).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.LLown_LineRun).Equals(IO_VALUE.LOW) && LowProcess.Equals(false)) IOValue(IO_Type.LLown_LineRun).Equals(IO_VALUE.LOW) && LowProcess.Equals(false))
{ {
bool isUseLowShelf = (SOneMoveInfo.MoveStep >= MoveStep.S1_C02_MDown && SOneMoveInfo.MoveStep <= MoveStep.S1_C05_CheckS1); bool isUseLowShelf = (SOneMoveInfo.MoveStep >= MoveStep.S1_C02_MDown && SOneMoveInfo.MoveStep <= MoveStep.S1_C05_CheckS1);
if (!isUseLowShelf && LineManager.checkWatch(lowWatch, 3000)) if (!isUseLowShelf && LineManager.checkWatch(lowWatch, 3000))
...@@ -72,10 +72,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -72,10 +72,10 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
LowProcess = true; LowProcess = true;
LogUtil.info("左侧双层线_" + "左下层放料架到阻挡3"); LogUtil.info("左侧双层线_" + "左下层放料架到阻挡2");
IOMove(IO_Type.LLown_LineRun, IO_VALUE.HIGH, 30000); IOMove(IO_Type.LLown_LineRun, IO_VALUE.HIGH, 30000);
IOMove(IO_Type.LLow_StopCylinder2, IO_VALUE.HIGH, 3000); IOMove(IO_Type.LLow_StopCylinder1, IO_VALUE.HIGH, 3000);
if (WaitIo(IO_Type.LLow_StopCheck3, IO_VALUE.HIGH, 30000, "左侧_下层放料架到阻挡3")) if (WaitIo(IO_Type.LLow_StopCheck2, IO_VALUE.HIGH, 30000, "左侧_下层放料架到阻挡2"))
{ {
IOMove(IO_Type.LLown_LineRun, IO_VALUE.LOW); IOMove(IO_Type.LLown_LineRun, IO_VALUE.LOW);
} }
...@@ -98,11 +98,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -98,11 +98,11 @@ namespace OnlineStore.DeviceLibrary
LeftUpdownRFID = RFIDManager.ReadRFID(Config.L_Updown_Rfid, false).NumStr(); LeftUpdownRFID = RFIDManager.ReadRFID(Config.L_Updown_Rfid, false).NumStr();
bool needProces = false; bool needProces = false;
//等待可放料架 //等待可放料架
if (LeftUpdownRFID.StartsWith(Static_String.SmallShelf_RFID_Prefix) && IOValue(IO_Type.LHigh_StopCheck1).Equals(IO_VALUE.LOW)) if (LeftUpdownRFID.StartsWith(Static_String.SmallShelf_RFID_Prefix) && IOValue(IO_Type.LHigh_FullCheck).Equals(IO_VALUE.LOW))
{ {
needProces = true; needProces = true;
} }
else if (LeftUpdownRFID.StartsWith(Static_String.BigShelf_RFID_Prefix) && IOValue(IO_Type.LLow_StopCheck1).Equals(IO_VALUE.LOW)) else if (LeftUpdownRFID.StartsWith(Static_String.BigShelf_RFID_Prefix) && IOValue(IO_Type.LLow_FullCheck).Equals(IO_VALUE.LOW))
{ {
needProces = true; needProces = true;
} }
...@@ -167,13 +167,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -167,13 +167,13 @@ namespace OnlineStore.DeviceLibrary
//等待可放料架 //等待可放料架
if (LeftUpdownRFID.StartsWith(Static_String.SmallShelf_RFID_Prefix)) if (LeftUpdownRFID.StartsWith(Static_String.SmallShelf_RFID_Prefix))
{ {
LogUtil.info(Name + MoveInfo.SLog + " :左侧新料架=" + LeftUpdownRFID + ",等待上层 LHigh_StopCheck1无信号"); LogUtil.info(Name + MoveInfo.SLog + " :左侧新料架=" + LeftUpdownRFID + ",等待上层 LHigh_FullCheck无信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LHigh_StopCheck1, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LHigh_FullCheck, IO_VALUE.LOW));
} }
else if (LeftUpdownRFID.StartsWith(Static_String.BigShelf_RFID_Prefix)) else if (LeftUpdownRFID.StartsWith(Static_String.BigShelf_RFID_Prefix))
{ {
LogUtil.info(Name + MoveInfo.SLog + " :左侧新料架=" + LeftUpdownRFID + ",等待下层 LLow_StopCheck1无信号"); LogUtil.info(Name + MoveInfo.SLog + " :左侧新料架=" + LeftUpdownRFID + ",等待下层 LLow_FullCheck无信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LLow_StopCheck1, IO_VALUE.LOW)); MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LLow_FullCheck, IO_VALUE.LOW));
} }
else else
{ {
......
...@@ -27,32 +27,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,32 +27,32 @@ namespace OnlineStore.DeviceLibrary
public static string updateDeviceAlarmMsg(List<AlarmMsg> msgList) public static string updateDeviceAlarmMsg(List<AlarmMsg> msgList)
{ {
string msg = ""; string msg = "";
try //try
{ //{
Dictionary<string, string> paramMap = new Dictionary<string, string>(); // Dictionary<string, string> paramMap = new Dictionary<string, string>();
string msgListStr = JsonHelper.SerializeObject(msgList); // string msgListStr = JsonHelper.SerializeObject(msgList);
paramMap.Add("deviceAlarmList", msgListStr); // paramMap.Add("deviceAlarmList", msgListStr);
string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap); // string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap);
DateTime startTime = DateTime.Now; // DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "", 2000); // string resultStr = HttpHelper.Post(server, "", 2000);
LogUtil.debug("updateDeviceAlarmMsg " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】"); // LogUtil.debug("updateDeviceAlarmMsg " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr); // RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
if (data == null) // if (data == null)
{ // {
return msg = " updateDeviceAlarmMsg 没有收到服务器反馈"; // return msg = " updateDeviceAlarmMsg 没有收到服务器反馈";
} // }
else if (data.code.Equals(0).Equals(false)) // else if (data.code.Equals(0).Equals(false))
{ // {
return msg = " updateDeviceAlarmMsg 【" + server + "】【" + resultStr + "】" + data.msg; // return msg = " updateDeviceAlarmMsg 【" + server + "】【" + resultStr + "】" + data.msg;
} // }
return ""; // return "";
} //}
catch (Exception ex) //catch (Exception ex)
{ //{
LogUtil.error(" updateDeviceAlarmMsg Error: " + ex.ToString()); // LogUtil.error(" updateDeviceAlarmMsg Error: " + ex.ToString());
} //}
return msg; return msg;
} }
private static string GetAddr(string addr, Dictionary<string, string> paramsMap) private static string GetAddr(string addr, Dictionary<string, string> paramsMap)
......

using Asa.RFID;
using OnlineStore.Common;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary
{
public class RFIDManager
{
private static ReadAll readAll = new ReadAll("TheRFID");
private static bool IsOpen = false;
private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>();
public static void Open(string[] iparray)
{
if (IsOpen)
{
return;
}
try
{
// readAll.Received += ReadAll_Received;
// readAll.Log += ReadAll_Log;
readAll.Start();
IsOpen = true;
}
catch (Exception ex)
{
LogUtil.error("Open 出错:" + ex.ToString());
}
}
private static void ReadAll_Log(string ip, string log)
{
LogUtil.LOGGER.Info("RFID : [" + ip + "] " + log);
}
public static RFIDData ReadRFID(string ip, bool isClear = false)
{
try
{
if (String.IsNullOrEmpty(ip).Equals(false))
{
if (isClear)
{
readAll.Clear(ip);
}
Thread.Sleep(1000);
string outValue = readAll.Read(ip);
if (outValue.Equals("000"))
{
// LogUtil.error("ReadRFID[" + ip + "]=" + outValue);
}
RFIDData data = new RFIDData(outValue);
return data;
}
}
catch (Exception ex)
{
LogUtil.error("ReadRFID[" + ip + "] [" + isClear + "] 出错:" + ex.ToString());
}
return new RFIDData();
}
public static void Close()
{
try
{
readAll.Stop();
}
catch (Exception ex)
{
LogUtil.error("关闭RFID出错:" + ex.ToString());
}
}
}
public class RFIDData
{
public string StrData = "";
public RFIDData(string data="00")
{
if (String.IsNullOrEmpty(data))
{
data = "00";
}
this.StrData = data;
}
public string NumStr()
{
return StrData;
}
internal static bool IsRealRfid(string shelfRfid)
{
//判断料架号是否是真实的料架号
if (shelfRfid.StartsWith("C") || shelfRfid.StartsWith("D"))
{
int num = -1;
try
{
num = Convert.ToInt32(shelfRfid.Substring(1, shelfRfid.Length - 1));
}
catch (Exception ex)
{
}
if (num > 0)
{
return true;
}
}
return false;
}
}
}
 using Asa.RFID;
using Asa.RFID;
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
...@@ -8,16 +7,21 @@ using System.Linq; ...@@ -8,16 +7,21 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class RFIDManager public class RFIDManager
{ {
private static ReadAll readAll = new ReadAll("TheRFID"); private static Asa.RFID.ReadAll read;
private static bool IsOpen = false; private static bool IsOpen = false;
private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>(); public static bool IsAuto = false;
public static void Open(string[] iparray) /// <summary>
/// 是否连接
/// </summary>
public static bool IsConnected { get; set; } = false;
private static Dictionary<string, string> LastRfidMap = new Dictionary<string, string>();
public static void Open(string[] ip)
{ {
if (IsOpen) if (IsOpen)
{ {
...@@ -25,9 +29,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,9 +29,9 @@ namespace OnlineStore.DeviceLibrary
} }
try try
{ {
// readAll.Received += ReadAll_Received; read = new ReadAll("TheRFID");
// readAll.Log += ReadAll_Log; read.Received += Read_Received;
readAll.Start(); read.Start(12001);
IsOpen = true; IsOpen = true;
} }
catch (Exception ex) catch (Exception ex)
...@@ -35,14 +39,40 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,14 +39,40 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error("Open 出错:" + ex.ToString()); LogUtil.error("Open 出错:" + ex.ToString());
} }
} }
private static string lastStr = "";
private static void Read_Received(string ip, string id)
{
try
{
if(LastRfidMap.ContainsKey(ip))
{
LastRfidMap[ip] = id;
}
else
{
LastRfidMap.Add(ip,id);
}
}
catch (ObjectDisposedException ex)
{
//程序刚退出,又回传数据
}
}
private static void ReadAll_Log(string ip, string log) private static void ReadAll_Log(string ip, string log)
{ {
LogUtil.LOGGER.Info("RFID : [" + ip + "] " + log); string str = "RFID : [" + ip + "] " + log;
if (lastStr.Equals(str))
{
return;
}
LogUtil.info(str);
lastStr = str;
} }
public static RFIDData ReadRFID(string ip, bool isClear = false) public static RFIDData ReadRFID(string ip,bool isClear= true)
{ {
try try
{ {
...@@ -50,15 +80,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -50,15 +80,13 @@ namespace OnlineStore.DeviceLibrary
{ {
if (isClear) if (isClear)
{ {
readAll.Clear(ip); read.Clear(ip);
}
Thread.Sleep(1000);
string outValue = readAll.Read(ip);
if (outValue.Equals("000"))
{
// LogUtil.error("ReadRFID[" + ip + "]=" + outValue);
} }
Thread.Sleep(100);
string outValue = read.Read(ip);
RFIDData data = new RFIDData(outValue); RFIDData data = new RFIDData(outValue);
return data; return data;
} }
} }
...@@ -74,7 +102,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -74,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
readAll.Stop(); read.Stop();
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -86,7 +114,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -86,7 +114,7 @@ namespace OnlineStore.DeviceLibrary
public class RFIDData public class RFIDData
{ {
public string StrData = ""; public string StrData = "";
public RFIDData(string data="00") public RFIDData(string data = "00")
{ {
if (String.IsNullOrEmpty(data)) if (String.IsNullOrEmpty(data))
{ {
...@@ -94,29 +122,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -94,29 +122,29 @@ namespace OnlineStore.DeviceLibrary
} }
this.StrData = data; this.StrData = data;
} }
public string NumStr() public string NumStr()
{ {
return StrData; return StrData;
} }
internal static bool IsRealRfid(string shelfRfid) internal static bool IsRealRfid(string shelfRfid)
{ {
//判断料架号是否是真实的料架号 //判断料架号是否是真实的料架号
if (shelfRfid.StartsWith("C") || shelfRfid.StartsWith("D")) if (shelfRfid.StartsWith("C") || shelfRfid.StartsWith("D"))
{ {
int num = -1; int num = -1;
try try
{ {
num = Convert.ToInt32(shelfRfid.Substring(1, shelfRfid.Length - 1)); num = Convert.ToInt32(shelfRfid.Substring(1, shelfRfid.Length - 1));
} }
catch (Exception ex) catch (Exception ex)
{ {
} }
if (num > 0) if (num > 0)
{ {
return true; return true;
} }
} }
return false; return false;
} }
......
...@@ -96,8 +96,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -96,8 +96,8 @@ namespace OnlineStore.DeviceLibrary
if (agvClient_Dbline.A5_ReadyEnter) if (agvClient_Dbline.A5_ReadyEnter)
{ {
//检测左侧升降无料架,且在下方,并且料架没满 //检测左侧升降无料架,且在下方,并且料架没满
bool topFull = IOValue(IO_Type.LHigh_StopCheck1).Equals(IO_VALUE.HIGH); bool topFull = IOValue(IO_Type.LHigh_FullCheck).Equals(IO_VALUE.HIGH);
bool bottomFull = IOValue(IO_Type.LLow_StopCheck1).Equals(IO_VALUE.HIGH); bool bottomFull = IOValue(IO_Type.LLow_FullCheck).Equals(IO_VALUE.HIGH);
bool hasShelfLeft = IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH); bool hasShelfLeft = IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH);
bool hasShelfRight = IOValue(IO_Type.Line_StopCheck).Equals(IO_VALUE.HIGH); bool hasShelfRight = IOValue(IO_Type.Line_StopCheck).Equals(IO_VALUE.HIGH);
//升降机在上方 //升降机在上方
...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,7 +183,7 @@ namespace OnlineStore.DeviceLibrary
//升降机在下方 //升降机在下方
bool isRightUpdownDown = CylinderIsOk(IO_Type.R_Updown_Up, IO_Type.R_Updown_Down); bool isRightUpdownDown = CylinderIsOk(IO_Type.R_Updown_Up, IO_Type.R_Updown_Down);
//上层料满 //上层料满
bool topFull = IOValue(IO_Type.RHigh_StopCheck1).Equals(IO_VALUE.HIGH); bool topFull = IOValue(IO_Type.RHigh_FullCheck).Equals(IO_VALUE.HIGH);
if (isChainRun || !isRightUpdownDown || topFull)//料盘无法送入 if (isChainRun || !isRightUpdownDown || topFull)//料盘无法送入
{ {
string msg = "A6 "; string msg = "A6 ";
...@@ -200,13 +200,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -200,13 +200,13 @@ namespace OnlineStore.DeviceLibrary
msg = msg + "上层料满,"; msg = msg + "上层料满,";
} }
//有料架或线上无空间 //有料架或线上无空间
benQInStepRight.Msg = msg + "送料 BenQ AGV 不允许进入,"; benQInStepRight.Msg = msg + "送料AGV 不允许进入,";
benQInStepRight.ToNextStep(BenQ_IN_STEP.NONE); benQInStepRight.ToNextStep(BenQ_IN_STEP.NONE);
} }
else else
{ {
agvClient_Dbline.MayEnter("A6"); agvClient_Dbline.MayEnter("A6");
benQInStepRight.Msg = "BenQ AGV 料架准备送入,链条启动"; benQInStepRight.Msg = "产线AGV 料架准备送入,链条启动";
benQInStepRight.ToNextStep(BenQ_IN_STEP.SHELT_IN); benQInStepRight.ToNextStep(BenQ_IN_STEP.SHELT_IN);
benQInStepRight.AddIoWait(IO_Type.R_RightStopCheck, IO_VALUE.HIGH); benQInStepRight.AddIoWait(IO_Type.R_RightStopCheck, IO_VALUE.HIGH);
benQInStepRight.AddIoWait(IO_Type.R_LeftStopCheck, IO_VALUE.HIGH); benQInStepRight.AddIoWait(IO_Type.R_LeftStopCheck, IO_VALUE.HIGH);
...@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -372,7 +372,7 @@ namespace OnlineStore.DeviceLibrary
if (agvClient_Dbline.A6_InProcess) if (agvClient_Dbline.A6_InProcess)
return; return;
//上层料满 //上层料满
bool topfull = IOValue(IO_Type.RHigh_StopCheck1).Equals(IO_VALUE.HIGH); bool topfull = IOValue(IO_Type.RHigh_FullCheck).Equals(IO_VALUE.HIGH);
//下层有料出 //下层有料出
bool bottomfull = IOValue(IO_Type.R_StopCheck2).Equals(IO_VALUE.HIGH); bool bottomfull = IOValue(IO_Type.R_StopCheck2).Equals(IO_VALUE.HIGH);
...@@ -414,10 +414,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -414,10 +414,10 @@ namespace OnlineStore.DeviceLibrary
{ {
if (agvClient_Dbline.A5_InProcess) if (agvClient_Dbline.A5_InProcess)
return; return;
bool topFull = IOValue(IO_Type.LHigh_StopCheck1).Equals(IO_VALUE.HIGH); bool topFull = IOValue(IO_Type.LHigh_FullCheck).Equals(IO_VALUE.HIGH);
bool bottomFull = IOValue(IO_Type.LLow_StopCheck1).Equals(IO_VALUE.HIGH); bool bottomFull = IOValue(IO_Type.LLow_FullCheck).Equals(IO_VALUE.HIGH);
//左侧上层只剩最后一个料,优先级最高 //左侧上层只剩最后一个料,优先级最高
bool topX613 = IOValue(IO_Type.LHigh_StopCheck2).Equals(IO_VALUE.HIGH); bool topX613 = IOValue(IO_Type.LHigh_StopCheck1).Equals(IO_VALUE.HIGH);
//提升机上有料 //提升机上有料
bool hasShelfLeft = IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH); bool hasShelfLeft = IOValue(IO_Type.Line_InCheck).Equals(IO_VALUE.HIGH);
bool hasShelfRight = IOValue(IO_Type.Line_StopCheck).Equals(IO_VALUE.HIGH); bool hasShelfRight = IOValue(IO_Type.Line_StopCheck).Equals(IO_VALUE.HIGH);
......
...@@ -14,17 +14,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,17 +14,17 @@ namespace OnlineStore.DeviceLibrary
DoubleLineConfig Config; DoubleLineConfig Config;
static String agvServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp); static String agvServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp);
Asa.AgvClient agvClient = new Asa.AgvClient(agvServerIp); //Asa.AgvClient agvClient = new Asa.AgvClient(agvServerIp);
AgvClient_Dbline agvClient_Dbline = new AgvClient_Dbline(); AgvClient_Dbline agvClient_Dbline = new AgvClient_Dbline();
public PackageLine(DoubleLineConfig config) : base(config) public PackageLine(DoubleLineConfig config) : base(config)
{ {
this.Config = config; this.Config = config;
agvClient.CancelState = false; //agvClient.CancelState = false;
agvClient.Log += AgvClient_Log; //agvClient.Log += AgvClient_Log;
agvClient.Ready += AgvClient_Ready; //agvClient.Ready += AgvClient_Ready;
agvClient.CloseDoor += AgvClient_CloseDoor; //agvClient.CloseDoor += AgvClient_CloseDoor;
mainTimer.Elapsed += packageLineProcess; mainTimer.Elapsed += packageLineProcess;
agvClient_Dbline.Init(); agvClient_Dbline.Init();
} }
...@@ -39,43 +39,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -39,43 +39,43 @@ namespace OnlineStore.DeviceLibrary
public override void Reset() public override void Reset()
{ {
LogUtil.info("包装线体开始复位"); LogUtil.info("双层线出入口开始复位");
mainStep = new StepInfo<MAIN_STEP>(MAIN_STEP.NONE); mainStep = new StepInfo<MAIN_STEP>(MAIN_STEP.NONE);
agvA3Step = new StepInfo<AGV_ENTER_A3_STEP>(AGV_ENTER_A3_STEP.NONE); //agvA3Step = new StepInfo<AGV_ENTER_A3_STEP>(AGV_ENTER_A3_STEP.NONE);
agvA4Step = new StepInfo<AGV_LEAVE_A4_STEP>(AGV_LEAVE_A4_STEP.NONE); // agvA4Step = new StepInfo<AGV_LEAVE_A4_STEP>(AGV_LEAVE_A4_STEP.NONE);
inStep = new StepInfo<IN_SHELF>(IN_SHELF.NONE); inStep = new StepInfo<IN_SHELF>(IN_SHELF.NONE);
pkgStationStep = new StepInfo<PKG_STATION_STEP>(PKG_STATION_STEP.NONE); //pkgStationStep = new StepInfo<PKG_STATION_STEP>(PKG_STATION_STEP.NONE);
s2StationStep = new StepInfo<S2_STATION_STEP>(S2_STATION_STEP.NONE); //s2StationStep = new StepInfo<S2_STATION_STEP>(S2_STATION_STEP.NONE);
benQInStepLeft = new StepInfo<BenQ_IN_STEP>(BenQ_IN_STEP.NONE); benQInStepLeft = new StepInfo<BenQ_IN_STEP>(BenQ_IN_STEP.NONE);
benQInStepRight = new StepInfo<BenQ_IN_STEP>(BenQ_IN_STEP.NONE); benQInStepRight = new StepInfo<BenQ_IN_STEP>(BenQ_IN_STEP.NONE);
benQOutStep = new StepInfo<BenQ_OUT_STEP>(BenQ_OUT_STEP.NONE); benQOutStep = new StepInfo<BenQ_OUT_STEP>(BenQ_OUT_STEP.NONE);
//判断机器人是否连接,若未连接,直接连接 //判断机器人是否连接,若未连接,直接连接
if (!ABBControl.IsConnected(Config.ABB3_IP)) //if (!ABBControl.IsConnected(Config.ABB3_IP))
{ //{
ABBControl.StartABBControl(Config.ABB3_IP); // ABBControl.StartABBControl(Config.ABB3_IP);
} //}
if (!agvClient.IsConn) //if (!agvClient.IsConn)
{ //{
LogUtil.info("开始连接AGV服务"); // LogUtil.info("开始连接AGV服务");
agvClient.Connect(); // agvClient.Connect();
} //}
if (!agvClient_Dbline.ISConnected()) if (!agvClient_Dbline.ISConnected())
{ {
agvClient_Dbline.agvClient.Connect(); agvClient_Dbline.agvClient.Connect();
LogUtil.info("开启BenQ AGV 连接"); LogUtil.info("开启产线 AGV 连接");
} }
//包装线体工位下降 //包装线体工位下降
CylinderMove(null, IO_Type.Pkg_Station_SOL_UP, IO_Type.Pkg_Station_SOL_Down); //CylinderMove(null, IO_Type.Pkg_Station_SOL_UP, IO_Type.Pkg_Station_SOL_Down);
//阻挡1下降 2上升 3上升 4上升 //阻挡1下降 2上升 3上升 4上升
IOMove(IO_Type.Pkg_Stop1_Down, IO_VALUE.HIGH); //IOMove(IO_Type.Pkg_Stop1_Down, IO_VALUE.HIGH);
IOMove(IO_Type.Pkg_Stop2_Down, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Stop2_Down, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Stop3_Down, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Stop3_Down, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Out_Stop_Down, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Out_Stop_Down, IO_VALUE.LOW);
//双层线上层阻挡 //双层线上层阻挡
IOMove(IO_Type.RHigh_StopCylinder1, IO_VALUE.HIGH); IOMove(IO_Type.RHigh_StopCylinder1, IO_VALUE.HIGH);
...@@ -84,14 +84,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -84,14 +84,14 @@ namespace OnlineStore.DeviceLibrary
// //
LogUtil.info(Name + " 线体复位:线体转30秒"); LogUtil.info(Name + " 线体复位:线体转30秒");
int lineRunTime = 30000; int lineRunTime = 30000;
IOMove(IO_Type.Pkg_Line1_Forward, IO_VALUE.HIGH, lineRunTime); //IOMove(IO_Type.Pkg_Line1_Forward, IO_VALUE.HIGH, lineRunTime);
IOMove(IO_Type.Pkg_Line2_Forward, IO_VALUE.HIGH, lineRunTime); //IOMove(IO_Type.Pkg_Line2_Forward, IO_VALUE.HIGH, lineRunTime);
IOMove(IO_Type.Pkg_Line3_Forward, IO_VALUE.HIGH, lineRunTime); //IOMove(IO_Type.Pkg_Line3_Forward, IO_VALUE.HIGH, lineRunTime);
IOMove(IO_Type.RHigh_LineRun, IO_VALUE.HIGH, lineRunTime); IOMove(IO_Type.RHigh_LineRun, IO_VALUE.HIGH, lineRunTime);
//S2工位 //S2工位
IOMove(IO_Type.S2_StopCylinder1, IO_VALUE.LOW); //IOMove(IO_Type.S2_StopCylinder1, IO_VALUE.LOW);
IOMove(IO_Type.S2_StopCylinder2, IO_VALUE.LOW); // IOMove(IO_Type.S2_StopCylinder2, IO_VALUE.LOW);
//双层线出料口 //双层线出料口
IOMove(IO_Type.R_StopCylinder1, IO_VALUE.HIGH); IOMove(IO_Type.R_StopCylinder1, IO_VALUE.HIGH);
...@@ -115,11 +115,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -115,11 +115,11 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
ProcessA3Agv(); //ProcessA3Agv();
ProcessA4Agv(); //ProcessA4Agv();
ProcessInShelf(); //ProcessInShelf();
ProcessPkgStation(); //ProcessPkgStation();
ProcessS2Station(); //ProcessS2Station();
ProcessBenQLeftEnter(); ProcessBenQLeftEnter();
ProcessBenQRightEnter(); ProcessBenQRightEnter();
ProcessBenQLeave(); ProcessBenQLeave();
...@@ -137,7 +137,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -137,7 +137,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (mainStep.IsFinished()) if (mainStep.IsFinished())
{ {
LogUtil.info("包装线体复位完成"); LogUtil.info("双层线出入口复位完成");
mainStep.ToNextStep(MAIN_STEP.RUN); mainStep.ToNextStep(MAIN_STEP.RUN);
} }
} }
...@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary
public override bool StartRun() public override bool StartRun()
{ {
LogUtil.info(Name + "包装线开始启动,启动时间:" + DateTime.Now); LogUtil.info(Name + "双层线出入口开始启动,启动时间:" + DateTime.Now);
Reset(); Reset();
return true; return true;
} }
...@@ -153,23 +153,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,23 +153,23 @@ namespace OnlineStore.DeviceLibrary
public override void StopMove() public override void StopMove()
{ {
mainStep.ToNextStep(MAIN_STEP.NONE); mainStep.ToNextStep(MAIN_STEP.NONE);
LogUtil.info(Name + " 包装线体停止"); LogUtil.info(Name + " 双层线出入口停止");
//包装线体工位下降 //包装线体工位下降
CylinderMove(null, IO_Type.Pkg_Station_SOL_UP, IO_Type.Pkg_Station_SOL_Down); //CylinderMove(null, IO_Type.Pkg_Station_SOL_UP, IO_Type.Pkg_Station_SOL_Down);
IOMove(IO_Type.Pkg_Stop1_Down, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Stop1_Down, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Stop2_Down, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Stop2_Down, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Stop3_Down, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Stop3_Down, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Out_Stop_Down, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Out_Stop_Down, IO_VALUE.LOW);
// ////
IOMove(IO_Type.Pkg_Line1_Forward, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Line1_Forward, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Line2_Forward, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Line2_Forward, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Line3_Forward, IO_VALUE.LOW); //IOMove(IO_Type.Pkg_Line3_Forward, IO_VALUE.LOW);
//S2工位 //S2工位
IOMove(IO_Type.S2_StopCylinder1, IO_VALUE.LOW); IOMove(IO_Type.S2_StopCylinder1, IO_VALUE.LOW);
IOMove(IO_Type.S2_StopCylinder2, IO_VALUE.LOW); //IOMove(IO_Type.S2_StopCylinder2, IO_VALUE.LOW);
//双层线出料口 //双层线出料口
IOMove(IO_Type.R_StopCylinder1, IO_VALUE.HIGH); IOMove(IO_Type.R_StopCylinder1, IO_VALUE.HIGH);
...@@ -181,27 +181,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -181,27 +181,27 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.R_LineRun, IO_VALUE.LOW); IOMove(IO_Type.R_LineRun, IO_VALUE.LOW);
try //try
{ //{
if (!agvClient.IsConn) // if (!agvClient.IsConn)
{ // {
LogUtil.info("停止AGV服务"); // LogUtil.info("停止AGV服务");
agvClient.Close(); // agvClient.Close();
} // }
} //}
catch (Exception ex) //catch (Exception ex)
{ //{
LogUtil.error("停止AGV服务出错", ex); // LogUtil.error("停止AGV服务出错", ex);
} //}
try try
{ {
LogUtil.info("停止BenQ AGV服务"); LogUtil.info("停止产线 AGV服务");
agvClient_Dbline.Dispose(); agvClient_Dbline.Dispose();
} }
catch(Exception ex) catch(Exception ex)
{ {
LogUtil.error("停止BenQ AGV服务出错", ex); LogUtil.error("停止产线 AGV服务出错", ex);
} }
} }
......
...@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,7 +62,7 @@ namespace OnlineStore.DeviceLibrary
bool hasShelfRight = IOValue(IO_Type.R_RightStopCheck).Equals(IO_VALUE.HIGH); bool hasShelfRight = IOValue(IO_Type.R_RightStopCheck).Equals(IO_VALUE.HIGH);
bool noShelfLeft = IOValue(IO_Type.R_LeftStopCheck).Equals(IO_VALUE.LOW); bool noShelfLeft = IOValue(IO_Type.R_LeftStopCheck).Equals(IO_VALUE.LOW);
//上层料满 //上层料满
bool full = IOValue(IO_Type.RHigh_StopCheck1).Equals(IO_VALUE.HIGH); bool full = IOValue(IO_Type.RHigh_FullCheck).Equals(IO_VALUE.HIGH);
bool chainNoRun = IOValue(IO_Type.R_OutLineRun).Equals(IO_VALUE.LOW); bool chainNoRun = IOValue(IO_Type.R_OutLineRun).Equals(IO_VALUE.LOW);
//判断是否是手动拉料架 //判断是否是手动拉料架
if (!hasShelfRight && !noShelfLeft && chainNoRun) if (!hasShelfRight && !noShelfLeft && chainNoRun)
......
...@@ -28,42 +28,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -28,42 +28,42 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 料架进入处理 /// 料架进入处理
/// </summary> /// </summary>
private void ProcessInShelf() //private void ProcessInShelf()
{ //{
//检测左侧入口IO,检测到后线体转60S // //检测左侧入口IO,检测到后线体转60S
bool hasShelfIn = IOValue(IO_Type.Pkg_In_Check).Equals(IO_VALUE.HIGH); // bool hasShelfIn = IOValue(IO_Type.Pkg_In_Check).Equals(IO_VALUE.HIGH);
if (hasShelfIn) // if (hasShelfIn)
{ // {
inStep.Msg = "包装线检测到有料架进入,启动线体1和2"; // inStep.Msg = "包装线检测到有料架进入,启动线体1和2";
inStep.ToNextStep(IN_SHELF.LINE_RUN); // inStep.ToNextStep(IN_SHELF.LINE_RUN);
int lineRunTime = 60000; // int lineRunTime = 60000;
inStep.AddTimeWait(lineRunTime); // inStep.AddTimeWait(lineRunTime);
inStep.AddIoWait(IO_Type.Pkg_Stop_Check2, IO_VALUE.HIGH); // inStep.AddIoWait(IO_Type.Pkg_Stop_Check2, IO_VALUE.HIGH);
KeepLineRun(IO_Type.Pkg_Line1_Forward); // KeepLineRun(IO_Type.Pkg_Line1_Forward);
KeepLineRun(IO_Type.Pkg_Line2_Forward); // KeepLineRun(IO_Type.Pkg_Line2_Forward);
} // }
if (inStep.IsStep(IN_SHELF.NONE)) // if (inStep.IsStep(IN_SHELF.NONE))
{ // {
} // }
else if (inStep.IsStep(IN_SHELF.LINE_RUN)) // else if (inStep.IsStep(IN_SHELF.LINE_RUN))
{ // {
if (inStep.IsFinished()) // if (inStep.IsFinished())
{ // {
inStep.Msg = "包装线料架进入后,线体已启动60秒,停止线体"; // inStep.Msg = "包装线料架进入后,线体已启动60秒,停止线体";
//10秒已到,停止线体 // //10秒已到,停止线体
inStep.ToNextStep(IN_SHELF.NONE); // inStep.ToNextStep(IN_SHELF.NONE);
IOMove(IO_Type.Pkg_Line1_Forward, IO_VALUE.LOW); // IOMove(IO_Type.Pkg_Line1_Forward, IO_VALUE.LOW);
IOMove(IO_Type.Pkg_Line2_Forward, IO_VALUE.LOW); // IOMove(IO_Type.Pkg_Line2_Forward, IO_VALUE.LOW);
} // }
else // else
{ // {
KeepLineRun(IO_Type.Pkg_Line1_Forward); // KeepLineRun(IO_Type.Pkg_Line1_Forward);
KeepLineRun(IO_Type.Pkg_Line2_Forward); // KeepLineRun(IO_Type.Pkg_Line2_Forward);
} // }
} // }
} //}
} }
} }
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
</logger> </logger>
<logger name="TheRFID"> <logger name="TheRFID">
<level value="Error" /> <level value="Info" />
<appender-ref ref="TheRFID" /> <appender-ref ref="TheRFID" />
</logger> </logger>
<!--<root> <!--<root>
......
...@@ -18,7 +18,7 @@ namespace OnlineStore.DoubleLineClient ...@@ -18,7 +18,7 @@ namespace OnlineStore.DoubleLineClient
{ {
InitializeComponent(); InitializeComponent();
} }
private List<Control> DILabel = new List<Control>(); private List<Control> DILabel = new List<Control>();
private List<Control> doList = new List<Control>(); private List<Control> doList = new List<Control>();
private void FrmDbLineIO_Load(object sender, EventArgs e) private void FrmDbLineIO_Load(object sender, EventArgs e)
{ {
...@@ -31,13 +31,13 @@ namespace OnlineStore.DoubleLineClient ...@@ -31,13 +31,13 @@ namespace OnlineStore.DoubleLineClient
{ {
DILabel = new List<Control>(); DILabel = new List<Control>();
doList = new List<Control>(); doList = new List<Control>();
foreach(Control con in this.Controls) foreach (Control con in this.Controls)
{ {
if(con is GroupBox) if (con is GroupBox)
{ {
foreach(Control c in con.Controls) foreach (Control c in con.Controls)
{ {
if(c is Label) if (c is Label)
{ {
if (LineManager.Line.Config.DIList.ContainsKey(c.Name)) if (LineManager.Line.Config.DIList.ContainsKey(c.Name))
{ {
...@@ -63,14 +63,15 @@ namespace OnlineStore.DoubleLineClient ...@@ -63,14 +63,15 @@ namespace OnlineStore.DoubleLineClient
if (!this.Visible) if (!this.Visible)
{ {
return; return;
} }
foreach (Control labl in DILabel) foreach (Control labl in DILabel)
{ {
IO_VALUE value = LineManager.Line.IOValue(labl.Name); IO_VALUE value = LineManager.Line.IOValue(labl.Name);
if (value.Equals(IO_VALUE.HIGH)) if (value.Equals(IO_VALUE.HIGH))
{ {
labl.BackColor = Color.LawnGreen; labl.BackColor = Color.LawnGreen;
}else if (value.Equals(IO_VALUE.LOW)) }
else if (value.Equals(IO_VALUE.LOW))
{ {
labl.BackColor = Color.LightGray; labl.BackColor = Color.LightGray;
} }
...@@ -84,11 +85,21 @@ namespace OnlineStore.DoubleLineClient ...@@ -84,11 +85,21 @@ namespace OnlineStore.DoubleLineClient
} }
else if (value.Equals(IO_VALUE.LOW)) else if (value.Equals(IO_VALUE.LOW))
{ {
labl.BackColor = labl.Parent.BackColor ; labl.BackColor = labl.Parent.BackColor;
//labl.BackColor = Color.LightGray; //labl.BackColor = Color.LightGray;
} }
} }
if (LineManager.Line.RfidIpList != null && LineManager.Line.RfidIpList.Count > 0)
{
string tmp = "";
foreach (string con in LineManager.Line.RfidIpList)
{
tmp += con + ":" + RFIDManager.ReadRFID(con).NumStr() + "\r\t";
}
this.Invoke(new Action(() => {
label1.Text = tmp;
}));
}
} }
private void Line_StopCylinder_Click(object sender, EventArgs e) private void Line_StopCylinder_Click(object sender, EventArgs e)
...@@ -144,13 +155,13 @@ namespace OnlineStore.DoubleLineClient ...@@ -144,13 +155,13 @@ namespace OnlineStore.DoubleLineClient
private void btnS2Up_Click(object sender, EventArgs e) private void btnS2Up_Click(object sender, EventArgs e)
{ {
LineManager.Line.CylinderMove(null, IO_Type.S2_TopCylinderDown, IO_Type.S2_TopCylinderUp); // LineManager.Line.CylinderMove(null, IO_Type.S2_TopCylinderDown, IO_Type.S2_TopCylinderUp);
} }
private void btnS2Down_Click(object sender, EventArgs e) private void btnS2Down_Click(object sender, EventArgs e)
{ {
LineManager.Line.CylinderMove(null, IO_Type.S2_TopCylinderUp, IO_Type.S2_TopCylinderDown); // LineManager.Line.CylinderMove(null, IO_Type.S2_TopCylinderUp, IO_Type.S2_TopCylinderDown);
} }
private void btnRUp_Click(object sender, EventArgs e) private void btnRUp_Click(object sender, EventArgs e)
...@@ -182,5 +193,9 @@ namespace OnlineStore.DoubleLineClient ...@@ -182,5 +193,9 @@ namespace OnlineStore.DoubleLineClient
LineManager.Line.IOMove(IO_Type.S1_LineRun, IO_VALUE.LOW); LineManager.Line.IOMove(IO_Type.S1_LineRun, IO_VALUE.LOW);
} }
private void btnInitRFID_Click(object sender, EventArgs e)
{
}
} }
} }
...@@ -65,8 +65,8 @@ namespace OnlineStore.DoubleLineClient ...@@ -65,8 +65,8 @@ namespace OnlineStore.DoubleLineClient
AddForm(" 线体操作调试 ", frmdb); AddForm(" 线体操作调试 ", frmdb);
frmdb.btnBack.Click += BtnBack_Click; frmdb.btnBack.Click += BtnBack_Click;
PackageLineClien pakageLineClient = new PackageLineClien(); //PackageLineClien pakageLineClient = new PackageLineClien();
AddForm(" 包装线 ", pakageLineClient); //AddForm(" 包装线 ", pakageLineClient);
LoadOk = true; LoadOk = true;
} }
...@@ -126,11 +126,11 @@ namespace OnlineStore.DoubleLineClient ...@@ -126,11 +126,11 @@ namespace OnlineStore.DoubleLineClient
isAlarm = true; isAlarm = true;
msglist.Add(new AlarmMsg("1号机器人", "doubleLine.RightRobot.WarnMsg", DoubleLine.RightRobot.WarnMsg)); msglist.Add(new AlarmMsg("1号机器人", "doubleLine.RightRobot.WarnMsg", DoubleLine.RightRobot.WarnMsg));
} }
if (!LineManager.packageLine.A4_Shelf_Exist) //if (!LineManager.packageLine.A4_Shelf_Exist)
{ //{
isAlarm = true; // isAlarm = true;
msglist.Add(new AlarmMsg("A4包装线出口状态", "doubleLine.packageLine.agvA4Step.Msg", LineManager.packageLine.agvA4Step.Msg)); // msglist.Add(new AlarmMsg("A4包装线出口状态", "doubleLine.packageLine.agvA4Step.Msg", LineManager.packageLine.agvA4Step.Msg));
} //}
if (!LineManager.packageLine.LeftAllowIn) if (!LineManager.packageLine.LeftAllowIn)
{ {
isAlarm = true; isAlarm = true;
......
...@@ -273,7 +273,7 @@ namespace OnlineStore.DoubleLineClient ...@@ -273,7 +273,7 @@ namespace OnlineStore.DoubleLineClient
private void btnDriveMotor_Run_Click(object sender, EventArgs e) private void btnDriveMotor_Run_Click(object sender, EventArgs e)
{ {
BtnMove(btnNGCylinder, "左侧升降机下降", "左侧升降机上升", IO_Type.L_Updown_Up, IO_Type.L_Updown_Down); BtnMove(btnDriveMotor_Run, "左侧升降机下降", "左侧升降机上升", IO_Type.L_Updown_Up, IO_Type.L_Updown_Down);
} }
private void btnNGCylinder_Click(object sender, EventArgs e) private void btnNGCylinder_Click(object sender, EventArgs e)
...@@ -290,7 +290,7 @@ namespace OnlineStore.DoubleLineClient ...@@ -290,7 +290,7 @@ namespace OnlineStore.DoubleLineClient
private void btnSw1Location_Click(object sender, EventArgs e) private void btnSw1Location_Click(object sender, EventArgs e)
{ {
BtnMove(btnSw1Location, "工位2顶升下降", "工位2顶升上升", IO_Type.S2_TopCylinderUp, IO_Type.S2_TopCylinderDown); // BtnMove(btnSw1Location, "工位2顶升下降", "工位2顶升上升", IO_Type.S2_TopCylinderUp, IO_Type.S2_TopCylinderDown);
} }
private void btnSw4Location_Click(object sender, EventArgs e) private void btnSw4Location_Click(object sender, EventArgs e)
......
...@@ -77,17 +77,17 @@ namespace OnlineStore.DoubleLineClient ...@@ -77,17 +77,17 @@ namespace OnlineStore.DoubleLineClient
private void updateStatus() private void updateStatus()
{ {
pkgStationStatus.Text = LineManager.packageLine.pkgStationStep.StatusStr(); //pkgStationStatus.Text = LineManager.packageLine.pkgStationStep.StatusStr();
pkgStatusMsg.Text = LineManager.packageLine.pkgStationStep.Msg; //pkgStatusMsg.Text = LineManager.packageLine.pkgStationStep.Msg;
agvA3Status.Text = LineManager.packageLine.agvA3Step.StatusStr(); //agvA3Status.Text = LineManager.packageLine.agvA3Step.StatusStr();
agvA3Msg.Text = LineManager.packageLine.agvA3Step.Msg; //agvA3Msg.Text = LineManager.packageLine.agvA3Step.Msg;
agvA4Status.Text = LineManager.packageLine.agvA4Step.StatusStr(); //agvA4Status.Text = LineManager.packageLine.agvA4Step.StatusStr();
agvA4Msg.Text = LineManager.packageLine.agvA4Step.Msg; //agvA4Msg.Text = LineManager.packageLine.agvA4Step.Msg;
s2StationStatus.Text = LineManager.packageLine.s2StationStep.StatusStr(); //s2StationStatus.Text = LineManager.packageLine.s2StationStep.StatusStr();
s2StationMsg.Text = LineManager.packageLine.s2StationStep.Msg; //s2StationMsg.Text = LineManager.packageLine.s2StationStep.Msg;
benQLeftInStatus.Text = LineManager.packageLine.benQInStepLeft.StatusStr(); benQLeftInStatus.Text = LineManager.packageLine.benQInStepLeft.StatusStr();
benQLeftInMsg.Text = LineManager.packageLine.benQInStepLeft.Msg; benQLeftInMsg.Text = LineManager.packageLine.benQInStepLeft.Msg;
...@@ -139,12 +139,12 @@ namespace OnlineStore.DoubleLineClient ...@@ -139,12 +139,12 @@ namespace OnlineStore.DoubleLineClient
private void btnS2Down_Click(object sender, EventArgs e) private void btnS2Down_Click(object sender, EventArgs e)
{ {
LineManager.Line.CylinderMove(null, IO_Type.Pkg_Station_SOL_UP, IO_Type.Pkg_Station_SOL_Down); //LineManager.Line.CylinderMove(null, IO_Type.Pkg_Station_SOL_UP, IO_Type.Pkg_Station_SOL_Down);
} }
private void btnS2Up_Click(object sender, EventArgs e) private void btnS2Up_Click(object sender, EventArgs e)
{ {
LineManager.Line.CylinderMove(null, IO_Type.Pkg_Station_SOL_Down, IO_Type.Pkg_Station_SOL_UP); // LineManager.Line.CylinderMove(null, IO_Type.Pkg_Station_SOL_Down, IO_Type.Pkg_Station_SOL_UP);
} }
private void BtnClick(object sender, EventArgs e) private void BtnClick(object sender, EventArgs e)
......
...@@ -58,30 +58,30 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -58,30 +58,30 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// PRO ABB机器人3IP ABB3_IP 192.168.103.53 /// PRO ABB机器人3IP ABB3_IP 192.168.103.53
/// </summary> /// </summary>
[ConfigProAttribute("ABB3_IP", false)] //[ConfigProAttribute("ABB3_IP", false)]
public string ABB3_IP { get; set; } //public string ABB3_IP { get; set; }
/// <summary> /// <summary>
/// PRO 双层线左侧提升机 L_Updown_Rfid 192.168.103.101 /// PRO 双层线左侧提升机 L_Updown_Rfid 192.168.103.51
/// </summary> /// </summary>
[ConfigProAttribute("L_Updown_Rfid", false)] [ConfigProAttribute("L_Updown_Rfid", false)]
public string L_Updown_Rfid { get; set; } public string L_Updown_Rfid { get; set; }
/// <summary> /// <summary>
/// PRO 双层线中间提升机 M_Updown_Rfid 192.168.103.102 /// PRO 双层线中间提升机 M_Updown_Rfid 192.168.103.52
/// </summary> /// </summary>
[ConfigProAttribute("M_Updown_Rfid", false)] [ConfigProAttribute("M_Updown_Rfid", false)]
public string M_Updown_Rfid { get; set; } public string M_Updown_Rfid { get; set; }
/// <summary> /// <summary>
/// PRO 双层线上料工位1 S1_Rfid 192.168.103.103 /// PRO 双层线上料工位1 S1_Rfid 192.168.103.53
/// </summary> /// </summary>
[ConfigProAttribute("S1_Rfid", false)] [ConfigProAttribute("S1_Rfid", false)]
public string S1_Rfid { get; set; } public string S1_Rfid { get; set; }
/// <summary> /// <summary>
/// PRO 双层线上料工位2 S2_Rfid 192.168.103.104 /// PRO 双层线上料工位2 S2_Rfid 192.168.103.104
/// </summary> /// </summary>
[ConfigProAttribute("S2_Rfid", false)] //[ConfigProAttribute("S2_Rfid", false)]
public string S2_Rfid { get; set; } //public string S2_Rfid { get; set; }
/// <summary> /// <summary>
/// PRO 双层线右侧提升机 R_Updown_Rfid 192.168.103.105 /// PRO 双层线右侧提升机 R_Updown_Rfid 192.168.103.54
/// </summary> /// </summary>
[ConfigProAttribute("R_Updown_Rfid", false)] [ConfigProAttribute("R_Updown_Rfid", false)]
public string R_Updown_Rfid { get; set; } public string R_Updown_Rfid { get; set; }
...@@ -89,10 +89,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -89,10 +89,10 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// PRO,包装线RFID,Pkg_Rfid,192.168.103.106 /// PRO,包装线RFID,Pkg_Rfid,192.168.103.106
/// </summary> /// </summary>
[ConfigProAttribute("Pkg_Rfid", false)] //[ConfigProAttribute("Pkg_Rfid", false)]
public string Pkg_Rfid { get; set; } //public string Pkg_Rfid { get; set; }
/// <summary> /// <summary>
/// PRO,双层线上层右侧RFID,RHigh_Rfid,192.168.103.109 /// PRO,双层线上层右侧RFID,RHigh_Rfid,192.168.103.55
/// </summary> /// </summary>
[ConfigProAttribute("RHigh_Rfid", false)] [ConfigProAttribute("RHigh_Rfid", false)]
public string RHigh_Rfid { get; set; } public string RHigh_Rfid { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!