Commit ae271905 刘韬

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

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