Commit ae271905 刘韬

料箱扫码入库失败后重新扫码

1 个父辈 a37eb025
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeviceLibrary</RootNamespace> <RootNamespace>DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName> <AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration>
\ No newline at end of file \ No newline at end of file
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
...@@ -54,7 +54,7 @@ namespace DeviceLibrary ...@@ -54,7 +54,7 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.In03); MoveInfo.NextMoveStep(MoveStep.In03);
MoveInfo.log("扫码失败重新扫码"); MoveInfo.log("扫码失败重新扫码");
} }
bool isScanError = false; int isScanErrorTimes = 0;
void InProcess() void InProcess()
{ {
if (mainMachine.CheckWait(MoveInfo)) if (mainMachine.CheckWait(MoveInfo))
...@@ -86,6 +86,7 @@ namespace DeviceLibrary ...@@ -86,6 +86,7 @@ namespace DeviceLibrary
Lift.LiftDown(null); Lift.LiftDown(null);
MoveInfo.log("检测到周转箱2,升降台下降,前往中间阻挡"); MoveInfo.log("检测到周转箱2,升降台下降,前往中间阻挡");
IOMove(DO_Agv_Rsp, IO_VALUE.LOW); IOMove(DO_Agv_Rsp, IO_VALUE.LOW);
isScanErrorTimes = 0;
} }
else if (MoveInfo.IsTimeOut(3)) else if (MoveInfo.IsTimeOut(3))
{ {
...@@ -103,7 +104,6 @@ namespace DeviceLibrary ...@@ -103,7 +104,6 @@ namespace DeviceLibrary
Lift.LiftDown(MoveInfo); Lift.LiftDown(MoveInfo);
FrontStop(MoveInfo, IO_VALUE.HIGH); FrontStop(MoveInfo, IO_VALUE.HIGH);
ScanCode(100); ScanCode(100);
isScanError = false;
MoveInfo.log("开始扫码,入口阻挡上升, 线体停止"); MoveInfo.log("开始扫码,入口阻挡上升, 线体停止");
} }
else if (MoveInfo.IsTimeOut(10)) else if (MoveInfo.IsTimeOut(10))
...@@ -227,9 +227,15 @@ namespace DeviceLibrary ...@@ -227,9 +227,15 @@ namespace DeviceLibrary
Msg.add("等待服务器返回库位", MsgLevel.info); Msg.add("等待服务器返回库位", MsgLevel.info);
else if (MoveInfo.IsTimeOut(15)) else if (MoveInfo.IsTimeOut(15))
{ {
isScanError = true; isScanErrorTimes++;
if (isScanErrorTimes < 3) {
MoveInfo.NextMoveStep(MoveStep.In03);
}
else
{
MoveInfo.NextMoveStep(MoveStep.InNG1); MoveInfo.NextMoveStep(MoveStep.InNG1);
Lift.LiftDown(MoveInfo); Lift.LiftDown(MoveInfo);
}
MoveInfo.log($"等待服务器返回库位超时"); MoveInfo.log($"等待服务器返回库位超时");
} }
break; break;
...@@ -275,10 +281,10 @@ namespace DeviceLibrary ...@@ -275,10 +281,10 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.InNG3); MoveInfo.NextMoveStep(MoveStep.InNG3);
Line.LineStop("work"); Line.LineStop("work");
MoveInfo.log($"料箱抵达出口"); MoveInfo.log($"料箱抵达出口");
if (isScanError) if (isScanErrorTimes>2)
Msg.add("入库周转箱扫码失败,请确认料箱方向后重试", MsgLevel.alarm); Msg.add("入库周转箱扫码失败,请确认料箱方向后重试", MsgLevel.critical);
else else
Msg.add("入库周转箱超重,已退出,请处理", MsgLevel.alarm); Msg.add("入库周转箱超重,已退出,请处理", MsgLevel.critical);
RobotManage.UserPause("入库周转箱超重,退出线体"); RobotManage.UserPause("入库周转箱超重,退出线体");
break; break;
case MoveStep.InNG3: case MoveStep.InNG3:
......
<?xml version="1.0" encoding="utf-8"?> <?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"/>
</configSections> </configSections>
<appSettings> <appSettings>
<!--是否开机自动启动料仓--> <!--是否开机自动启动料仓-->
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="1"/>
<add key="CameraName" value="GigE:acA3800-10gc (23124327)#" /> <add key="CameraName" value="GigE:acA3800-10gc (23124327)#"/>
<add key="Config_Pwd" value="123456" /> <add key="Config_Pwd" value="123456"/>
<add key="CodeType" value="QR Code#Data Matrix ECC 200#barcode" /> <add key="CodeType" value="QR Code#Data Matrix ECC 200#barcode"/>
<!--二维码参数文件所在路径,文件名与二维码类型名一样--> <!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="Conifg\" /> <add key="CodeParamPath" value="Conifg\"/>
<add key="CodeCount" value="3" /> <add key="CodeCount" value="3"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/AutoScanAndLabel.log" /> <file value="logs/AutoScanAndLabel.log"/>
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8"/>
<appendToFile value="true" /> <appendToFile value="true"/>
<rollingStyle value="Date" /> <rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd" /> <datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout> </layout>
</appender> </appender>
<appender name="HCBOARD" type="log4net.Appender.RollingFileAppender"> <appender name="HCBOARD" type="log4net.Appender.RollingFileAppender">
<file value="logs/HCBOARD.log" /> <file value="logs/HCBOARD.log"/>
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8"/>
<appendToFile value="true" /> <appendToFile value="true"/>
<rollingStyle value="Date" /> <rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd" /> <datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout> </layout>
</appender> </appender>
<logger name="RollingLogFileAppender"> <logger name="RollingLogFileAppender">
<level value="ALL" /> <level value="ALL"/>
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender"/>
</logger> </logger>
<logger name="HCBOARD" additivity="false"> <logger name="HCBOARD" additivity="false">
<level value="ALL" /> <level value="ALL"/>
<appender-ref ref="HCBOARD" /> <appender-ref ref="HCBOARD"/>
</logger> </logger>
<!--<root> <!--<root>
<level value="Info" /> <level value="Info" />
...@@ -48,13 +48,13 @@ ...@@ -48,13 +48,13 @@
</root>--> </root>-->
</log4net> </log4net>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup> </startup>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
......
...@@ -19,7 +19,7 @@ namespace TheMachine.Properties { ...@@ -19,7 +19,7 @@ namespace TheMachine.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。 // (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
......
...@@ -12,7 +12,7 @@ namespace TheMachine.Properties { ...@@ -12,7 +12,7 @@ namespace TheMachine.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace> <RootNamespace>TheMachine</RootNamespace>
<AssemblyName>XLC_Store</AssemblyName> <AssemblyName>XLC_Store</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic> <Deterministic>false</Deterministic>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!