Commit 01583e74 张东亮

4Cfeeder添加新rfid

1 个父辈 1dc13a38
此文件类型无法预览
此文件类型无法预览
...@@ -36,5 +36,7 @@ namespace OnlineStore.Common ...@@ -36,5 +36,7 @@ namespace OnlineStore.Common
public static string Agv_Log_Open = "Agv_Log_Open"; public static string Agv_Log_Open = "Agv_Log_Open";
public static string RfidServer_Port = "RfidServer_Port"; public static string RfidServer_Port = "RfidServer_Port";
public static string InLine_Name = "InLine_Name";
public static string OutLine_Name = "OutLine_Name";
} }
} }
...@@ -39,18 +39,15 @@ ...@@ -39,18 +39,15 @@
<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>
</Reference> </Reference>
<Reference Include="CodeLibrary">
<HintPath>..\..\..\RC32-SZBOSCH-ACSingleStore\dll\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\..\..\RC32-SZBOSCH-ACSingleStore\dll\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="HFReader9CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64"> <Reference Include="HFReader9CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\RFID\HFReader9CSharp.dll</HintPath> <HintPath>..\..\dll\RFID\HFReader9CSharp.dll</HintPath>
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID, 类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
PRO,IO模块对应的DI数量,IO_DILength,192.168.103.28#16,,,,,,, PRO,IO模块对应的DI数量,IO_DILength,10.85.197.121#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.103.28#16,,,,,,, PRO,模块对应的DO数量,IO_DOLength,10.85.197.121#16,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.103.28,,,,,,, PRO,IO模块IP,PRO_AOI_IP_1,10.85.197.121,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X761,DI-01,0, DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X21,DI-01,0,
DI,Feeder1线入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,Feeder1线入口检测,X762,DI-02,0, DI,进料线体入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,进料线体入口检测,X22,DI-02,0,
DI,Feeder1线阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,Feeder1线阻挡检测,X763,DI-03,0, DI,进料线体阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,进料线体阻挡检测,X23,DI-03,0,
DI,Feeder1线出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,Feeder1线出口检测,X764,DI-04,0, DI,进料线体出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,进料线体出口检测,X24,DI-04,0,
DI,Feeder2线入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,Feeder2线入口检测,X765,DI-05,0, DI,出料线体入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,出料线体入口检测,X25,DI-05,0,
DI,Feeder2线阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,Feeder2线阻挡检测,X766,DI-06,0, DI,出料线体阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,出料线体阻挡检测,X26,DI-06,0,
DI,Feeder2线出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,Feeder2线出口检测,X767,DI-07,0, DI,出料线体出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,出料线体出口检测,X27,DI-07,0,
DI,Feeder1线人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,Feeder1线人工取料信号,X768,DI-08,0, DI,进料线体人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,进料线体人工取料信号,X28,DI-08,0,
DI,Feeder1线顶升上升端,L1_Updown_Up_Sig,8,PRO_AOI_IP_1,0,Feeder1线顶升上升端,X769,DI-09,0, DI,进料线体横移上升端,L1_Updown_Up_Sig,8,PRO_AOI_IP_1,0,进料线体横移上升端,X29,DI-09,0,
DI,Feeder1线顶升下降端,L1_Updown_Down_Sig,9,PRO_AOI_IP_1,0,Feeder1线顶升下降端,X770,DI-10,0, DI,进料线体横移下降端,L1_Updown_Down_Sig,9,PRO_AOI_IP_1,0,进料线体横移下降端,X30,DI-10,0,
DI,Feeder2线顶升上升端,L2_Updown_Up_Sig,10,PRO_AOI_IP_1,0,Feeder2线顶升上升端,X771,DI-11,0, DI,出料线体横移上升端,L2_Updown_Up_Sig,10,PRO_AOI_IP_1,0,出料线体横移上升端,X31,DI-11,0,
DI,Feeder2线顶升下降端,L2_Updown_Down_Sig,11,PRO_AOI_IP_1,0,Feeder2线顶升下降端,X772,DI-12,0, DI,出料线体横移下降端,L2_Updown_Down_Sig,11,PRO_AOI_IP_1,0,出料线体横移下降端,X32,DI-12,0,
,,,12,PRO_AOI_IP_1,0,,X773,DI-13,0, DI,复位,Reset_BTN,12,PRO_AOI_IP_1,0,复位,X33,DI-13,0,
,,,13,PRO_AOI_IP_1,0,,X774,DI-14,0, ,,,13,PRO_AOI_IP_1,0,,X774,DI-14,0,
,,,14,PRO_AOI_IP_1,0,,X775,DI-15,0, ,,,14,PRO_AOI_IP_1,0,,X775,DI-15,0,
,,,15,PRO_AOI_IP_1,0,,X776,DI-16,0, ,,,15,PRO_AOI_IP_1,0,,X776,DI-16,0,
DO,Feeder1线驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,Feeder1线驱动电机运转,Y761,DO-01,0, DO,进料线体驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,进料线体驱动电机运转,Y21,DO-01,0,
DO,Feeder2线驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,Feeder2线驱动电机运转,Y762,DO-02,0, DO,出料线体驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,出料线体驱动电机运转,Y22,DO-02,0,
DO,Feeder1线阻挡1下降,L1_StopDown,2,PRO_AOI_IP_1,0,Feeder1线阻挡1下降,Y763,DO-03,0, DO,进料线体阻挡下降,L1_StopDown,2,PRO_AOI_IP_1,0,进料线体阻挡下降,Y23,DO-03,0,
DO,Feeder1线出口缓冲器,L1_OutStopDown,3,PRO_AOI_IP_1,0,Feeder1线出口缓冲器,Y764,DO-04,0, DO,进料线体出口缓冲器,L1_OutStopDown,3,PRO_AOI_IP_1,0,进料线体出口缓冲器,Y24,DO-04,0,
DO,Feeder2线出口阻挡下降,L2_OutStopDown,4,PRO_AOI_IP_1,0,Feeder2线出口阻挡下降,Y765,DO-05,0, DO,出料线体阻挡下降,L2_StopDown,4,PRO_AOI_IP_1,0,出料线体阻挡下降,Y25,DO-05,0,
DO,Feeder2线阻挡1下降,L2_StopDown,5,PRO_AOI_IP_1,0,Feeder2线阻挡1下降,Y766,DO-06,0, DO,出料线体出口阻挡下降,L2_OutStopDown,5,PRO_AOI_IP_1,0,出料线体出口阻挡下降,Y26,DO-06,0,
DO,Feeder线横移机构上升SOL,Tranverse_Up_SOL,6,PRO_AOI_IP_1,0,Feeder线横移机构上升SOL,Y767,DO-07,0, DO,横移机构电机运转,Tranverse_Run,6,PRO_AOI_IP_1,0,横移机构电机运转,Y27,DO-09,0,
DO,Feeder线横移机构下降SOL,Tranverse_Down_SOL,7,PRO_AOI_IP_1,0,Feeder线横移机构下降SOL,Y768,DO-08,0, DO,横移机构上升SOL,Tranverse_Up_SOL,7,PRO_AOI_IP_1,0,横移机构上升SOL,Y28,DO-07,0,
DO,Feeder线横移电机运转,Tranverse_Run,8,PRO_AOI_IP_1,0,Feeder线横移电机运转,Y769,DO-09,0, DO,横移机构下降SOL,Tranverse_Down_SOL,8,PRO_AOI_IP_1,0,横移机构下降SOL,Y29,DO-08,0,
,,,9,PRO_AOI_IP_1,0,,Y770,DO-10,0, DO,线体运行状态灯,Run_Status_Light,9,PRO_AOI_IP_1,0,线体运行状态灯,Y30,DO-10,0,
,,,10,PRO_AOI_IP_1,0,,Y771,DO-11,0, ,,,10,PRO_AOI_IP_1,0,,Y31,DO-11,0,
,,,11,PRO_AOI_IP_1,0,,Y772,DO-12,0, ,,,11,PRO_AOI_IP_1,0,,Y32,DO-12,0,
,,,12,PRO_AOI_IP_1,0,,Y773,DO-13,0, ,,,12,PRO_AOI_IP_1,0,,Y33,DO-13,0,
,,,13,PRO_AOI_IP_1,0,,Y774,DO-14,0, ,,,13,PRO_AOI_IP_1,0,,Y34,DO-14,0,
,,,14,PRO_AOI_IP_1,0,,Y775,DO-15,0, ,,,14,PRO_AOI_IP_1,0,,Y35,DO-15,0,
,,,15,PRO_AOI_IP_1,0,,Y776,DO-16,0, ,,,15,PRO_AOI_IP_1,0,,Y36,DO-16,0,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,, PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,Feeder1线AGV节点名称,L1_AgvName,D21,,,,,,, PRO,进料线体线AGV节点名称,L1_AgvName,C21,,,,,,,
PRO,Feeder2线AGV节点名称,L2_AgvName,D22,,,,,,, PRO,出料线体线AGV节点名称,L2_AgvName,C22,,,,,,,
PRO,Feeder线出口RFIDIP,L2Out_RFIDIP,192.168.103.108,,,,,, , PRO,Feeder线出口RFIDIP,L2Out_RFIDIP,10.85.197.2,,,,,, ,
PRO,休眠秒数(秒),SleepSeconds,60,,,,,,, PRO,休眠秒数(秒),SleepSeconds,30,,,,,,,
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.Tasks;
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
{
int port = ConfigAppSettings.GetIntValue(Setting_Init.RfidServer_Port);
if (port <= 0)
{
port = 13001;
}
// readAll.Received += ReadAll_Received;
// readAll.Log += ReadAll_Log;
LogUtil.info("RFID Server Open,port=" + port);
readAll.Start(port);
IsOpen = true;
}
catch (Exception ex)
{
LogUtil.error("Open 出错:" + ex.ToString());
}
}
private static string lastStr = "";
private static void ReadAll_Log(string ip, string 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)
{
try
{
if (String.IsNullOrEmpty(ip).Equals(false))
{
string outValue = readAll.Read(ip);
if (isClear)
{
readAll.Clear(ip);
}
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;
}
}
}
...@@ -5,16 +5,23 @@ using System.Collections.Concurrent; ...@@ -5,16 +5,23 @@ using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
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)
{ {
...@@ -22,15 +29,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,15 +29,9 @@ namespace OnlineStore.DeviceLibrary
} }
try try
{ {
int port = ConfigAppSettings.GetIntValue(Setting_Init.RfidServer_Port); read = new ReadAll("TheRFID");
if (port <= 0) read.Received += Read_Received;
{ read.Start(13001);
port = 13001;
}
// readAll.Received += ReadAll_Received;
// readAll.Log += ReadAll_Log;
LogUtil.info("RFID Server Open,port=" + port);
readAll.Start(port);
IsOpen = true; IsOpen = true;
} }
catch (Exception ex) catch (Exception ex)
...@@ -40,6 +41,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -40,6 +41,26 @@ namespace OnlineStore.DeviceLibrary
} }
private static string lastStr = ""; 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)
{ {
string str = "RFID : [" + ip + "] " + log; string str = "RFID : [" + ip + "] " + log;
...@@ -51,20 +72,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -51,20 +72,21 @@ namespace OnlineStore.DeviceLibrary
lastStr = str; lastStr = str;
} }
public static RFIDData ReadRFID(string ip, bool isClear = false) public static RFIDData ReadRFID(string ip,bool isClear= true)
{ {
try try
{ {
if (String.IsNullOrEmpty(ip).Equals(false)) if (String.IsNullOrEmpty(ip).Equals(false) && read!=null)
{ {
string outValue = readAll.Read(ip);
if (isClear) if (isClear)
{ {
readAll.Clear(ip); read.Clear(ip);
} }
Thread.Sleep(100);
string outValue = read.Read(ip);
RFIDData data = new RFIDData(outValue); RFIDData data = new RFIDData(outValue);
return data; return data;
} }
} }
...@@ -80,7 +102,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
readAll.Stop(); read.Stop();
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -532,15 +532,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -532,15 +532,6 @@ namespace OnlineStore.DeviceLibrary
//LastInShelfId = RFIDManager.ReadRFID(Config.L1In_RFIDIP,true).NumStr(); //LastInShelfId = RFIDManager.ReadRFID(Config.L1In_RFIDIP,true).NumStr();
LastOutShelfId = RFIDManager.ReadRFID(Config.L2Out_RFIDIP, true).NumStr(); LastOutShelfId = RFIDManager.ReadRFID(Config.L2Out_RFIDIP, true).NumStr();
//bool result = SendDISTRfid(LastInShelfId);
//if (result)
//{
// IOManager.CIOMove(IO_Type.InL_InStopDown, IO_VALUE.HIGH);
//}
//else
//{
// IOManager.CIOMove(IO_Type.InL_InStopDown, IO_VALUE.LOW);
//}
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -170,7 +170,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,7 +170,7 @@ namespace OnlineStore.DeviceLibrary
needCheckList.Add(IO_Type.L2_StopDown); needCheckList.Add(IO_Type.L2_StopDown);
} }
bool agvBusy = false; bool agvBusy = false;
if (agvClient.D21_InProcess || agvClient.D22_InProcess) if (agvClient.InLine_InProcess || agvClient.OutLine_InProcess)
agvBusy = true; agvBusy = true;
if (agvBusy && IsSleep) if (agvBusy && IsSleep)
{ {
......
...@@ -18,44 +18,44 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,44 +18,44 @@ namespace OnlineStore.DeviceLibrary
private AsaPL.AgvClient agvClient; private AsaPL.AgvClient agvClient;
private static bool isInit = false; private static bool isInit = false;
public static Dictionary<string, AsaPL.ClientAction> actionMap = new Dictionary<string, AsaPL.ClientAction>(); public static Dictionary<string, AsaPL.ClientAction> actionMap = new Dictionary<string, AsaPL.ClientAction>();
public bool D21_InProcess = false; public bool InLine_InProcess = false;
public bool D22_InProcess = false; public bool OutLine_InProcess = false;
private static string InLine_Name = "C21"; private static string InLine_Name = ConfigAppSettings.GetValue(Setting_Init.InLine_Name);
private static string OutLine_Name = "C22"; private static string OutLine_Name = ConfigAppSettings.GetValue(Setting_Init.OutLine_Name);
public string D22_RFID { get; set; } = ""; public string OutLine_RFID { get; set; } = "";
#region D21 Action #region InLine Action
/// <summary> /// <summary>
/// 无状态 /// 无状态
/// </summary> /// </summary>
public void D21_None() public void InLine_None()
{ {
SetStatus("D21", "", ClientAction.None); SetStatus(InLine_Name, "", ClientAction.None);
} }
/// <summary> /// <summary>
/// 可以进入状态 /// 可以进入状态
/// </summary> /// </summary>
public void D21_NeedEnter() public void InLine_NeedEnter()
{ {
SetStatus("D21", "", ClientAction.NeedEnter); SetStatus(InLine_Name, "", ClientAction.NeedEnter);
} }
#endregion #endregion
#region D22 Action #region OutLine Action
/// <summary> /// <summary>
/// 无状态 /// 无状态
/// </summary> /// </summary>
public void D22_None() public void OutLine_None()
{ {
SetStatus("D22", "", ClientAction.None); SetStatus(OutLine_Name, "", ClientAction.None);
} }
/// <summary> /// <summary>
/// 可以出去状态 /// 可以出去状态
/// </summary> /// </summary>
public void D22_NeedLeave() public void OutLine_NeedLeave()
{ {
SetStatus("D22", D22_RFID, ClientAction.NeedLeave); SetStatus(OutLine_Name, OutLine_RFID, ClientAction.NeedLeave);
} }
#endregion #endregion
...@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -102,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
/// <param name="name">节点名称</param> /// <param name="name">节点名称</param>
private void AgvClient_ReadyEnter(string name) private void AgvClient_ReadyEnter(string name)
{ {
if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW) && !D21_InProcess && name.Equals(InLine_Name)) if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW) && !InLine_InProcess && name.Equals(InLine_Name))
{ {
MayEnter(InLine_Name); MayEnter(InLine_Name);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary
FinishEnter(InLine_Name); FinishEnter(InLine_Name);
Feeder_In_Msg = "Feeder In: 处理结束 更新状态为None "; Feeder_In_Msg = "Feeder In: 处理结束 更新状态为None ";
LogUtil.info(Feeder_In_Msg); LogUtil.info(Feeder_In_Msg);
D21_None(); InLine_None();
}); });
} }
...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.HIGH))
Feeder_In_Msg = "Feeder In: L1_InCheck 检测到有料架,AGV的料架无法进入"; Feeder_In_Msg = "Feeder In: L1_InCheck 检测到有料架,AGV的料架无法进入";
LogUtil.info(Feeder_In_Msg); LogUtil.info(Feeder_In_Msg);
D21_None(); InLine_None();
} }
LogUtil.info("收到 AgvClient_ReadyEnter [" + name + "]"); LogUtil.info("收到 AgvClient_ReadyEnter [" + name + "]");
} }
...@@ -156,7 +156,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -156,7 +156,7 @@ namespace OnlineStore.DeviceLibrary
// D22_InProcess = true; // D22_InProcess = true;
// D22_ReadyLeave = true; // D22_ReadyLeave = true;
//} //}
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && !D22_InProcess && name.Equals(OutLine_Name)) if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && !OutLine_InProcess && name.Equals(OutLine_Name))
{ {
MayLeave(OutLine_Name); MayLeave(OutLine_Name);
...@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -178,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(5000); Thread.Sleep(5000);
Feeder_Out_Msg = "Feeder Out: 处理结束 更新状态为None "; Feeder_Out_Msg = "Feeder Out: 处理结束 更新状态为None ";
LogUtil.info(Feeder_Out_Msg); LogUtil.info(Feeder_Out_Msg);
D22_None(); OutLine_None();
}); });
} }
else else
...@@ -186,7 +186,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -186,7 +186,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW))
Feeder_Out_Msg = "Feeder Out: L2_OutCheck 未检测到料架,无法将料架进入AGV"; Feeder_Out_Msg = "Feeder Out: L2_OutCheck 未检测到料架,无法将料架进入AGV";
LogUtil.info(Feeder_Out_Msg); LogUtil.info(Feeder_Out_Msg);
D22_None(); OutLine_None();
} }
LogUtil.info("收到 AgvClient_ReadyLeave [" + name + "] "); LogUtil.info("收到 AgvClient_ReadyLeave [" + name + "] ");
...@@ -201,11 +201,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -201,11 +201,11 @@ namespace OnlineStore.DeviceLibrary
{ {
if (name.Equals(InLine_Name)) if (name.Equals(InLine_Name))
{ {
D21_InProcess = false; InLine_InProcess = false;
} }
else if (name.Equals(OutLine_Name)) else if (name.Equals(OutLine_Name))
{ {
D22_InProcess = false; OutLine_InProcess = false;
} }
LogUtil.info("收到 AgvClient_FinishLeave [" + name + "] "); LogUtil.info("收到 AgvClient_FinishLeave [" + name + "] ");
} }
...@@ -231,7 +231,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -231,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
SetStatus(name, "", ClientAction.MayEnter); SetStatus(name, "", ClientAction.MayEnter);
if (name.Equals(InLine_Name)) if (name.Equals(InLine_Name))
{ {
D21_InProcess = true; InLine_InProcess = true;
} }
LogUtil.info("MayEnter [" + name + "] "); LogUtil.info("MayEnter [" + name + "] ");
} }
...@@ -241,7 +241,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -241,7 +241,7 @@ namespace OnlineStore.DeviceLibrary
SetStatus(name, "", ClientAction.MayLeave); SetStatus(name, "", ClientAction.MayLeave);
if (name.Equals(OutLine_Name)) if (name.Equals(OutLine_Name))
{ {
D22_InProcess = true; OutLine_InProcess = true;
} }
LogUtil.info("MayLeave [" + name + "] "); LogUtil.info("MayLeave [" + name + "] ");
} }
...@@ -259,11 +259,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -259,11 +259,11 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(15000); Thread.Sleep(15000);
if (name.Equals(InLine_Name)) if (name.Equals(InLine_Name))
{ {
D21_InProcess = false; InLine_InProcess = false;
} }
else if (name.Equals(OutLine_Name)) else if (name.Equals(OutLine_Name))
{ {
D22_InProcess = false; OutLine_InProcess = false;
} }
}); });
...@@ -280,11 +280,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -280,11 +280,11 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(15000); Thread.Sleep(15000);
if (name.Equals(InLine_Name)) if (name.Equals(InLine_Name))
{ {
D21_InProcess = false; InLine_InProcess = false;
} }
else if (name.Equals(OutLine_Name)) else if (name.Equals(OutLine_Name))
{ {
D22_InProcess = false; OutLine_InProcess = false;
} }
}); });
......
...@@ -4,16 +4,14 @@ ...@@ -4,16 +4,14 @@
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections> </configSections>
<appSettings> <appSettings>
<!--Feeder流水线名称-->
<add key="InLine_Name" value="C21" />
<add key="OutLine_Name" value="C22" />
<!--是否开机自动启动Feeder流水线--> <!--是否开机自动启动Feeder流水线-->
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="1" />
<add key="App_Title" value="Feeder线" /> <add key="App_Title" value="Feeder线" />
<!--Server address--> <!--Server address-->
<add key="http.server" value="http://10.85.160.25/myproject/" /> <add key="http.server" value="http://10.85.160.25/myproject/" />
<!--storeType-->
<add key="store_count" value="1" />
<!--start one store config-->
<add key="Line_Config" value="\LineConfig\FeederLineConfig.csv" />
<add key="Config_Pwd" value="123456" />
<!--IO配置--> <!--IO配置-->
<add key="UseAIOBOX" value="1" /> <add key="UseAIOBOX" value="1" />
<add key="DIMS" value="60" /> <add key="DIMS" value="60" />
...@@ -24,24 +22,33 @@ ...@@ -24,24 +22,33 @@
<add key="IsInDebug" value="1" /> <add key="IsInDebug" value="1" />
<add key="Agv_Log_Open" value="1" /> <add key="Agv_Log_Open" value="1" />
<add key="ClientSettingsProvider.ServiceUri" value="" /> <add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="Line_Config" value="\LineConfig\FeederLineConfig.csv" />
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="logs/vmiLine.log" /> <file type="log4net.Util.PatternString" value="logs/FeederLine.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <param name="MaxSizeRollBackups" value="30"/>
<datePattern value="yyyy-MM-dd" /> <!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="100MB"/>
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="TheRFID" type="log4net.Appender.RollingFileAppender"> <appender name="TheRFID" type="log4net.Appender.RollingFileAppender">
<file value="logs/TheRFID-vmi.log" /> <file value="logs/TheRFID-FeederLine.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <param name="MaxSizeRollBackups" value="30"/>
<datePattern value="yyyy-MM-dd" /> <!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="50MB"/>
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!