Commit f90ee823 张东亮

急停后复位rfid被关闭

1 个父辈 3142a26b
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
<?xml version="1.0"?>
<doc>
<assembly>
<name>Asa.RFID.ReadAll</name>
</assembly>
<members>
<member name="T:Asa.RFID.ReadAll">
<summary>
读取所有RFID
</summary>
</member>
<member name="M:Asa.RFID.ReadAll.#ctor(System.String)">
<summary>
读取所有RFID
</summary>
<param name="logName">日志名称</param>
</member>
<member name="P:Asa.RFID.ReadAll.Type">
<summary>
设备类型
</summary>
</member>
<member name="M:Asa.RFID.ReadAll.Start(System.Int32)">
<summary>
开始
</summary>
<param name="port">端口号</param>
</member>
<member name="M:Asa.RFID.ReadAll.Stop">
<summary>
停止
</summary>
</member>
<member name="M:Asa.RFID.ReadAll.Read(System.String,System.String)">
<summary>
读取
</summary>
<param name="ip">IP地址</param>
<param name="defaultID">没有找到时返回</param>
<returns></returns>
</member>
<member name="M:Asa.RFID.ReadAll.Read(System.String)">
<summary>
读取所有
</summary>
<param name="defaultID">没有数据时返回</param>
</member>
<member name="M:Asa.RFID.ReadAll.Clear(System.String,System.String)">
<summary>
清除缓存
</summary>
<param name="ip">IP地址</param>
<param name="defaultID">设置初始ID</param>
</member>
<member name="M:Asa.RFID.ReadAll.Clear(System.String)">
<summary>
清除所有缓存
</summary>
<param name="defaultID">设置初始ID</param>
</member>
<member name="T:Asa.RFID.DeviceType">
<summary>
RFID读卡器类型
</summary>
</member>
<member name="F:Asa.RFID.DeviceType.PuYue">
<summary>
普阅(新)
</summary>
</member>
<member name="F:Asa.RFID.DeviceType.HaoBin">
<summary>
浩斌(旧)
</summary>
</member>
</members>
</doc>
此文件类型无法预览
此文件类型无法预览
<?xml version="1.0"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
...@@ -78,4 +78,12 @@ ...@@ -78,4 +78,12 @@
</providers> </providers>
</roleManager> </roleManager>
</system.web> </system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>
\ No newline at end of file \ No newline at end of file
...@@ -53,17 +53,18 @@ ...@@ -53,17 +53,18 @@
<ApplicationIcon>DfIcon.ico</ApplicationIcon> <ApplicationIcon>DfIcon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Client, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Agv">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\SO775-DUOStore\dll\Agv.dll</HintPath>
<HintPath>..\..\dll\Client.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net"> <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\dll\log4net.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
...@@ -106,6 +107,7 @@ ...@@ -106,6 +107,7 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net472" />
</packages>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace> <RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>Common</AssemblyName> <AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
...@@ -33,9 +33,8 @@ ...@@ -33,9 +33,8 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\packages\log4net.2.0.12\lib\net40\log4net.dll</HintPath>
<HintPath>..\..\dll\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json"> <Reference Include="Newtonsoft.Json">
<HintPath>..\..\dll\Newtonsoft.Json.dll</HintPath> <HintPath>..\..\dll\Newtonsoft.Json.dll</HintPath>
...@@ -44,6 +43,7 @@ ...@@ -44,6 +43,7 @@
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
...@@ -66,6 +66,9 @@ ...@@ -66,6 +66,9 @@
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Service References\" /> <WCFMetadata Include="Service References\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net40" requireReinstallation="true" />
</packages>
\ No newline at end of file \ No newline at end of file
...@@ -45,21 +45,18 @@ ...@@ -45,21 +45,18 @@
<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.HiStation"> <Reference Include="Asa.RFID.ReadAll">
<HintPath>..\..\dll\Asa.RFID.HiStation.dll</HintPath> <HintPath>..\..\dll\Asa.RFID.ReadAll.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID.IReadAll">
<HintPath>..\..\dll\Asa.RFID.IReadAll.dll</HintPath>
</Reference> </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>
</Reference> </Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
<HintPath>..\..\dll\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
...@@ -98,9 +95,11 @@ ...@@ -98,9 +95,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="LineConfig\LineConfig.csv"> <None Include="LineConfig\LineConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
......
...@@ -26,6 +26,6 @@ PRO,L1线入口节点名称,L1_In_AgvName,A2,,,,,,, ...@@ -26,6 +26,6 @@ PRO,L1线入口节点名称,L1_In_AgvName,A2,,,,,,,
PRO,L1线出口节点名称,L1_Out_AgvName,A1,,,,,,, PRO,L1线出口节点名称,L1_Out_AgvName,A1,,,,,,,
PRO,L2线入口节点名称,L2_In_AgvName,A4,,,,,,, PRO,L2线入口节点名称,L2_In_AgvName,A4,,,,,,,
PRO,L2线出口节点名称,L2_Out_AgvName,A3,,,,,,, PRO,L2线出口节点名称,L2_Out_AgvName,A3,,,,,,,
PRO,L1空料串线出口RFIDIP,L1_Out_RFIDIP,10.21.69.1,,,,,, , PRO,L1空料串线出口RFIDIP,L1_Out_RFIDIP,10.21.69.46,,,,,, ,
PRO,L2上料线出口RFIDIP,L2_Out_RFIDIP,10.21.69.46,,,,,, , PRO,L2上料线出口RFIDIP,L2_Out_RFIDIP,10.21.69.1,,,,,, ,
PRO,休眠秒数(秒),SleepSeconds,40,,,,,,, PRO,休眠秒数(秒),SleepSeconds,40,,,,,,,
...@@ -11,9 +11,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -11,9 +11,9 @@ namespace OnlineStore.DeviceLibrary
{ {
public class RFIDManager public class RFIDManager
{ {
private static Asa.RFID.ReadAll readAll =new Asa.RFID.ReadAll ("TheRFID"); private static Asa.RFID.ReadAll readAll = new Asa.RFID.ReadAll("TheRFID");
private static bool IsOpen = false; private static bool IsOpen = false;
// private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>(); // private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>();
public static void Open() public static void Open()
{ {
if (IsOpen) if (IsOpen)
...@@ -27,9 +27,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,9 +27,10 @@ namespace OnlineStore.DeviceLibrary
{ {
port = 13001; port = 13001;
} }
//readAll.Received += ReadAll_Received; //readAll.Received += ReadAll_Received;
// readAll.Log += ReadAll_Log; // readAll.Log += ReadAll_Log;
LogUtil.info("RFID Server Open,port=" + port); LogUtil.info("RFID Server Open,port=" + port);
readAll.Type = Asa.RFID.DeviceType.PuYue;
readAll.Start(port); readAll.Start(port);
IsOpen = true; IsOpen = true;
} }
...@@ -39,7 +40,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -39,7 +40,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private static string lastStr = ""; private static string lastStr = "";
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;
...@@ -57,13 +58,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -57,13 +58,11 @@ namespace OnlineStore.DeviceLibrary
{ {
if (String.IsNullOrEmpty(ip).Equals(false)) if (String.IsNullOrEmpty(ip).Equals(false))
{ {
string outValue = readAll.Read(ip); string outValue = readAll.Read(ip, "000");
if (isClear) if (isClear)
{ {
readAll.Clear(ip); readAll.Clear(ip, "000");
} }
RFIDData data = new RFIDData(outValue); RFIDData data = new RFIDData(outValue);
return data; return data;
} }
...@@ -74,13 +73,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -74,13 +73,28 @@ namespace OnlineStore.DeviceLibrary
} }
return new RFIDData(); return new RFIDData();
} }
public static void ClearRFID(string ip)
{
try
{
if (String.IsNullOrEmpty(ip).Equals(false))
{
readAll.Clear(ip, "000");
}
}
catch (Exception ex)
{
LogUtil.error("ClearRFID[" + ip + "] 出错:" + ex.ToString());
}
}
public static void Close() public static void Close()
{ {
try try
{ {
readAll.Stop(); readAll.Stop();
IsOpen = false;
LogUtil.error("关闭RFID");
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -151,7 +151,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -151,7 +151,10 @@ namespace OnlineStore.DeviceLibrary
} }
private void SleepTimerProcess() private void SleepTimerProcess()
{ {
if (alarmType.Equals(AlarmType.SuddenStop))
{
return;
}
if (needCheckList.Count <= 0) if (needCheckList.Count <= 0)
{ {
needCheckList.Add(IO_Type.L1_InCheck); needCheckList.Add(IO_Type.L1_InCheck);
...@@ -163,6 +166,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -163,6 +166,7 @@ namespace OnlineStore.DeviceLibrary
needCheckList.Add(IO_Type.L2_StopCheck); needCheckList.Add(IO_Type.L2_StopCheck);
needCheckList.Add(IO_Type.L2_OutCheck); needCheckList.Add(IO_Type.L2_OutCheck);
needCheckList.Add(IO_Type.L2_LoadSig); needCheckList.Add(IO_Type.L2_LoadSig);
needCheckList.Add(IO_Type.Pass_BTN);
needCheckList.Add(IO_Type.L2_StopDown); needCheckList.Add(IO_Type.L2_StopDown);
} }
bool agvBusy = false; bool agvBusy = false;
......
...@@ -60,14 +60,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -60,14 +60,14 @@ namespace OnlineStore.DeviceLibrary
string appPath = Application.StartupPath; string appPath = Application.StartupPath;
string linefilePath = appPath + ConfigAppSettings.GetValue(Setting_Init.Line_Config); string linefilePath = appPath + ConfigAppSettings.GetValue(Setting_Init.Line_Config);
LogUtil.info(LOGGER, " 开始加载VMI流水线配置:" + linefilePath); LogUtil.info(LOGGER, " 开始加载流水线配置:" + linefilePath);
RobotConfig storeConfig = CSVConfigReader.LoadConfig(linefilePath); RobotConfig storeConfig = CSVConfigReader.LoadConfig(linefilePath);
Config = (LineConfig)storeConfig; Config = (LineConfig)storeConfig;
Line = new LineBean(Config); Line = new LineBean(Config);
LogUtil.info(LOGGER, "加载VMI流水线完成!"); LogUtil.info(LOGGER, "加载流水线完成!");
return Line; return Line;
} }
......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net472" />
</packages>
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace> <RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName> <AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
...@@ -33,12 +33,13 @@ ...@@ -33,12 +33,13 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\packages\log4net.2.0.12\lib\net40\log4net.dll</HintPath>
<HintPath>..\..\dll\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
...@@ -63,6 +64,9 @@ ...@@ -63,6 +64,9 @@
<Name>Common</Name> <Name>Common</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net40" requireReinstallation="true" />
</packages>
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!