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,7 +11,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -11,7 +11,7 @@ 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()
...@@ -30,6 +30,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -30,6 +30,7 @@ namespace OnlineStore.DeviceLibrary
//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;
} }
...@@ -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)
{ {
......
...@@ -36,7 +36,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -36,7 +36,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Interval = 300; mainTimer.Interval = 300;
mainTimer.AutoReset = true; mainTimer.AutoReset = true;
mainTimer.Enabled = false; mainTimer.Enabled = false;
mainTimer.Elapsed +=timersTimer_Elapsed; mainTimer.Elapsed += timersTimer_Elapsed;
//添加调试 //添加调试
IsDebug = ConfigAppSettings.GetIntValue(Setting_Init.IsInDebug).Equals(1); IsDebug = ConfigAppSettings.GetIntValue(Setting_Init.IsInDebug).Equals(1);
...@@ -185,7 +185,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -185,7 +185,7 @@ namespace OnlineStore.DeviceLibrary
public void Alarm(AlarmType alarmType) public void Alarm(AlarmType alarmType)
{ {
if (this.alarmType.Equals(alarmType) && alarmType != AlarmType.SuddenStop ) if (this.alarmType.Equals(alarmType) && alarmType != AlarmType.SuddenStop)
{ {
return; return;
} }
...@@ -242,9 +242,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -242,9 +242,9 @@ namespace OnlineStore.DeviceLibrary
ResetProcess(); ResetProcess();
} }
} }
else if (runStatus.Equals(RunStatus.Runing)) else if (runStatus.Equals(RunStatus.Runing) && !alarmType.Equals(AlarmType.SuddenStop))
{ {
if(IsDebug) if (IsDebug)
{ {
AgvClient.SetCancelState(true); AgvClient.SetCancelState(true);
} }
...@@ -281,7 +281,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,7 +281,7 @@ namespace OnlineStore.DeviceLibrary
private DateTime ol1_lastSendShelfTime = DateTime.Now; private DateTime ol1_lastSendShelfTime = DateTime.Now;
private DateTime ol2_lastSendShelfTime = DateTime.Now; private DateTime ol2_lastSendShelfTime = DateTime.Now;
private int StopDownMS = 1500; private int StopDownMS = 1000;
private DateTime il1_lastCallAgvTime = DateTime.Now.AddMinutes(-5); private DateTime il1_lastCallAgvTime = DateTime.Now.AddMinutes(-5);
private Stopwatch il1_outstopCheckWarch = new Stopwatch(); private Stopwatch il1_outstopCheckWarch = new Stopwatch();
/// <summary> /// <summary>
...@@ -293,7 +293,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -293,7 +293,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - ol1_lastSendShelfTime; TimeSpan span = DateTime.Now - ol1_lastSendShelfTime;
//如果出口无料架,持续1000以上,放开阻挡放出一个料架 //如果出口无料架,持续1000以上,放开阻挡放出一个料架
//每次放料架时间间隔3秒 //每次放料架时间间隔3秒
if (IOManager.IOValue(IO_Type.L1_StopCheck).Equals(IO_VALUE.HIGH)&&IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.LOW) && span.TotalSeconds > 3) if (IOManager.IOValue(IO_Type.L1_StopCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.LOW) && span.TotalSeconds > 3)
{ {
//如果空料串线体出口无料架,放一个料架到出口 //如果空料串线体出口无料架,放一个料架到出口
if (LineManager.checkWatch(ol1_noshelfWatch, 1000)) if (LineManager.checkWatch(ol1_noshelfWatch, 1000))
...@@ -316,14 +316,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -316,14 +316,14 @@ namespace OnlineStore.DeviceLibrary
//出口信号需要持续1秒钟 //出口信号需要持续1秒钟
if (IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.HIGH) && span1.TotalSeconds > 60) if (IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.HIGH) && span1.TotalSeconds > 60)
{ {
if (LastL1OutShelfId.Equals("000").Equals(false)) if (LastL1OutShelfId.StartsWith("0").Equals(false))
{ {
if (LineManager.checkWatch(il1_outstopCheckWarch, 1000)) if (LineManager.checkWatch(il1_outstopCheckWarch, 1000))
{ {
il1_lastCallAgvTime = DateTime.Now; il1_lastCallAgvTime = DateTime.Now;
LogUtil.info(" 空料串线体出口有料架" + LastL1OutShelfId + ",呼叫agv小车[" + Config.L1_Out_AgvName + "] [NeedLeave] "); LogUtil.info(" 空料串线体出口有料架" + LastL1OutShelfId + ",呼叫agv小车[" + Config.L1_Out_AgvName + "] [NeedLeave] ");
AgvClient.NeedLeave(Config.L1_Out_AgvName, LastL1OutShelfId); AgvClient.NeedLeave(Config.L1_Out_AgvName, LastL1OutShelfId,Agv.ClientShelf.Empty);
} }
} }
} }
...@@ -344,12 +344,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -344,12 +344,13 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW) && AgvClient.GetAction(Config.L1_In_AgvName).Equals(ClientAction.None)) if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW) && AgvClient.GetAction(Config.L1_In_AgvName).Equals(ClientAction.None))
{ {
AgvClient.NeedEnter(Config.L1_In_AgvName, ""); AgvClient.NeedEnter(Config.L1_In_AgvName, "");
}else if(IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.HIGH) && AgvClient.GetAction(Config.L1_In_AgvName).Equals(ClientAction.NeedEnter)) }
else if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.HIGH) && AgvClient.GetAction(Config.L1_In_AgvName).Equals(ClientAction.NeedEnter))
{ {
AgvClient.SetToNone(Config.L1_In_AgvName, ""); AgvClient.SetToNone(Config.L1_In_AgvName, "");
} }
//如果是出口无料架,NeedLeave状态,改为None //如果是出口无料架,NeedLeave状态,改为None
if ((IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.LOW) || LastL1OutShelfId.Equals("000")) && if ((IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.LOW) || LastL1OutShelfId.StartsWith("0")) &&
AgvClient.GetAction(Config.L1_Out_AgvName).Equals(ClientAction.NeedLeave)) AgvClient.GetAction(Config.L1_Out_AgvName).Equals(ClientAction.NeedLeave))
{ {
il1_outstopCheckWarch.Stop(); il1_outstopCheckWarch.Stop();
...@@ -389,14 +390,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -389,14 +390,14 @@ namespace OnlineStore.DeviceLibrary
//出口信号需要持续1秒钟 //出口信号需要持续1秒钟
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && span1.TotalSeconds > 60) if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && span1.TotalSeconds > 60)
{ {
if (LastL2OutShelfId.Equals("000").Equals(false)) if (LastL2OutShelfId.StartsWith("0").Equals(false))
{ {
if (LineManager.checkWatch(il2_outstopCheckWarch, 1000)) if (LineManager.checkWatch(il2_outstopCheckWarch, 1000))
{ {
il2_lastCallAgvTime = DateTime.Now; il2_lastCallAgvTime = DateTime.Now;
LogUtil.info(" 上料线体出口有料架" + LastL2OutShelfId + ",呼叫agv小车[" + Config.L2_Out_AgvName + "] [NeedLeave] "); LogUtil.info(" 上料线体出口有料架" + LastL2OutShelfId + ",呼叫agv小车[" + Config.L2_Out_AgvName + "] [NeedLeave] ");
AgvClient.NeedLeave(Config.L2_Out_AgvName, LastL2OutShelfId); AgvClient.NeedLeave(Config.L2_Out_AgvName, LastL2OutShelfId,ClientShelf.Full);
} }
} }
} }
...@@ -417,17 +418,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -417,17 +418,17 @@ namespace OnlineStore.DeviceLibrary
{ {
AgvClient.NeedEnter(Config.L2_In_AgvName, ""); AgvClient.NeedEnter(Config.L2_In_AgvName, "");
} }
else if(IOManager.IOValue(IO_Type.L2_InCheck).Equals(IO_VALUE.HIGH) && AgvClient.GetAction(Config.L2_In_AgvName).Equals(ClientAction.NeedEnter)) else if (IOManager.IOValue(IO_Type.L2_InCheck).Equals(IO_VALUE.HIGH) && AgvClient.GetAction(Config.L2_In_AgvName).Equals(ClientAction.NeedEnter))
{ {
AgvClient.SetToNone(Config.L2_In_AgvName, ""); AgvClient.SetToNone(Config.L2_In_AgvName, "");
} }
//如果是出口无料架,NeedLeave状态,改为None //如果是出口无料架,NeedLeave状态,改为None
if ((IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW) || LastL2OutShelfId.Equals("000")) && if ((IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW) || LastL2OutShelfId.StartsWith("0")) &&
AgvClient.GetAction(Config.L2_Out_AgvName).Equals(ClientAction.NeedLeave)) AgvClient.GetAction(Config.L2_Out_AgvName).Equals(ClientAction.NeedLeave))
{ {
il2_outstopCheckWarch.Stop(); il2_outstopCheckWarch.Stop();
LogUtil.info(" 上料线体出口无料架/rfid未读到,更改[" + Config.L2_Out_AgvName + "] 状态[None] "); LogUtil.info(" 上料线体出口无料架/rfid未读到,更改[" + Config.L2_Out_AgvName + "] 状态[None] ");
AgvClient.SetToNone(Config.L2_Out_AgvName, "" ); AgvClient.SetToNone(Config.L2_Out_AgvName, "");
} }
} }
...@@ -667,11 +668,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -667,11 +668,28 @@ namespace OnlineStore.DeviceLibrary
isInProcess = true; isInProcess = true;
try try
{ {
//LastL1OutShelfId = RFIDManager.ReadRFID(Config.L1_Out_RFIDIP, true).NumStr();
//LastL2OutShelfId = RFIDManager.ReadRFID(Config.L2_Out_RFIDIP, true).NumStr();
//LedProcess(); //LedProcess();
// if (IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.HIGH))
{
LastL1OutShelfId = RFIDManager.ReadRFID(Config.L1_Out_RFIDIP, true).NumStr();
}
//else
//{
// //RFIDManager.ClearRFID(Config.L1_Out_RFIDIP);
//}
// if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH))
{
LastL2OutShelfId = RFIDManager.ReadRFID(Config.L2_Out_RFIDIP, true).NumStr();
}
//else
//{
// //RFIDManager.ClearRFID(Config.L2_Out_RFIDIP);
//}
LastL2OutShelfId = RFIDManager.ReadRFID(Config.L1_Out_RFIDIP,true).NumStr();
LastL1OutShelfId = RFIDManager.ReadRFID(Config.L2_Out_RFIDIP,true).NumStr();
//bool result = SendVmiRfid(LastL2OutShelfId); //bool result = SendVmiRfid(LastL2OutShelfId);
//if (result) //if (result)
//{ //{
...@@ -714,7 +732,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -714,7 +732,7 @@ namespace OnlineStore.DeviceLibrary
{ {
Dictionary<string, string> paramMap = new Dictionary<string, string>(); Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("rfid", rfid); paramMap.Add("rfid", rfid);
string addr = GetAddr(api_communication, paramMap ) ; string addr = GetAddr(api_communication, paramMap);
string resultStr = HttpHelper.Post(addr, ""); string resultStr = HttpHelper.Post(addr, "");
string log = "vmiRfid 【" + addr + "】【" + resultStr + "】"; string log = "vmiRfid 【" + addr + "】【" + resultStr + "】";
if (lastLog.Equals(log).Equals(false)) if (lastLog.Equals(log).Equals(false))
......
...@@ -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!