Commit 78511994 顾剑亮

upload

1 个父辈 f4e2f67e
正在显示 206 个修改的文件 包含 599 行增加1580 行删除
......@@ -3,30 +3,22 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29503.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLine(old)", "AssemblyLine(old)\AssemblyLine(old).csproj", "{B7E946A7-96C7-4EBA-832D-2D3B215296C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DoubleLine(old)", "DoubleLine(old)\DoubleLine(old).csproj", "{9F3D3ABE-E0E0-4A3B-8F86-F6096295EC75}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvClient", "AgvClient\AgvClient.csproj", "{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGVControl", "AGVControl\AGVControl.csproj", "{CDD2A117-89C5-4E53-BD80-15A4C569CF1B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvClientTest", "AgvClientTest\AgvClientTest.csproj", "{693B08DC-6185-4A31-86B7-1D5A40DE9C61}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvServer", "AgvServer\AgvServer.csproj", "{A3E5E5DF-811C-4598-98BB-295A84D87027}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvClientProduction", "AgvClientProduction\AgvClientProduction.csproj", "{ADB09B8F-1560-4038-B6CE-A0F876DC1AA0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B7E946A7-96C7-4EBA-832D-2D3B215296C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7E946A7-96C7-4EBA-832D-2D3B215296C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7E946A7-96C7-4EBA-832D-2D3B215296C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7E946A7-96C7-4EBA-832D-2D3B215296C4}.Release|Any CPU.Build.0 = Release|Any CPU
{9F3D3ABE-E0E0-4A3B-8F86-F6096295EC75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F3D3ABE-E0E0-4A3B-8F86-F6096295EC75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F3D3ABE-E0E0-4A3B-8F86-F6096295EC75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F3D3ABE-E0E0-4A3B-8F86-F6096295EC75}.Release|Any CPU.Build.0 = Release|Any CPU
{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
......@@ -39,6 +31,14 @@ Global
{693B08DC-6185-4A31-86B7-1D5A40DE9C61}.Debug|Any CPU.Build.0 = Debug|Any CPU
{693B08DC-6185-4A31-86B7-1D5A40DE9C61}.Release|Any CPU.ActiveCfg = Release|Any CPU
{693B08DC-6185-4A31-86B7-1D5A40DE9C61}.Release|Any CPU.Build.0 = Release|Any CPU
{A3E5E5DF-811C-4598-98BB-295A84D87027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3E5E5DF-811C-4598-98BB-295A84D87027}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3E5E5DF-811C-4598-98BB-295A84D87027}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3E5E5DF-811C-4598-98BB-295A84D87027}.Release|Any CPU.Build.0 = Release|Any CPU
{ADB09B8F-1560-4038-B6CE-A0F876DC1AA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADB09B8F-1560-4038-B6CE-A0F876DC1AA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADB09B8F-1560-4038-B6CE-A0F876DC1AA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADB09B8F-1560-4038-B6CE-A0F876DC1AA0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -23,6 +23,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -32,14 +33,14 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.File.Log, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\DLL\File\Asa.File.Log.dll</HintPath>
<Reference Include="log4net">
<HintPath>..\..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="AgvServer" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AgvServer.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<logger name="AgvServer">
<level value="Debug" />
<appender-ref ref="AgvServer" />
</logger>
</log4net>
<appSettings>
<!--Server address-->
<add key="http.server" value="http://10.85.199.25/myproject/" />
......@@ -11,10 +30,10 @@
<add key="AutoCharge" value="false"/>
<add key="ChargeWait" value="1"/>
<add key="ChargeThreshold" value="20,70"/>
<add key="MiR_R1467" value="false"/>
<add key="MiR_R1468" value="false"/>
<add key="MiR_R1469" value="false"/>
<add key="MiR_R1470" value="false"/>
<add key="1号车" value="false"/>
<add key="2号车" value="false"/>
<add key="3号车" value="false"/>
<add key="4号车" value="false"/>
<add key="A1" value="true"/>
<add key="A2" value="true"/>
<add key="A3" value="true"/>
......
......@@ -19,26 +19,26 @@ namespace BLL
taskCount = 0;
try
{
//Common.log.OutInfo("URL:" + Common.webService["URL"]);
//Common.log.Info("URL:" + Common.webService["URL"]);
string url = ConfigAppSettings.GetValue(Setting_Init.http_server) + "rest/api/qisda/device/shelfTaskCount?rfid=" + agv.RFID;
var client = new RestSharp.RestClient(url) { Timeout = -1 };
var request = new RestSharp.RestRequest(RestSharp.Method.GET);
RestSharp.IRestResponse response = client.Execute(request);
string json = response.Content;
Common.log.OutInfo(agv.Name + " [URL: " + url+"] [Return: " + json+"]");
Common.log.Info(agv.Name + " [URL: " + url+"] [Return: " + json+"]");
if (string.IsNullOrWhiteSpace(json)) return true; //可以离开
//{"code":0,"msg":"ok","data":{"taskCount":1,"rfid":"A14"}}不能搬运锁定的料架,到待机位等待
ShelfTaskCount serverResult = JsonHelper.DeserializeJsonToObject<ShelfTaskCount>(json);
if (serverResult == null)
{
Common.log.OutInfo(" 没有收到服务器反馈");
Common.log.Info(" 没有收到服务器反馈");
return true;
}
if (serverResult.code != 0) return true;
agv.LeftTaskCnt = serverResult.data.taskCount;
if (serverResult.data.taskCount == 0) //该料架出库完成
{
Common.log.OutInfo(agv.Name+" 料架【" + agv.RFID + "】 无剩余出库任务,serverResult.shelfTaskData.taskCount=" + serverResult.data.taskCount.ToString());
Common.log.Info(agv.Name+" 料架【" + agv.RFID + "】 无剩余出库任务,serverResult.shelfTaskData.taskCount=" + serverResult.data.taskCount.ToString());
return true;
}
else //该料架的出库任务未完成
......@@ -46,14 +46,14 @@ namespace BLL
// foreach (ShelfLockData item in serverResult.data)
// {
taskCount = serverResult.data.taskCount;
Common.log.OutInfo(agv.Name + " [RFID=" + serverResult.data.rfid + "] [taskCount=" + serverResult.data.taskCount + "]");
Common.log.Info(agv.Name + " [RFID=" + serverResult.data.rfid + "] [taskCount=" + serverResult.data.taskCount + "]");
// }
return false;
}
}
catch (Exception ex)
{
Common.log.OutError(ex);
Common.log.Error(ex);
return true;
}
......@@ -74,20 +74,20 @@ namespace BLL
string resultStr = HttpHelper.Post(server, "");
Common.log.OutInfo("节点【"+name+ "】 料架锁定状态 " + " 【" + server + "】【" + resultStr + "】");
Common.log.Info("节点【"+name+ "】 料架锁定状态 " + " 【" + server + "】【" + resultStr + "】");
ShelfLockInfo serverResult = JsonHelper.DeserializeJsonToObject<ShelfLockInfo>(resultStr);
if (serverResult == null)
{
msg = "节点【" + name + "】没有收到服务器反馈";
Common.log.OutInfo(msg);
Common.log.Info(msg);
return false;
}
if (serverResult.data.Count == 0) //该料架未锁定
{
msg = "节点【" + name + "】 料架【" + rfid + "】 没有锁定库位的料";
Common.log.OutInfo(msg);
Common.log.Info(msg);
return false;
}
else //该料架存在锁定库位的料
......@@ -97,16 +97,16 @@ namespace BLL
if (!shelfLockNodeNames.Contains(Common.webService[item.cid]))
{
shelfLockNodeNames.Add(Common.webService[item.cid]);
Common.log.OutInfo("锁定的CID=" + item.cid + ";节点名称=" + Common.webService[item.cid]);
Common.log.Info("锁定的CID=" + item.cid + ";节点名称=" + Common.webService[item.cid]);
}
}
Common.log.OutInfo("节点【" + name + "】"+rfid+"获取料架上的锁定料仓信息完成");
Common.log.Info("节点【" + name + "】"+rfid+"获取料架上的锁定料仓信息完成");
return true;
}
}
catch (Exception ex)
{
Common.log.OutInfo(ex.Message);
Common.log.Info(ex.Message);
}
return false;
}
......@@ -127,7 +127,7 @@ namespace BLL
string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
Common.log.OutInfo("updateDeviceAlarmMsg " + " 【" + server + "】【" + resultStr + "】");
Common.log.Info("updateDeviceAlarmMsg " + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
......@@ -143,7 +143,7 @@ namespace BLL
}
catch (Exception ex)
{
Common.log.OutError(ex);
Common.log.Error(ex);
}
return msg;
}
......
......@@ -30,7 +30,7 @@ namespace BLL
{
try
{
Common.log.OutInfo("服务启动");
Common.log.Info("服务启动");
IPEndPoint localEP = new IPEndPoint(IPAddress.Any, 12000);
_server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
......@@ -44,7 +44,7 @@ namespace BLL
}
catch (Exception ex)
{
Common.log.OutError(ex);
Common.log.Error(ex);
}
}
......@@ -62,7 +62,7 @@ namespace BLL
}
_server.Close();
_client = null;
Common.log.OutInfo("服务关闭");
Common.log.Info("服务关闭");
}
/// <summary>
......@@ -88,7 +88,7 @@ namespace BLL
idx = FindClient(info.Place);
if (idx == -1)
{
Common.log.OutInfo("没有找到" + info.Place);
Common.log.Info("没有找到" + info.Place);
Thread.Sleep(500);
n++;
}
......@@ -100,7 +100,7 @@ namespace BLL
if (idx == -1) return false;
ClientNode node = new ClientNode(info.Place, info.RFID, ClientAction.Arrive);
Common.log.OutInfo("SendTo " + info.Place + " " + ClientAction.Arrive);
Common.log.Info("SendTo " + info.Place + " " + ClientAction.Arrive);
byte[] buff = Encode(node);
return Send(idx, buff);
}
......@@ -119,7 +119,7 @@ namespace BLL
idx = FindClient(info.Place);
if (idx == -1)
{
Common.log.OutInfo("没有找到" + info.Place);
Common.log.Info("没有找到" + info.Place);
Thread.Sleep(500);
n++;
}
......@@ -131,7 +131,7 @@ namespace BLL
if (idx == -1) return false;
ClientNode node = new ClientNode(info.Place, info.RFID, ClientAction.Ready);
Common.log.OutInfo("SendTo " + info.Place + " " + ClientAction.Ready);
Common.log.Info("SendTo " + info.Place + " " + ClientAction.Ready);
byte[] buff = Encode(node);
return Send(idx, buff);
}
......@@ -150,7 +150,7 @@ namespace BLL
idx = FindClient(info.Place);
if (idx == -1)
{
Common.log.OutInfo("没有找到" + info.Place);
Common.log.Info("没有找到" + info.Place);
Thread.Sleep(500);
n++;
}
......@@ -162,7 +162,7 @@ namespace BLL
if (idx == -1) return false;
ClientNode node = new ClientNode(info.Place, info.RFID, ClientAction.CloseDoor);
Common.log.OutInfo("SendTo " + info.Place + " " + ClientAction.CloseDoor);
Common.log.Info("SendTo " + info.Place + " " + ClientAction.CloseDoor);
byte[] buff = Encode(node);
return Send(idx, buff);
}
......@@ -181,7 +181,7 @@ namespace BLL
idx = FindClient(info.Place);
if (idx == -1)
{
Common.log.OutInfo("没有找到" + info.Place);
Common.log.Info("没有找到" + info.Place);
Thread.Sleep(500);
n++;
}
......@@ -193,7 +193,7 @@ namespace BLL
if (idx == -1) return false;
ClientNode node = new ClientNode(info.Place, info.RFID, ClientAction.EnterShelf);
Common.log.OutInfo("SendTo " + info.Place + " " + ClientAction.EnterShelf);
Common.log.Info("SendTo " + info.Place + " " + ClientAction.EnterShelf);
byte[] buff = Encode(node);
return Send(idx, buff);
}
......@@ -245,7 +245,7 @@ namespace BLL
_client.Add(client);
listen.Start(_client.Count - 1);
Common.log.OutInfo(string.Format("[{0}] 已连接", client.IP));
Common.log.Info(string.Format("[{0}] 已连接", client.IP));
}
catch (SocketException)
{
......@@ -253,7 +253,7 @@ namespace BLL
}
catch (Exception ex)
{
Common.log.OutError(ex);
Common.log.Error(ex);
}
}
}
......@@ -285,11 +285,11 @@ namespace BLL
ClientNode node = Decode(buff);
if (node == null)
{
Common.log.OutInfo("命令解析失败: " + HexBuff(buff));
Common.log.Info("命令解析失败: " + HexBuff(buff));
}
else
{
//Common.log.OutInfo("Receive[" + client.IP + "] " + node.ToText());
//Common.log.Info("Receive[" + client.IP + "] " + node.ToText());
int idx = client.nodeName.FindIndex(s => s == node.Name);
if (idx == -1) client.nodeName.Add(node.Name);
UpdateNode(node);
......@@ -301,13 +301,13 @@ namespace BLL
if (time > 10000)
{
Offline(client);
Common.log.OutInfo("[" + client.IP + "] 超过10s没有收到数据,关闭连接");
Common.log.Info("[" + client.IP + "] 超过10s没有收到数据,关闭连接");
}
}
}
catch (Exception ex)
{
Common.log.OutError(ex);
Common.log.Error(ex);
}
}
......@@ -394,7 +394,7 @@ namespace BLL
int idx = Common.nodeInfo.FindIndex(s => s.Name == node.Name);
if (idx == -1)
{
Common.log.OutInfo(node.Name + " 不存在");
Common.log.Info(node.Name + " 不存在");
return;
}
......@@ -414,7 +414,7 @@ namespace BLL
Common.nodeInfo[idx].Action = node.Action;
Common.nodeInfo[idx].Level = node.Level;
Common.nodeInfo[idx].RFID = node.RFID;
Common.log.OutInfo(node.Name + "更新 " + node.ToText());
Common.log.Info(node.Name + "更新 " + node.ToText());
NodeChanged?.Invoke(idx);
}
}
......@@ -484,12 +484,12 @@ namespace BLL
try
{
_client[idx].Socket.Send(buff);
Common.log.OutInfo("[" + _client[idx].IP + "] " + HexBuff(buff));
Common.log.Info("[" + _client[idx].IP + "] " + HexBuff(buff));
return true;
}
catch (Exception ex)
{
Common.log.OutInfo("发送失败" + i + "次:" + ex.Message);
Common.log.Info("发送失败" + i + "次:" + ex.Message);
}
Thread.Sleep(100);
}
......
......@@ -17,7 +17,7 @@ namespace BLL
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null)
{
Common.log.OutInfo("未找到配置:" + key + ",请检查配置是否完整!");
Common.log.Info("未找到配置:" + key + ",请检查配置是否完整!");
return "";
}
else
......@@ -32,7 +32,7 @@ namespace BLL
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null)
{
Common.log.OutWarn("未找到配置:" + key + ",请检查配置是否完整!");
Common.log.Info("未找到配置:" + key + ",请检查配置是否完整!");
return a;
}
else
......@@ -49,7 +49,7 @@ namespace BLL
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null)
{
Common.log.OutWarn("未找到配置:" + key + ",请检查配置是否完整!");
Common.log.Info("未找到配置:" + key + ",请检查配置是否完整!");
return a;
}
else
......@@ -84,7 +84,7 @@ namespace BLL
}
catch (Exception ex)
{
Common.log.OutWarn( "SaveValue保存配置出错:AppKey=" + key + ",AppValue=" + value + "," + ex.StackTrace);
Common.log.Info( "SaveValue保存配置出错:AppKey=" + key + ",AppValue=" + value + "," + ex.StackTrace);
}
}
......@@ -106,7 +106,7 @@ namespace BLL
}
catch (Exception ex)
{
Common.log.OutWarn( "UpdateConfig保存配置出错:name=" + name + ",Xvalue=" + Xvalue + "," + ex.StackTrace);
Common.log.Info( "UpdateConfig保存配置出错:name=" + name + ",Xvalue=" + Xvalue + "," + ex.StackTrace);
}
}
///<summary>
......@@ -138,7 +138,7 @@ namespace BLL
}
catch (Exception ex)
{
Common.log.OutWarn( "SetValue保存配置出错:AppKey=" + AppKey + ",AppValue=" + AppValue + "," + ex.StackTrace);
Common.log.Info( "SetValue保存配置出错:AppKey=" + AppKey + ",AppValue=" + AppValue + "," + ex.StackTrace);
}
}
}
......
......@@ -124,7 +124,7 @@ namespace BLL
if (isLog == 1)
{
Common.log.OutInfo("给服务器发送数据【" + paramData + "】 ");
Common.log.Info("给服务器发送数据【" + paramData + "】 ");
}
if (paramData != "null" && paramData != null)
{
......@@ -150,7 +150,7 @@ namespace BLL
}
catch (Exception e)
{
Common.log.OutWarn("POST ERROR:" + e.ToString());
Common.log.Info("POST ERROR:" + e.ToString());
}
if (!result.Contains("null") && result.Length != 0)
{
......@@ -158,7 +158,7 @@ namespace BLL
}
if (isLog == 1)
{
Common.log.OutInfo("收到服务器数据【" + result + "】");
Common.log.Info("收到服务器数据【" + result + "】");
}
LastServerMsg = DateTime.Now.ToLongTimeString() + " URL:" + url + "\r\n"
+ "发送:" + paramData + "\r\n"
......
......@@ -6,7 +6,7 @@ namespace AGVControl
{
public static class Common
{
public static Asa.File.Log log;
public static log4net.ILog log;
public static BLL.MiR_API mir;
public static List<ClientNode> nodeInfo;
public static List<Agv_Info> agvInfo;
......@@ -16,10 +16,23 @@ namespace AGVControl
public static Dictionary<string, string> webService;
public static ChargeStatus chargeStatus;
public static System.Configuration.Configuration appConfig;
public static System.Windows.Forms.TextBox txtLog;
private static List<string> logText = new List<string>();
public static readonly string LOG_PATH = AppDomain.CurrentDomain.BaseDirectory + "Log";
public static readonly string CONFIG_PATH = AppDomain.CurrentDomain.BaseDirectory + "Config\\";
public static void ShowLog(string s)
{
if (txtLog == null) return;
s = string.Format("[{0:HH:mm:ss}] ", DateTime.Now) + s;
if (logText.Count >= 30) logText.RemoveAt(0);
logText.Add(s);
txtLog.Text = string.Join("\r\n", logText);
txtLog.ScrollToCaret();
}
}
public static class API
......@@ -196,7 +209,11 @@ namespace AGVControl
/// <summary>
/// 只能入料不能出料(仅包装料仓)
/// </summary>
EnterShelf = 10
EnterShelf = 10,
/// <summary>
/// 不允许
/// </summary>
MayNot = 11
}
/// <summary>
......@@ -264,6 +281,8 @@ namespace AGVControl
public class Agv_Info
{
private string rfid;
/// <summary>
/// 小车名称
/// </summary>
......@@ -291,7 +310,18 @@ namespace AGVControl
/// <summary>
/// 当前架子的RFID
/// </summary>
public string RFID { set; get; }
public string RFID
{
set
{
rfid = value;
Common.log.Debug("Name=" + Name + " Place=" + Place + " Mark=" + Mark);
}
get
{
return rfid;
}
}
/// <summary>
/// 是否在线
/// </summary>
......
......@@ -133,7 +133,7 @@ namespace AGVControl
ShowConfig();
ChkAutoRun.Checked = BLL.Shortcut.Exists();
Common.log.ShowText = TxtLog;
Common.txtLog = TxtLog;
change = true;
ChkAutoCharge.Checked = Common.chargeStatus.AutoCharge;
......@@ -175,7 +175,7 @@ namespace AGVControl
}
Common.agvInfo[e.RowIndex].IsUse = false;
//清除小车缓存
Common.log.OutInfo(string.Format("手动清除小车缓存:{0}[CurTaskName={1}]", Common.agvInfo[e.RowIndex].ToRow(), Common.agvInfo[e.RowIndex].CurTaskName));
Common.log.Info(string.Format("手动清除小车缓存:{0}[CurTaskName={1}]", Common.agvInfo[e.RowIndex].ToRow(), Common.agvInfo[e.RowIndex].CurTaskName));
string place = Common.agvInfo[e.RowIndex].Place;
Common.agvInfo[e.RowIndex].Mark = "";
Common.agvInfo[e.RowIndex].Place = "";
......@@ -229,7 +229,7 @@ namespace AGVControl
else if (e.ColumnIndex == 8)
{
//清除节点缓存
Common.log.OutInfo(string.Format("手动清除节点缓存,{0} {1}", Common.nodeInfo[e.RowIndex].AgvName, Common.nodeInfo[e.RowIndex].Name));
Common.log.Info(string.Format("手动清除节点缓存,{0} {1}", Common.nodeInfo[e.RowIndex].AgvName, Common.nodeInfo[e.RowIndex].Name));
string name = Common.nodeInfo[e.RowIndex].AgvName;
Common.nodeInfo[e.RowIndex].AgvName = "";
DgvNode.Rows[e.RowIndex].Cells[5].Value = "";
......@@ -268,12 +268,12 @@ namespace AGVControl
if (!rtn)
return;
Common.agvInfo[idx].Place = "";
Common.log.OutInfo("手动添加任务: " + LstAgvPlace.Text);
Common.log.OutTextBox("手动添加任务: " + LstAgvPlace.Text);
Common.log.Info("手动添加任务: " + LstAgvPlace.Text);
//Common.log.OutTextBox("手动添加任务: " + LstAgvPlace.Text);
DgvAgv.Rows[idx].SetValues(Common.agvInfo[idx].ToRow());
}
}
catch(Exception ex){ Common.log.OutInfo("手动添加任务失败: " + ex.Message + ex.StackTrace); };
catch(Exception ex){ Common.log.Info("手动添加任务失败: " + ex.Message + ex.StackTrace); };
}
......@@ -397,9 +397,14 @@ namespace AGVControl
}
}
private void BtnOpenExcel_Click(object sender, EventArgs e)
private void BtnArea_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(".\\AGV点位分布.xlsx");
Common.mir.GetResourceArea(Common.agvInfo[0], out Dictionary<string, string> res);
List<string> text = new List<string>();
foreach (string s in res.Keys)
text.Add(s + " " + res[s]);
textBox1.Text = string.Join("\r\n", text);
}
}
}
......@@ -120,9 +120,6 @@
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
......
using System;
using BLL;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
......@@ -15,6 +16,7 @@ namespace AGVControl
[STAThread]
static void Main()
{
log4net.Config.XmlConfigurator.Configure();
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
......@@ -36,12 +38,16 @@ namespace AGVControl
}
}
Common.log = new Asa.File.Log(Common.LOG_PATH, "AgvControl");
Common.log.OutString("=====程序开始=====");
Common.log = log4net.LogManager.GetLogger("AgvServer");
Common.log.Info("=====程序开始=====");
ReadConfig();
Common.chargeStatus = new ChargeStatus();
Common.mir = new BLL.MiR_API();
//Common.mir.GetResourcePosition(Common.agvInfo[0], out Dictionary<string, string> res);
//Common.mir.GetRobot(Common.agvInfo[0], "1", out string name);
Common.control = new BLL.Control();
Common.control.Start();
Common.server = new BLL.AgvServer();
......@@ -52,12 +58,8 @@ namespace AGVControl
Common.control.Stop();
Common.server.Stop();
Common.mir.Dispose();
Common.log.OutString("=====程序结束=====\r\n");
System.Threading.Thread.Sleep(100);
Common.log.Dispose();
System.Threading.Thread.Sleep(100);
Environment.Exit(0);
Common.log.Info("=====程序结束=====\r\n");
//Environment.Exit(0);
}
private static void ReadConfig()
......@@ -130,12 +132,12 @@ namespace AGVControl
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Common.log.OutError((Exception)e.ExceptionObject);
Common.log.Error((Exception)e.ExceptionObject);
}
private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
Common.log.OutError(e.Exception);
Common.log.Error(e.Exception);
}
......
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="AgvServer" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AgvServer.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<logger name="AgvServer">
<level value="Debug" />
<appender-ref ref="AgvServer" />
</logger>
</log4net>
<appSettings>
<!--Server address-->
<add key="http.server" value="http://10.85.199.25/myproject/" />
......@@ -11,10 +30,10 @@
<add key="AutoCharge" value="false"/>
<add key="ChargeWait" value="1"/>
<add key="ChargeThreshold" value="20,70"/>
<add key="MiR_R1467" value="false"/>
<add key="MiR_R1468" value="false"/>
<add key="MiR_R1469" value="false"/>
<add key="MiR_R1470" value="false"/>
<add key="1号车" value="false"/>
<add key="2号车" value="false"/>
<add key="3号车" value="false"/>
<add key="4号车" value="false"/>
<add key="A1" value="true"/>
<add key="A2" value="true"/>
<add key="A3" value="true"/>
......
3,MiR_R1467,10.85.199.67,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
4,MiR_R1468,10.85.199.68,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
5,MiR_R1469,10.85.199.69,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
6,MiR_R1470,10.85.199.70,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
\ No newline at end of file
3,1号车,10.85.199.67,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
4,2号车,10.85.199.68,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
5,3号车,10.85.199.69,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
6,4号车,10.85.199.70,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==,007615a5-2220-11ea-99f2-94c691a73b53
\ No newline at end of file
d28746ad274064006208398e45987f6488ef4636
6e0a935f2fc071fe41a8b4e4966fbe7ca4dacc89
......@@ -46,7 +46,6 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AGVControl\obj\Debug
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AGVControl\obj\Debug\AGVControl.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AGVControl\obj\Debug\AGVControl.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AGVControl\obj\Debug\AGVControl.csprojAssemblyReference.cache
C:\myproject\Gitee\AGVControl\AGVControl\bin\Debug\AGVControl.exe.config
C:\myproject\Gitee\AGVControl\AGVControl\bin\Debug\AGVControl.exe
C:\myproject\Gitee\AGVControl\AGVControl\bin\Debug\AGVControl.pdb
......@@ -92,3 +91,5 @@ C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.exe
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.pdb
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csproj.CoreCompileInputs.cache
C:\ZDL\Gitee\AGVControl\AGVControl\obj\Debug\AGVControl.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AGVControl\bin\Debug\Newtonsoft.Json.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AGVControl\bin\Debug\log4net.dll
此文件的差异被折叠, 点击展开。
......@@ -7,8 +7,8 @@
<ProjectGuid>{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Client</RootNamespace>
<AssemblyName>Client</AssemblyName>
<RootNamespace>Asa</RootNamespace>
<AssemblyName>Asa.AgvClient</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
......@@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
......@@ -29,6 +30,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
......@@ -46,7 +48,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Client.cs" />
<Compile Include="CodeFile1.cs" />
<Compile Include="AgvClient.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
......@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
此文件类型无法预览
此文件类型无法预览
a0778d1eda99bd700643c1ae6955f161aa53e149
0c917ec7742cddff0008fc56d6bc0b43e70b48cf
......@@ -10,11 +10,11 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\ControlCenter\AgvClient\obj\Deb
D:\OneDrive - 上海挚锦科技有限公司\SMD\ControlCenter\AgvClient\obj\Debug\AgvClient.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\ControlCenter\AgvClient\obj\Debug\Client.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\ControlCenter\AgvClient\obj\Debug\Client.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\bin\Debug\Client.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\bin\Debug\Client.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\obj\Debug\AgvClient.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\obj\Debug\AgvClient.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\obj\Debug\Client.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\obj\Debug\Client.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\bin\Debug\Asa.AgvClient.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\bin\Debug\Asa.AgvClient.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\obj\Debug\Asa.AgvClient.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\obj\Debug\Asa.AgvClient.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClient\obj\Debug\AgvClient.csprojAssemblyReference.cache
此文件类型无法预览
此文件类型无法预览
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{ADB09B8F-1560-4038-B6CE-A0F876DC1AA0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Asa</RootNamespace>
<AssemblyName>Asa.AgvClientProduction</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AgvClientProduction.cs" />
<Compile Include="Common.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WebService.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System;
namespace Asa
{
public static class Common
{
public static log4net.ILog LOG;
}
}
......@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("DoubleLine")]
[assembly: AssemblyTitle("AgvClientProduction")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DoubleLine")]
[assembly: AssemblyProduct("AgvClientProduction")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("9f3d3abe-e0e0-4a3b-8f86-f6096295ec75")]
[assembly: Guid("adb09b8f-1560-4038-b6ce-a0f876dc1aa0")]
// 程序集的版本信息由下列四个值组成:
//
......
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Runtime.Serialization;
using System.ServiceModel.Activation;
using System;
using System.IO;
using System.Xml;
using System.Text;
namespace Asa
{
[ServiceContract(Name = "Services")]
internal interface IWebService
{
[OperationContract]
[WebInvoke(UriTemplate = "CreateEmptyRecycleTask", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
Result TaskPost(Stream stream); //emptyStation={line}
[OperationContract]
[WebInvoke(UriTemplate = "CreateEmptyRecycleTask?emptyStation={line}", Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Xml)]
Result TaskGet(string line);
}
[DataContract]
internal class Result
{
[DataMember]
public bool Succeed { get; set; }
[DataMember]
public string ResultData { get; set; }
[DataMember]
public string ErrorMessage { get; set; }
}
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single, IncludeExceptionDetailInFaults = true)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
internal class ClsWebService : IWebService
{
public ClsWebService()
{
}
public Result TaskPost(Stream stream)
{
Result res;
StreamReader sr = new StreamReader(stream);
string s = sr.ReadToEnd();
System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
string emptyStation = nvc["emptyStation"];
if(emptyStation ==null)
res = new Result() { Succeed = false, ResultData = null, ErrorMessage = "emptyStation =null "};
else
{
if(emptyStation.Equals("Feeder"))
{
emptyStation = "FeederOut";
}
AGVControl.Common.LogInfo("WebService Request emptyStation=" + emptyStation,false);
}
if (AGVControl.Common.agvProductionLine.TryGetValue(emptyStation, out string value))
{
res = new Result() { Succeed = true, ResultData = null, ErrorMessage = "" };
AGVControl.Common.log.Debug("WebService Response OK");
//加到任务
//int idx = AGVControl.Common.nodeInfo.FindIndex(s => s.Name == value);
//if (idx > -1)
// AGVControl.Common.linePlace.Add(value);
//else
// AGVControl.Common.log.Error("CreateEmptyRecycleTask " + value + "不存在");
if (!Common.AddLinePlace(value))
Common.log.Error("CreateEmptyRecycleTask 节点【" + value + "】不存在");
else
{
Common.LogInfo("任务:" + value + " 出空料架 【" + emptyStation + "】");
}
//System.IO.File.WriteAllLines(Common.CONFIG_PATH + "LinePlace.txt", Common.linePlace);
}
else
{
res = new Result() { Succeed = false, ResultData = null, ErrorMessage = "Not find " + emptyStation };
AGVControl.Common.LogInfo("WebService Response false "+ "Not find " + emptyStation);
}
return JsonHelper.SerializeObject(res);
}
public Result TaskGet(string line)
{
Result res;
// StreamReader sr = new StreamReader(stream);
//string s = sr.ReadToEnd();
//System.Collections.Specialized.NameValueCollection nvc = System.Web.HttpUtility.ParseQueryString(s);
//string emptyStation = nvc["emptyStation"];
if (line.Equals("Feeder"))
{
line = "FeederOut";
}
else if (line.Equals("4CFeeder"))
{
line = "4CFeederOut";
}
AGVControl.Common.LogInfo("WebService Request emptyStation=" + line,false);
//if (line == null)
// res = new Result() { Succeed = "false", ResultData = null, ErrorMessage = "line =null " };
if (AGVControl.Common.agvProductionLine.TryGetValue(line, out string value))
{
res = new Result() { Succeed = true, ResultData = null, ErrorMessage = "" };
AGVControl.Common.LogInfo("WebService Response OK");
//加到任务
//int idx = AGVControl.Common.nodeInfo.FindIndex(s => s.Name == value);
//if (idx > -1)
// AGVControl.Common.linePlace.Add(value);
//else
// AGVControl.Common.log.Error("CreateEmptyRecycleTask " + value + "不存在");
if (!Common.AddLinePlace(value))
Common.log.Error("CreateEmptyRecycleTask 节点【" + value + "】不存在");
else
{
Common.LogInfo("任务:" + value + " 出空料架 【" + line + "】");
}
//System.IO.File.WriteAllLines(Common.CONFIG_PATH + "LinePlace.txt", Common.linePlace);
}
else
{
res = new Result() { Succeed = false, ResultData = null, ErrorMessage = "Not find " + line };
AGVControl.Common.LogInfo("WebService Response false " + "Not find " + line);
}
return JsonHelper.SerializeObject(res);
}
private Result Task(string line)
{
}
}
public class WebService
{
private WebServiceHost _serviceHost = null;
public void Open(string url)
{
try
{
ClsWebService service = new ClsWebService();
_serviceHost = new WebServiceHost(service, new Uri(url));
_serviceHost.Open();
Common.LOG.Info("Web服务已开启");
}
catch (Exception ex)
{
Common.LOG.Error("Open", ex);
}
}
public void Close()
{
try
{
_serviceHost.Close();
Common.LOG.Info("Web服务已关闭");
}
catch (Exception ex)
{
Common.LOG.Error("Close", ex);
}
}
}
}
......@@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -31,11 +32,12 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Client, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\AGVControl\AgvClient\bin\Debug\Client.dll</HintPath>
<HintPath>..\..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......@@ -83,5 +85,15 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AgvClient\AgvClient.csproj">
<Project>{7dad8f15-0ec9-42df-ae0b-94b45de0f0ac}</Project>
<Name>AgvClient</Name>
</ProjectReference>
<ProjectReference Include="..\AgvServer\AgvServer.csproj">
<Project>{a3e5e5df-811c-4598-98bb-295a84d87027}</Project>
<Name>AgvServer</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="AgvClient" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AgvClient.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<appender name="AgvServer" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AgvServer.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<logger name="AgvClient">
<level value="Debug" />
<appender-ref ref="AgvClient" />
</logger>
<logger name="AgvServer">
<level value="Debug" />
<appender-ref ref="AgvServer" />
</logger>
</log4net>
</configuration>
\ No newline at end of file
......@@ -34,7 +34,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(654, 287);
this.ClientSize = new System.Drawing.Size(654, 506);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
......@@ -12,8 +13,6 @@ namespace AgvClientTest
{
public partial class Form1 : Form
{
Asa.AgvClient client;
public Form1()
{
InitializeComponent();
......@@ -21,18 +20,12 @@ namespace AgvClientTest
private void Form1_Load(object sender, EventArgs e)
{
Asa.ClientNode node = new Asa.ClientNode();
node.Name = "abc";
client = new Asa.AgvClient("");
client.Decode(new byte[] { 1 });
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
}
}
}
......@@ -14,6 +14,7 @@ namespace AgvClientTest
[STAThread]
static void Main()
{
log4net.Config.XmlConfigurator.Configure();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
......
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="AgvClient" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AgvClient.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<appender name="AgvServer" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AgvServer.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<logger name="AgvClient">
<level value="Debug" />
<appender-ref ref="AgvClient" />
</logger>
<logger name="AgvServer">
<level value="Debug" />
<appender-ref ref="AgvServer" />
</logger>
</log4net>
</configuration>
\ No newline at end of file
04752e378157393bb9ae825befb853bbaba9c5f7
25538ba3818dfa6a5212838bca5bac0e80a0c5f4
......@@ -46,7 +46,10 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\obj\De
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\AgvClientTest.exe.config
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\AgvClientTest.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\AgvClientTest.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\Client.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\Client.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\obj\Debug\AgvClientTest.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\Asa.AgvClient.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\Asa.AgvServer.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\Asa.AgvClient.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\Asa.AgvServer.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl\AgvClientTest\bin\Debug\Asa.AgvServer.xml
此文件的差异被折叠, 点击展开。
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A3E5E5DF-811C-4598-98BB-295A84D87027}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Asa</RootNamespace>
<AssemblyName>Asa.AgvServer</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
<DocumentationFile>bin\Debug\Asa.AgvServer.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AgvServer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -5,12 +5,12 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("AssemblyLine")]
[assembly: AssemblyTitle("AgvServer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AssemblyLine")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyProduct("AgvServer")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("b7e946a7-96c7-4eba-832d-2d3b215296c4")]
[assembly: Guid("a3e5e5df-811c-4598-98bb-295a84d87027")]
// 程序集的版本信息由下列四个值组成:
//
......@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.0.7")]
[assembly: AssemblyFileVersion("1.0.0.7")]
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B7E946A7-96C7-4EBA-832D-2D3B215296C4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>AssemblyLine</RootNamespace>
<AssemblyName>AssemblyLine</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ABB.Robotics.Controllers.PC">
<HintPath>..\..\..\MY\DLL\ABB\ABB.Robotics.Controllers.PC.dll</HintPath>
</Reference>
<Reference Include="Asa.File.Log">
<HintPath>..\..\..\MY\DLL\File\Asa.File.Log.dll</HintPath>
</Reference>
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\..\MY\DLL\AIOBOX\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\MY\DLL\RFID\Asa.RFID.dll</HintPath>
</Reference>
<Reference Include="HFReader9CSharp">
<HintPath>..\..\..\MY\DLL\RFID\HFReader9CSharp.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>..\..\..\MY\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\MY\DLL\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=106.6.10.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.6.10\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="RobotStudio.Services.RobApi">
<HintPath>..\..\..\MY\DLL\ABB\RobotStudio.Services.RobApi.dll</HintPath>
</Reference>
<Reference Include="RobotStudio.Services.RobApi.Desktop">
<HintPath>..\..\..\MY\DLL\ABB\RobotStudio.Services.RobApi.Desktop.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BLL\ABB.cs" />
<Compile Include="BLL\DoubleLine.cs" />
<Compile Include="BLL\SplitLine.cs" />
<Compile Include="Common.cs" />
<Compile Include="BLL\ControlCenter.cs" />
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="BLL\InOutLine.cs" />
<Compile Include="BLL\MiR.cs" />
<Compile Include="BLL\PackingLine.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>debug</StartArguments>
</PropertyGroup>
</Project>
\ No newline at end of file
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
using System;
namespace BLL
{
public class InOutLine
{ }
internal enum IO25_DI : int
{
X721, X722, X723, X724, X725, X726, X727, X728, X729, X730, X731, X732, X733, X734, X735, X736
}
internal enum IO25_DO : int
{
Y721, Y722, Y723, Y724, Y725, Y726, Y727, Y728, Y729, Y730, Y731, Y732, Y733, Y734, Y735, Y736
}
}
\ No newline at end of file

\ No newline at end of file
using System;
namespace AssemblyLine
{
public static class Common
{
/// <summary>
/// 日志文件路径
/// </summary>
public readonly static string LOG_PATH = AppDomain.CurrentDomain.BaseDirectory + "LOG\\";
public delegate void StatusEvent(int idx, string ip, bool status);
public delegate void OutTextEvent(string s);
public static IOInfo IO21_Dev; //双层线
public static IOInfo IO22_Dev; //双层线
public static IOInfo IO23_Dev; //双层线
public static IOInfo IO24_Dev; //包装料
public static IOInfo IO25_Dev; //进出料
public static IOInfo IO26_Dev; //出料皮带线1
public static IOInfo IO27_Dev; //出料皮带线2
public static IOInfo IO28_Dev; //分盘线
public static RFIDInfo RFID101_Dev; //双层线
public static RFIDInfo RFID102_Dev; //双层线
public static RFIDInfo RFID103_Dev; //双层线
public static RFIDInfo RFID104_Dev; //双层线
public static RFIDInfo RFID105_Dev; //双层线
public static RFIDInfo RFID106_Dev; //包装料
public static RFIDInfo RFID107_Dev; //进出料
public static RFIDInfo RFID108_Dev; //进出料
public static RFIDInfo RFID109_Dev; //双层线
public static RFIDInfo RFID110_Dev; //分盘线
public static Asa.RFID.ReaderAll ReaderAll;
public static ABBInfo[] ABB_Dev;
public static AgvInfo[] Agv;
public static BLL.ABB ABB_Robot;
public static BLL.MiR MiR_AGV;
public static BLL.Doubleline line_Double;
public static BLL.PackingLine line_Packing;
public static BLL.ControlCenter controlCenter;
public static FrmMain frmMain;
public static System.Collections.Generic.Dictionary<string, string> config;
public static string LOCAL_IP = ""; // = "192.168.103.12";
public const string ABB_MOVEP = "movep";
public const string ABB_MOVEGET = "moveget";
public const string ABB_MOVEPUT = "moveput";
public const string ABB_MOVEHOME = "movehome";
/// <summary>
/// 16进制
/// </summary>
/// <param name="buff"></param>
/// <returns></returns>
public static string HexBuff(byte[] buff)
{
string s = "";
if (buff == null) return s;
for (int i = 0; i < buff.Length; i++)
s += buff[i].ToString("X2") + " ";
return s;
}
}
/// <summary>
/// IO设备信息
/// </summary>
public class IOInfo
{
/// <summary>
/// IP地址
/// </summary>
public string IP;
/// <summary>
/// 名称
/// </summary>
public string Name;
/// <summary>
/// IO模块
/// </summary>
public Asa.IOModule.AIOBOX Box;
/// <summary>
/// DI
/// </summary>
public Register[] DI;
/// <summary>
/// DO
/// </summary>
public Register[] DO;
public string ToStrDO(int index, int status)
{
string s = "";
if (status == 255)
s += " [ON]";
else if (status == 0)
s += " [OFF]";
s += DO[index].Name;
return s;
}
public string ToStrDI(int index, int status)
{
string s = "";
if (status == 255)
s += " [ON]";
else if (status == 0)
s += " [OFF]";
s += DI[index].Name;
return s;
}
}
/// <summary>
/// 寄存器
/// </summary>
public class Register
{
/// <summary>
/// 模块寄存器ID
/// </summary>
public string ID;
/// <summary>
/// 号码管名称
/// </summary>
public string Name;
/// <summary>
/// 解释说明
/// </summary>
public string Explain;
/// <summary>
/// 状态
/// </summary>
public Asa.IOModule.Box_Sta Sta;
/// <summary>
/// 寄存器
/// </summary>
/// <param name="id">模块寄存器ID</param>
/// <param name="name">号码管名称</param>
/// <param name="explain">解释说明</param>
public Register(string id, string name, string explain)
{
ID = id;
Name = name;
Explain = explain;
Sta = Asa.IOModule.Box_Sta.Off;
}
}
/// <summary>
/// RFID设备信息
/// </summary>
public class RFIDInfo
{
/// <summary>
/// IP地址
/// </summary>
public string IP;
/// <summary>
/// 模块编号
/// </summary>
public string ID;
/// <summary>
/// 解释说明
/// </summary>
public string Explain;
public RFIDInfo(string ip, string id, string explain)
{
IP = ip;
ID = id;
Explain = explain;
}
}
/// <summary>
/// MiR AGV设备信息
/// </summary>
public class AgvInfo
{
/// <summary>
/// 是否在线
/// </summary>
public bool IsCon;
/// <summary>
/// 是否可用
/// </summary>
public bool IsUse;
/// <summary>
/// 是否手动取消使用
/// </summary>
public bool IsCancel;
/// <summary>
/// 是否存在架子
/// </summary>
public bool ExistShelf;
public string Place;
public string Name;
public string IP;
public string RFID;
public string Mark;
public string Key;
public int StateID;
public string StateText;
/// <summary>
/// PLC20寄存器的状态
/// </summary>
public BLL.MiR_Status Status;
public AgvInfo(string name, string ip, string key)
{
Name = name;
IP = ip;
Key = key;
IsCon = false;
IsUse = false;
IsCancel = false;
ExistShelf = false;
RFID = "";
Place = "";
StateID = -1;
StateText = "";
Mark = "";
Status = BLL.MiR_Status.None;
}
}
/// <summary>
/// ABB机器人设备信息
/// </summary>
public class ABBInfo
{
public string IP;
public string Name;
public string State;
public string Server;
public bool IsOpen;
//public string SendStr;
//public string ReceiveStr;
//public string StartStr;
//public string StopStr;
public ABBInfo(string ip, string name, string state, string server)
{
IP = ip;
Name = name;
State = state;
Server = server;
IsOpen = false;
//SendStr = ip + " " + name + " Send ";
//ReceiveStr = ip + " " + name + " Received ";
//StartStr = ip + " " + name + " Server Start";
//StopStr = ip + " " + name + " Server Stop";
}
public string ToString(string s)
{
return IP + " " + Name + " " + s;
}
}
}
\ No newline at end of file
此文件的差异太大,无法显示。
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AssemblyLine
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//程序只能运行一次
Process current = Process.GetCurrentProcess();
Process[] processes = Process.GetProcessesByName(current.ProcessName);
foreach (Process process in processes)
{
if (process.Id != current.Id) //自己
{
if (process.MainModule.FileName == current.MainModule.FileName)
{
MessageBox.Show("Program is running", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
}
try
{
Application.Run(new FrmMain(args));
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AssemblyLine.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AssemblyLine.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AssemblyLine.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.File.Log</name>
</assembly>
<members>
<member name="T:Asa.File.Log">
<summary>
日志操作类
</summary>
</member>
<member name="M:Asa.File.Log.#ctor(System.String,System.String)">
<summary>
日志
</summary>
<param name="path">文件夹目录</param>
<param name="name">文件名</param>
</member>
<member name="P:Asa.File.Log.ShowDateTime">
<summary>
显示的日期和时间
</summary>
</member>
<member name="P:Asa.File.Log.ShowFileName">
<summary>
显示的文件名
</summary>
</member>
<member name="P:Asa.File.Log.ShowArgument">
<summary>
显示方法的参数
</summary>
</member>
<member name="P:Asa.File.Log.ShowText">
<summary>
显示的文本控件
</summary>
</member>
<member name="P:Asa.File.Log.Level">
<summary>
打印级别
</summary>
</member>
<member name="M:Asa.File.Log.Dispose">
<summary>
释放
</summary>
</member>
<member name="M:Asa.File.Log.OutFatal(System.Exception)">
<summary>
输出致命错误
</summary>
<param name="ex"></param>
</member>
<member name="M:Asa.File.Log.OutError(System.Exception)">
<summary>
输出一般错误
</summary>
<param name="ex"></param>
</member>
<member name="M:Asa.File.Log.OutWarn(System.String)">
<summary>
输出警告信息
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.File.Log.OutWarn(System.String,System.String)">
<summary>
输出警告信息
</summary>
<param name="key"></param>
<param name="s"></param>
</member>
<member name="M:Asa.File.Log.OutInfo(System.String)">
<summary>
输出一般信息
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.File.Log.OutInfo(System.String,System.String)">
<summary>
输出一般信息
</summary>
<param name="key"></param>
<param name="s"></param>
</member>
<member name="M:Asa.File.Log.OutDebug(System.String)">
<summary>
输出调试信息
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.File.Log.OutString(System.String)">
<summary>
输出字符串数据
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.File.Log.OutTextBox(System.String)">
<summary>
输出到文本控件上
</summary>
<param name="s"></param>
</member>
<member name="T:Asa.File.LogDateTime">
<summary>
日志记录日期
</summary>
</member>
<member name="F:Asa.File.LogDateTime.Date">
<summary>
日期
</summary>
</member>
<member name="F:Asa.File.LogDateTime.Time">
<summary>
时间
</summary>
</member>
<member name="F:Asa.File.LogDateTime.DateTime">
<summary>
日期和时间
</summary>
</member>
<member name="T:Asa.File.LogFileName">
<summary>
日志记录文件名
</summary>
</member>
<member name="F:Asa.File.LogFileName.FileName">
<summary>
文件名
</summary>
</member>
<member name="F:Asa.File.LogFileName.FullFileName">
<summary>
完整文件名,包含路径
</summary>
</member>
<member name="T:Asa.File.LogLevel">
<summary>
日志打印级别
</summary>
</member>
<member name="F:Asa.File.LogLevel.Fatal">
<summary>
致命错误
</summary>
</member>
<member name="F:Asa.File.LogLevel.Error">
<summary>
一般错误
</summary>
</member>
<member name="F:Asa.File.LogLevel.Warn">
<summary>
警告信息
</summary>
</member>
<member name="F:Asa.File.LogLevel.Info">
<summary>
一般信息
</summary>
</member>
<member name="F:Asa.File.LogLevel.Debug">
<summary>
调试信息
</summary>
</member>
<member name="F:Asa.File.LogLevel.All">
<summary>
所有
</summary>
</member>
</members>
</doc>
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.RFID</name>
</assembly>
<members>
<member name="T:Asa.RFID.Reader">
<summary>
RFID读卡器
</summary>
</member>
<member name="T:Asa.RFID.Reader.Received_Event">
<summary>
接收事件
</summary>
<param name="ip"></param>
<param name="buff"></param>
</member>
<member name="E:Asa.RFID.Reader.Received">
<summary>
接收数据
</summary>
</member>
<member name="M:Asa.RFID.Reader.#ctor(System.String)">
<summary>
RFID读卡器
</summary>
</member>
<member name="P:Asa.RFID.Reader.IsConn">
<summary>
是否连接
</summary>
</member>
<member name="P:Asa.RFID.Reader.IsAutoScan">
<summary>
是否自动扫描
</summary>
</member>
<member name="P:Asa.RFID.Reader.IsExist">
<summary>
是否存在ID卡
</summary>
</member>
<member name="P:Asa.RFID.Reader.ErrCode">
<summary>
错误代码
</summary>
</member>
<member name="P:Asa.RFID.Reader.IP">
<summary>
IP地址
</summary>
</member>
<member name="P:Asa.RFID.Reader.LogPath">
<summary>
日志目录
</summary>
</member>
<member name="P:Asa.RFID.Reader.ID">
<summary>
ID号码
</summary>
</member>
<member name="M:Asa.RFID.Reader.Open(System.Boolean)">
<summary>
连接
</summary>
<param name="autoScan">自动扫描</param>
</member>
<member name="M:Asa.RFID.Reader.Close">
<summary>
关闭
</summary>
</member>
<member name="M:Asa.RFID.Reader.FindRFID">
<summary>
查找电子标签,扫描模式不能使用
</summary>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Read">
<summary>
读取电子标签
</summary>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.Write(System.Byte[])">
<summary>
写入数据到电子标签,扫描模式不能使用
</summary>
<param name="buff">数据,必须小于等于112字节</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.Reader.AutoScanMode(System.Boolean)">
<summary>
自动扫描模式
</summary>
<param name="open"></param>
<param name="open2"></param>
<returns></returns>
</member>
<member name="T:Asa.RFID.ReaderAll">
<summary>
RFID读卡器
</summary>
</member>
<member name="M:Asa.RFID.ReaderAll.#ctor">
<summary>
RFID
</summary>
</member>
<member name="P:Asa.RFID.ReaderAll.LogPath">
<summary>
日志目录
</summary>
</member>
<member name="P:Asa.RFID.ReaderAll.ScanMode">
<summary>
扫描模式,true自动,false查找
</summary>
</member>
<member name="M:Asa.RFID.ReaderAll.Open(System.String[])">
<summary>
打开所有
</summary>
<param name="ip"></param>
</member>
<member name="M:Asa.RFID.ReaderAll.Close">
<summary>
关闭所有
</summary>
</member>
<member name="M:Asa.RFID.ReaderAll.IsOpen">
<summary>
是否打开
</summary>
<returns></returns>
</member>
<member name="M:Asa.RFID.ReaderAll.IsOpen(System.String)">
<summary>
是否打开
</summary>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.ReaderAll.Read(System.String)">
<summary>
读取
</summary>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.ReaderAll.ReadStr(System.String)">
<summary>
读取
</summary>
<param name="ip"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.ReaderAll.Clear(System.String)">
<summary>
清零
</summary>
<param name="ip"></param>
</member>
<member name="T:Asa.RFID.IP">
<summary>
IP地址操作
</summary>
</member>
<member name="M:Asa.RFID.IP.Find(System.String)">
<summary>
查找IP地址
</summary>
<param name="localIP"></param>
<returns></returns>
</member>
<member name="M:Asa.RFID.IP.Modify(System.String,System.String,System.String)">
<summary>
修改IP地址,需要先查找IP
</summary>
<param name="localIP">本地IP</param>
<param name="beforeIP">修改前的IP</param>
<param name="afterIP">修改后的IP</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.IP.GetLocal">
<summary>
获取本地IPv4地址
</summary>
<returns></returns>
</member>
<member name="T:Asa.RFID.Log">
<summary>
日志操作类
</summary>
</member>
<member name="M:Asa.RFID.Log.#ctor(System.String)">
<summary>
日志
</summary>
<param name="path">文件夹目录</param>
</member>
<member name="M:Asa.RFID.Log.#ctor(System.String,System.String)">
<summary>
日志
</summary>
<param name="path">文件夹目录</param>
<param name="name">文件名</param>
</member>
<member name="M:Asa.RFID.Log.Exit">
<summary>
退出
</summary>
</member>
<member name="M:Asa.RFID.Log.OutError(System.String)">
<summary>
输出错误信息
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.RFID.Log.OutInfo(System.String)">
<summary>
输出信息
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.RFID.Log.OutDebug(System.String)">
<summary>
输出调试信息
</summary>
<param name="s"></param>
</member>
<member name="M:Asa.RFID.Log.OutString(System.String)">
<summary>
输出字符串数据
</summary>
<param name="s"></param>
</member>
</members>
</doc>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
MoveA1,eec1eed4-2a04-11ea-9c84-94c691a734f1
MoveA2,f68f18db-2f89-11ea-9ee4-94c691a734f1
MoveA3,979d10eb-2f9d-11ea-9ee4-94c691a734f1
MoveA4,df6d991a-2f9d-11ea-9ee4-94c691a734f1
MoveA5,
MoveA6,
MoveB1,86a6ab06-261e-11ea-a30e-94c691a73861
MoveB2,55fcfdc5-2623-11ea-a30e-94c691a73861
MoveB3,905399c8-2623-11ea-a30e-94c691a73861
MoveB4,aa33e13a-2623-11ea-a30e-94c691a73861
MoveB5,2cd36cde-2624-11ea-a30e-94c691a73861
MoveB6,3e713e8b-2624-11ea-a30e-94c691a73861
MoveB7,
MoveB8,
DockB1,339d1830-261f-11ea-a30e-94c691a73861
DockB2,a6d6f52a-2624-11ea-a30e-94c691a73861
DockB3,b66f0714-2624-11ea-a30e-94c691a73861
DockB4,d01443f2-2624-11ea-a30e-94c691a73861
DockB5,f50dd02b-2624-11ea-a30e-94c691a73861
DockB6,0e5503f2-2625-11ea-a30e-94c691a73861
DockB7,
DockB8,
MoveC1,a6e36b4c-2fa0-11ea-9ee4-94c691a734f1
MoveC2,6c6829de-2624-11ea-a30e-94c691a73861
MoveC3,3ffe309f-2ae6-11ea-a6cf-94c691a734f1
MoveC4,2ef71347-2ae7-11ea-a6cf-94c691a734f1
MoveC5,34ec2f1f-2ae8-11ea-a6cf-94c691a734f1
MoveC6,52f37677-2f96-11ea-9ee4-94c691a734f1
MoveC7,bcd0e389-2ab7-11ea-a6cf-94c691a734f1
MoveC8,8a48301d-2624-11ea-a30e-94c691a73861
Enter,2eadcb87-239a-11ea-8343-94c691a73861
Leave,80943220-239a-11ea-8343-94c691a73861
MoveStandby,4eb9641a-3439-11ea-984a-94c691a734f1
Init,cd51e039-34eb-11ea-b4fe-94c691a734f1
MiR_R1467_IO,007615a5-2220-11ea-99f2-94c691a73b53
MiR_R1468_IO,007615a5-2220-11ea-99f2-94c691a73b53
MiR_R1469_IO,007615a5-2220-11ea-99f2-94c691a73b53
MiR_R1470_IO,007615a5-2220-11ea-99f2-94c691a73b53
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<Config>
<WebServer>http://10.85.160.25/myproject/</WebServer>
<BenQ_AGV>10.85.161.122</BenQ_AGV>
<Local_IP>192.168.103.12</Local_IP><!-- 本地IP地址,ABB使用 -->
<ABB1_Speed>450</ABB1_Speed><!-- ABB1号右侧机器人运行速度 -->
<ABB2_Speed>450</ABB2_Speed><!-- ABB2号左侧机器人运行速度 -->
<ABB3_Speed>350</ABB3_Speed><!-- ABB3号下侧机器人运行速度 -->
<Log_Count>30</Log_Count><!-- 显示的日志数量 -->
<Chain_Sleep>60</Chain_Sleep><!-- 链条休眠时间,单位秒 -->
</Config>
\ No newline at end of file
X601,急停
X602,复位
X603,联动
X604,气压检测
X605,左侧升降气缸上升端
X606,左侧升降气缸下降端
X607,左侧轨道左阻挡检测
X608,左侧轨道右阻挡检测
X609,左侧下层线体阻挡1检测
X610,左侧下层线体阻挡2检测
X611,左侧下层线体阻挡3检测
X612,左侧上层线体阻挡1检测
X613,左侧上层线体阻挡2检测
X614,左侧上层线体阻挡3检测
X615,中间升降气缸上升端
X616,中间升降气缸下降端
Y601,待机状态(指示灯)
Y602,运行状态(指示灯)
Y603,故障状态(指示灯)
Y604,故障状态(蜂鸣器)
Y605,左侧升降气缸上升SOL
Y606,左侧升降气缸下降SOL
Y607,左侧入口轨道阻挡下降
Y608,左侧下层线体阻挡1下降
Y609,左侧下层线体阻挡2下降
Y610,左侧下层线体阻挡3下降
Y611,左侧上层线体阻挡1下降
Y612,左侧上层线体阻挡2下降
Y613,左侧上层线体阻挡3下降
Y614,左侧入口轨道电机正转
Y615,左侧入口轨道电机反转
Y616,
X621,中间轨道左阻挡检测
X622,中间轨道右阻挡检测
X623,上料工位1阻挡1检测
X624,上料工位1阻挡2检测
X625,上料工位1阻挡3检测
X626,上料工位1阻挡4检测
X627,上料工位2阻挡1检测
X628,上料工位2阻挡2检测
X629,上料工位1顶升上升端
X630,上料工位1顶升下降端
X631,上料工位2顶升上升端
X632,上料工位2顶升下降端
X633,右侧升降气缸上升端
X634,右侧升降气缸下降端
X635,右侧下层线体阻挡1检测
X636,右侧下层线体阻挡2检测
Y621,左侧下层电机正转
Y622,左侧上层电机正转
Y623,中间轨道电机正转
Y624,中间轨道电机反转
Y625,中间升降气缸上升SOL
Y626,中间升降气缸下降SOL
Y627,中间轨道左阻挡下降
Y628,中间轨道右阻挡下降
Y629,上料工位1阻挡1下降
Y630,上料工位1阻挡2下降
Y631,上料工位1阻挡3下降
Y632,上料工位1阻挡4下降
Y633,上料工位2阻挡1下降
Y634,上料工位2阻挡2下降
Y635,
Y636,
X641,右侧轨道左阻挡检测
X642,右侧轨道右阻挡检测
X643,右侧上层线体阻挡1检测
X644,右侧上层线体阻挡2检测
X645,
X646,
X647,
X648,
Y641,上料工位1顶升上升SOL
Y642,上料工位1顶升下降SOL
Y643,上料工位2顶升上升SOL
Y644,上料工位2顶升下降SOL
Y645,上料工位1电机正转
Y646,上料工位1电机反转
Y647,上料工位2电机正转
Y648,上料工位2电机反转
Y649,右侧出口轨道电机正转
Y650,右侧出口轨道电机反转
Y651,右侧下层电机正转
Y652,右侧上层电机正转
Y653,右侧下层线体阻挡1下降
Y654,右侧下层线体阻挡2下降
Y655,右侧升降气缸上升SOL
Y656,右侧升降气缸下降SOL
Y661,右侧轨道左阻挡下降
Y662,右侧轨道右阻挡下降
Y663,右侧上层线体阻挡1下降
Y664,右侧上层线体阻挡2下降
Y665,
Y666,
Y667,
Y668,
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!