Commit 22bccea6 张东亮

基本框架ok

1 个父辈 018e48e6
正在显示 128 个修改的文件 包含 821 行增加2700 行删除
...@@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadCSVLibrary", "source\Lo ...@@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadCSVLibrary", "source\Lo
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarriageClient", "source\CarriageClient\CarriageClient.csproj", "{0D2542F5-DD62-4352-82D0-383D9A045E74}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarriageClient", "source\CarriageClient\CarriageClient.csproj", "{0D2542F5-DD62-4352-82D0-383D9A045E74}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JAKA", "..\..\..\..\Projects\CSharp-Workspace\Dolen\JAKA\JAKA.csproj", "{B702AB04-BB76-491F-812A-603298D08FBF}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -33,6 +35,10 @@ Global ...@@ -33,6 +35,10 @@ Global
{0D2542F5-DD62-4352-82D0-383D9A045E74}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D2542F5-DD62-4352-82D0-383D9A045E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D2542F5-DD62-4352-82D0-383D9A045E74}.Release|Any CPU.ActiveCfg = Release|Any CPU {0D2542F5-DD62-4352-82D0-383D9A045E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D2542F5-DD62-4352-82D0-383D9A045E74}.Release|Any CPU.Build.0 = Release|Any CPU {0D2542F5-DD62-4352-82D0-383D9A045E74}.Release|Any CPU.Build.0 = Release|Any CPU
{B702AB04-BB76-491F-812A-603298D08FBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B702AB04-BB76-491F-812A-603298D08FBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B702AB04-BB76-491F-812A-603298D08FBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B702AB04-BB76-491F-812A-603298D08FBF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
此文件类型无法预览
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6"/>
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
<remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
</system.data>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.CarriageClient</RootNamespace> <RootNamespace>OnlineStore.CarriageClient</RootNamespace>
<AssemblyName>CarriageClient</AssemblyName> <AssemblyName>CarriageClient</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
...@@ -61,14 +61,15 @@ ...@@ -61,14 +61,15 @@
<Reference Include="CodeLibrary"> <Reference Include="CodeLibrary">
<HintPath>..\..\dll\CodeLibrary.dll</HintPath> <HintPath>..\..\dll\CodeLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dolen, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Reference Include="halcondotnet"> <Reference Include="halcondotnet">
<HintPath>..\..\dll\halcondotnet.dll</HintPath> <HintPath>..\..\dll\halcondotnet.dll</HintPath>
</Reference> </Reference>
<Reference Include="HuichuanLibrary"> <Reference Include="HuichuanLibrary">
<HintPath>..\..\dll\HuichuanDLL\HuichuanLibrary.dll</HintPath> <HintPath>..\..\dll\HuichuanDLL\HuichuanLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath> <HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="MvCameraControl.Net"> <Reference Include="MvCameraControl.Net">
<HintPath>..\..\dll\MvCameraControl.Net.dll</HintPath> <HintPath>..\..\dll\MvCameraControl.Net.dll</HintPath>
...@@ -91,41 +92,11 @@ ...@@ -91,41 +92,11 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="boxForm\FrmAutoFindPos.cs"> <Compile Include="inoutForm\FrmOutletEquip.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="boxForm\FrmAutoFindPos.Designer.cs"> <Compile Include="inoutForm\FrmOutletEquip.Designer.cs">
<DependentUpon>FrmAutoFindPos.cs</DependentUpon> <DependentUpon>FrmOutletEquip.cs</DependentUpon>
</Compile>
<Compile Include="boxForm\FrmAxisMove.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="boxForm\FrmAxisMove.Designer.cs">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</Compile>
<Compile Include="boxForm\FrmPosDebug.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="boxForm\FrmPosDebug.Designer.cs">
<DependentUpon>FrmPosDebug.cs</DependentUpon>
</Compile>
<Compile Include="boxForm\FrmPosResult.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="boxForm\FrmPosResult.Designer.cs">
<DependentUpon>FrmPosResult.cs</DependentUpon>
</Compile>
<Compile Include="boxForm\FrmTongsLearn.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="boxForm\FrmTongsLearn.Designer.cs">
<DependentUpon>FrmTongsLearn.cs</DependentUpon>
</Compile>
<Compile Include="boxForm\userControl\UCStatusPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="boxForm\userControl\UCStatusPanel.Designer.cs">
<DependentUpon>UCStatusPanel.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmBase.cs"> <Compile Include="FrmBase.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -139,29 +110,23 @@ ...@@ -139,29 +110,23 @@
<Compile Include="FrmCrispTray.Designer.cs"> <Compile Include="FrmCrispTray.Designer.cs">
<DependentUpon>FrmCrispTray.cs</DependentUpon> <DependentUpon>FrmCrispTray.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="inputForm\FrmBatchMove.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="inputForm\FrmBatchMove.Designer.cs">
<DependentUpon>FrmBatchMove.cs</DependentUpon>
</Compile>
<Compile Include="useControl\AxisMoveControl.cs"> <Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="useControl\AxisMoveControl.Designer.cs"> <Compile Include="useControl\AxisMoveControl.Designer.cs">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="inputForm\FrmInputEquip.cs"> <Compile Include="inoutForm\FrmInletEquip.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="inputForm\FrmInputEquip.Designer.cs"> <Compile Include="inoutForm\FrmInletEquip.Designer.cs">
<DependentUpon>FrmInputEquip.cs</DependentUpon> <DependentUpon>FrmInletEquip.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="boxForm\FrmBoxEquip.cs"> <Compile Include="robotForm\FrmRobotEquip.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="boxForm\FrmBoxEquip.Designer.cs"> <Compile Include="robotForm\FrmRobotEquip.Designer.cs">
<DependentUpon>FrmBoxEquip.cs</DependentUpon> <DependentUpon>FrmRobotEquip.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmAbout.cs"> <Compile Include="FrmAbout.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -169,11 +134,11 @@ ...@@ -169,11 +134,11 @@
<Compile Include="FrmAbout.Designer.cs"> <Compile Include="FrmAbout.Designer.cs">
<DependentUpon>FrmAbout.cs</DependentUpon> <DependentUpon>FrmAbout.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmXLRStore.cs"> <Compile Include="FrmClient.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="FrmXLRStore.Designer.cs"> <Compile Include="FrmClient.Designer.cs">
<DependentUpon>FrmXLRStore.cs</DependentUpon> <DependentUpon>FrmClient.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmPwd.cs"> <Compile Include="FrmPwd.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
...@@ -214,23 +179,8 @@ ...@@ -214,23 +179,8 @@
<Compile Include="useControl\EquipControl.Designer.cs"> <Compile Include="useControl\EquipControl.Designer.cs">
<DependentUpon>EquipControl.cs</DependentUpon> <DependentUpon>EquipControl.cs</DependentUpon>
</Compile> </Compile>
<EmbeddedResource Include="boxForm\FrmAutoFindPos.resx"> <EmbeddedResource Include="inoutForm\FrmOutletEquip.resx">
<DependentUpon>FrmAutoFindPos.cs</DependentUpon> <DependentUpon>FrmOutletEquip.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\FrmAxisMove.resx">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\FrmPosDebug.resx">
<DependentUpon>FrmPosDebug.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\FrmPosResult.resx">
<DependentUpon>FrmPosResult.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\FrmTongsLearn.resx">
<DependentUpon>FrmTongsLearn.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="boxForm\userControl\UCStatusPanel.resx">
<DependentUpon>UCStatusPanel.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmBase.resx"> <EmbeddedResource Include="FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon> <DependentUpon>FrmBase.cs</DependentUpon>
...@@ -238,23 +188,20 @@ ...@@ -238,23 +188,20 @@
<EmbeddedResource Include="FrmCrispTray.resx"> <EmbeddedResource Include="FrmCrispTray.resx">
<DependentUpon>FrmCrispTray.cs</DependentUpon> <DependentUpon>FrmCrispTray.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="inputForm\FrmBatchMove.resx">
<DependentUpon>FrmBatchMove.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\AxisMoveControl.resx"> <EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="inputForm\FrmInputEquip.resx"> <EmbeddedResource Include="inoutForm\FrmInletEquip.resx">
<DependentUpon>FrmInputEquip.cs</DependentUpon> <DependentUpon>FrmInletEquip.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="boxForm\FrmBoxEquip.resx"> <EmbeddedResource Include="robotForm\FrmRobotEquip.resx">
<DependentUpon>FrmBoxEquip.cs</DependentUpon> <DependentUpon>FrmRobotEquip.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmAbout.resx"> <EmbeddedResource Include="FrmAbout.resx">
<DependentUpon>FrmAbout.cs</DependentUpon> <DependentUpon>FrmAbout.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmXLRStore.resx"> <EmbeddedResource Include="FrmClient.resx">
<DependentUpon>FrmXLRStore.cs</DependentUpon> <DependentUpon>FrmClient.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmPwd.resx"> <EmbeddedResource Include="FrmPwd.resx">
<DependentUpon>FrmPwd.cs</DependentUpon> <DependentUpon>FrmPwd.cs</DependentUpon>
...@@ -313,6 +260,10 @@ ...@@ -313,6 +260,10 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\..\Projects\CSharp-Workspace\Dolen\JAKA\JAKA.csproj">
<Project>{B702AB04-BB76-491F-812A-603298D08FBF}</Project>
<Name>JAKA</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj"> <ProjectReference Include="..\Common\Common.csproj">
<Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project> <Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project>
<Name>Common</Name> <Name>Common</Name>
......
...@@ -103,7 +103,7 @@ namespace OnlineStore.XLRStore ...@@ -103,7 +103,7 @@ namespace OnlineStore.XLRStore
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
ManagerUtil.Init(); ManagerUtil.Init();
Application.Run(new FrmXLRStore()); Application.Run(new FrmClient());
} }
} }
......
<?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="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file \ 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="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file \ No newline at end of file
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.XLRStore
{
public partial class FrmPosDebug : Form
{
public FrmPosDebug()
{
CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
boxEquip = StoreManager.XLRStore.boxEquip;
}
BoxEquip boxEquip;
private void btnStart_Click(object sender, EventArgs e)
{
if(MessageBox.Show("是否开始库位调试?","提示",MessageBoxButtons.YesNo).Equals(DialogResult.Yes))
{
boxEquip.posDebugInfo.IsBreak = false;
int startDrawerRow = int.Parse(txtStartDrawerRow.Text);
int startDrawerCol = int.Parse(txtStartDrawerCol.Text);
int endDrawerRow = int.Parse(txtEndDrawerRow.Text);
int endDrawerCol = int.Parse(txtEndDrawerCol.Text);
int startRowInDrawer = int.Parse(txtStartRowInDrawer.Text);
int startColInDrawer = int.Parse(txtStartColInDrawer.Text);
int endRowInDrawer = int.Parse(txtEndRowInDrawer.Text);
int endColInDrawer = int.Parse(txtEndColInDrawer.Text);
boxEquip.posDebugInfo.SetDrawerParam(startDrawerRow,startDrawerCol,endDrawerRow,endDrawerCol);
boxEquip.posDebugInfo.SetGridParam(startRowInDrawer,startColInDrawer,endRowInDrawer,endColInDrawer);
InOutParam inOutParam = new InOutParam(new InOutPosInfo("PosDebug", $"{boxEquip.posDebugInfo.CurGrid}"));
//boxEquip.Test();
boxEquip.StartPosDebug(inOutParam);
}
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if(radioButton1.Checked)
{
boxEquip.posDebugInfo.PosSide = "AA";
}
if(radioButton2.Checked)
boxEquip.posDebugInfo.PosSide = "BB";
}
private void btnStop_Click(object sender, EventArgs e)
{
if (MessageBox.Show("确认停止库位调试?", "提示", MessageBoxButtons.OKCancel).Equals(DialogResult.OK))
boxEquip.posDebugInfo.IsBreak = true;
}
FrmPosResult frmPosResult = null;
private void btnPosResult_Click(object sender, EventArgs e)
{
if(frmPosResult ==null)
{
frmPosResult = new FrmPosResult();
frmPosResult.Show();
}
else
{
if(frmPosResult.IsDisposed)
{
frmPosResult = new FrmPosResult();
frmPosResult.Show();
}
else
{
frmPosResult.Activate();
}
}
}
}
}
<?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>
</root>
\ No newline at end of file \ No newline at end of file

namespace OnlineStore.XLRStore
{
partial class FrmPosResult
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tlpPos = new System.Windows.Forms.TableLayoutPanel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tlpDrawerA = new System.Windows.Forms.TableLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tlpDrawerB = new System.Windows.Forms.TableLayoutPanel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tableLayoutPanel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 57.86853F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 42.13147F));
this.tableLayoutPanel1.Controls.Add(this.groupBox2, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1004, 689);
this.tableLayoutPanel1.TabIndex = 0;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.tlpPos);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Location = new System.Drawing.Point(584, 3);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(417, 683);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "库位结果";
//
// tlpPos
//
this.tlpPos.ColumnCount = 1;
this.tlpPos.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpPos.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpPos.Location = new System.Drawing.Point(3, 17);
this.tlpPos.Name = "tlpPos";
this.tlpPos.RowCount = 1;
this.tlpPos.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpPos.Size = new System.Drawing.Size(411, 663);
this.tlpPos.TabIndex = 1;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.tabControl1);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(575, 683);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "抽屉结果";
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(3, 17);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(569, 663);
this.tabControl1.TabIndex = 1;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.tlpDrawerA);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(561, 637);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "A面";
this.tabPage1.UseVisualStyleBackColor = true;
//
// tlpDrawerA
//
this.tlpDrawerA.ColumnCount = 1;
this.tlpDrawerA.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpDrawerA.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpDrawerA.Location = new System.Drawing.Point(3, 3);
this.tlpDrawerA.Name = "tlpDrawerA";
this.tlpDrawerA.RowCount = 1;
this.tlpDrawerA.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpDrawerA.Size = new System.Drawing.Size(555, 631);
this.tlpDrawerA.TabIndex = 0;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.tlpDrawerB);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(561, 669);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "B面";
this.tabPage2.UseVisualStyleBackColor = true;
//
// tlpDrawerB
//
this.tlpDrawerB.ColumnCount = 1;
this.tlpDrawerB.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpDrawerB.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpDrawerB.Location = new System.Drawing.Point(3, 3);
this.tlpDrawerB.Name = "tlpDrawerB";
this.tlpDrawerB.RowCount = 1;
this.tlpDrawerB.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpDrawerB.Size = new System.Drawing.Size(555, 663);
this.tlpDrawerB.TabIndex = 1;
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// FrmPosResult
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1004, 689);
this.Controls.Add(this.tableLayoutPanel1);
this.MaximizeBox = false;
this.Name = "FrmPosResult";
this.Text = "库位结果";
this.tableLayoutPanel1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TableLayoutPanel tlpPos;
private System.Windows.Forms.TableLayoutPanel tlpDrawerA;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TableLayoutPanel tlpDrawerB;
private System.Windows.Forms.Timer timer1;
}
}
\ No newline at end of file \ No newline at end of file
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.XLRStore
{
public partial class FrmPosResult : Form
{
public FrmPosResult()
{
CheckForIllegalCrossThreadCalls = false;
boxEquip = StoreManager.XLRStore.boxEquip;
DrawerResults = PosDebugResultManager.DrawerResults;
InitializeComponent();
LoadDrawerList();
timer1.Enabled = true;
}
List<DrawerResult> DrawerResults;
BoxEquip boxEquip;
protected Dictionary<string, UCStatusPanel> PosControlList = new Dictionary<string, UCStatusPanel>();
protected Dictionary<string, UCStatusPanel> DrawerControlList = new Dictionary<string, UCStatusPanel>();
private void LoadDrawerList()
{
this.tlpDrawerA.RowStyles.Clear();
this.tlpDrawerA.ColumnStyles.Clear();
this.tlpDrawerA.CellBorderStyle = TableLayoutPanelCellBorderStyle.OutsetPartial;
this.tlpDrawerA.RowCount = boxEquip.Config.Drawer_Rows;
this.tlpDrawerA.ColumnCount = boxEquip.Config.Drawer_Columns;
this.tlpDrawerA.Height = 40 * this.tlpDrawerA.RowCount;
this.tlpDrawerA.Width = 90 * this.tlpDrawerA.ColumnCount;
string cid = boxEquip.Config.CID;
selectedDrawer = $"{cid}AA{"01"}{"01"}";
for (int rowindex = 0; rowindex < boxEquip.Config.Drawer_Rows; rowindex++)
{
tlpDrawerA.RowStyles.Add(new RowStyle(SizeType.Absolute, 38));
for (int colindex = 0; colindex < boxEquip.Config.Drawer_Columns; colindex++)
{
tlpDrawerA.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 87));
UCStatusPanel control = new UCStatusPanel();
control.ControlName = $"{cid}AA{(rowindex + 1).ToString("00")}{(colindex + 1).ToString("00")}";
control.Click += Control_Click;
control.Dock = DockStyle.Fill;
this.tlpDrawerA.Controls.Add(control, colindex, rowindex);
DrawerControlList.Add(control.ControlName, control);
}
}
this.tlpDrawerB.RowStyles.Clear();
this.tlpDrawerB.ColumnStyles.Clear();
this.tlpDrawerB.CellBorderStyle = TableLayoutPanelCellBorderStyle.OutsetPartial;
this.tlpDrawerB.RowCount = boxEquip.Config.Drawer_Rows;
this.tlpDrawerB.ColumnCount = boxEquip.Config.Drawer_Columns;
this.tlpDrawerB.Height = 40 * this.tlpDrawerB.RowCount;
this.tlpDrawerB.Width = 90 * this.tlpDrawerB.ColumnCount;
for (int rowindex = 0; rowindex < boxEquip.Config.Drawer_Rows; rowindex++)
{
tlpDrawerB.RowStyles.Add(new RowStyle(SizeType.Absolute, 38));
for (int colindex = 0; colindex < boxEquip.Config.Drawer_Columns; colindex++)
{
tlpDrawerB.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 87));
UCStatusPanel control = new UCStatusPanel();
control.ControlName = $"{cid}BB{(rowindex + 1).ToString("00")}{(colindex + 1).ToString("00")}";
control.Click += Control_Click;
control.Dock = DockStyle.Fill;
this.tlpDrawerB.Controls.Add(control, colindex, rowindex);
DrawerControlList.Add(control.ControlName, control);
}
}
this.tlpPos.RowStyles.Clear();
this.tlpPos.ColumnStyles.Clear();
this.tlpPos.CellBorderStyle = TableLayoutPanelCellBorderStyle.OutsetPartial;
this.tlpPos.AutoScroll = true;
this.tlpPos.RowCount = boxEquip.Config.Cols_In_Drawer;
this.tlpPos.ColumnCount = boxEquip.Config.Rows_In_Drawer;
this.tlpPos.Height = 40 * this.tlpPos.RowCount;
this.tlpPos.Width = 90 * this.tlpPos.ColumnCount;
for (int rowindex = 0; rowindex < boxEquip.Config.Cols_In_Drawer; rowindex++)
{
tlpPos.RowStyles.Add(new RowStyle(SizeType.Absolute, 38));
for (int colindex = 0; colindex < boxEquip.Config.Rows_In_Drawer; colindex++)
{
tlpPos.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 87));
UCStatusPanel control = new UCStatusPanel();
control.ControlName = $"{(colindex + 1).ToString("00")}{(rowindex + 1).ToString("00")}";
control.Dock = DockStyle.Fill;
this.tlpPos.Controls.Add(control, colindex, rowindex);
PosControlList.Add(control.ControlName, control);
}
}
this.SuspendLayout();
}
private void Control_Click(object sender, EventArgs e)
{
UCStatusPanel statusPanel = sender as UCStatusPanel;
if (statusPanel != null)
{
selectedDrawer = statusPanel.ControlName;
UpdateInfosInDrawer(statusPanel.ControlName);
}
}
public string selectedDrawer = "";
private void UpdateInfosInDrawer(string drawername)
{
groupBox2.Text = $"{drawername}库位结果";
foreach (var item in PosControlList.Values)
{
StringBuilder sb = new StringBuilder();
sb.Append(drawername);
sb.Append(item.ControlName);
item.ResultCode = PosDebugResultManager.GetGridResult(sb.ToString());
item.ShowResult();
}
}
private void UpdateDrawerInfos()
{
foreach (var item in DrawerControlList.Values)
{
item.ResultCode = PosDebugResultManager.GetDrawerResult(item.ControlName);
item.ShowResult();
}
}
bool inUpdate = false;
private void timer1_Tick(object sender, EventArgs e)
{
if (inUpdate)
return;
inUpdate = true;
UpdateDrawerInfos();
if (!selectedDrawer.Equals(""))
UpdateInfosInDrawer(selectedDrawer);
inUpdate = false;
}
}
}
<?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="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file \ No newline at end of file
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.XLRStore
{
public partial class FrmTongsLearn : Form
{
public FrmTongsLearn()
{
InitializeComponent();
boxEquip = StoreManager.XLRStore.boxEquip;
txtScoreThreshold.Text = boxEquip.Config.TongsDetectThreshold.ToString();
}
Bitmap srcBitmap = null;
BoxEquip boxEquip;
string camName = "box_A";
private void btnSelect_Click(object sender, EventArgs e)
{
OpenFileDialog fileDialog = new OpenFileDialog();
fileDialog.InitialDirectory = Application.StartupPath+Common.ConfigAppSettings.GetValue(Common.Setting_Init.ImagePath);
fileDialog.Filter = "图片|*.bmp";
fileDialog.RestoreDirectory = true;
if(fileDialog.ShowDialog()==DialogResult.OK)
{
txtImagePath.Text = System.IO.Path.GetFullPath(fileDialog.FileName);
srcBitmap = new Bitmap(txtImagePath.Text);
picSrc.Image = srcBitmap;
}
}
private void btnAcquire_Click(object sender, EventArgs e)
{
srcBitmap = boxEquip.AcqImage(camName);
boxEquip.SaveImage(camName);
picSrc.Image = srcBitmap;
}
private void SideCheckedChanged(object sender, EventArgs e)
{
if(rdoAside.Checked)
{
camName = "box_A";
}
else if(rdoBside.Checked)
{
camName = "box_B";
}
}
private void btnSave_Click(object sender, EventArgs e)
{
boxEquip.Config.TongsDetectThreshold = float.Parse(txtScoreThreshold.Text);
StoreManager.SaveBoxConfig(boxEquip.Config);
}
private void btnMatch_Click(object sender, EventArgs e)
{
if(srcBitmap !=null)
{
float score= boxEquip.match(srcBitmap, out string pn, out Bitmap bitmap);
picResult.Image = bitmap;
updateResult(score);
}
}
private void updateResult(float score)
{
lblResult.Text = score.ToString("f2");
if (score<boxEquip.Config.TongsDetectThreshold)
{
lblResult.BackColor = Color.Red;
}
else
{
lblResult.BackColor = Color.GreenYellow;
}
}
private void btnLearn_Click(object sender, EventArgs e)
{
if (srcBitmap != null)
boxEquip.learn(srcBitmap, Guid.NewGuid().ToString());
}
private void btnSelectPatch_Click(object sender, EventArgs e)
{
FolderBrowserDialog folderDialog = new FolderBrowserDialog();
folderDialog.Description = "请选择需要训练图像的路径";
if (folderDialog.ShowDialog() == DialogResult.OK)
{
txtImagePath.Text = folderDialog.SelectedPath+@"\";
string[] files = System.IO.Directory.GetFiles(txtImagePath.Text);
lblResult.Text = "开始学习...";
System.Threading.Tasks.Task task = System.Threading.Tasks.Task.Factory.StartNew(delegate {
foreach (var item in files)
{
boxEquip.learn(item, Guid.NewGuid().ToString());
}
});
task.Wait();
lblResult.Text = "学习完成";
lblResult.BackColor = Color.AliceBlue;
}
}
}
}
<?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>
</root>
\ No newline at end of file \ No newline at end of file

namespace OnlineStore.XLRStore
{
partial class UCStatusPanel
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lblStatus = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblStatus
//
this.lblStatus.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblStatus.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStatus.Location = new System.Drawing.Point(0, 0);
this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(87, 38);
this.lblStatus.TabIndex = 0;
this.lblStatus.Text = "05BB0101";
this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click);
//
// UCStatusPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.Controls.Add(this.lblStatus);
this.Name = "UCStatusPanel";
this.Size = new System.Drawing.Size(87, 38);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblStatus;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.XLRStore
{
public partial class UCStatusPanel : UserControl
{
public UCStatusPanel()
{
InitializeComponent();
}
private string ctlName = "";
public string ControlName { get { return ctlName; } set { ctlName = value;lblStatus.Text = value; } }
public int ResultCode { get; set; }
public void ShowResult()
{
switch(ResultCode)
{
case -1:
this.BackColor = Color.FromArgb(255, 255, 192);
break;
case 0:
this.BackColor = Color.Red;
break;
case 1:
this.BackColor = Color.GreenYellow;
break;
}
}
private void lblStatus_Click(object sender, EventArgs e)
{
this.OnClick(e);
}
}
}
<?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>
</root>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.12" targetFramework="net461" /> <package id="log4net" version="2.0.14" targetFramework="net48" />
</packages> </packages>
\ No newline at end of file \ No newline at end of file
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
<value>17, 11</value> <value>17, 11</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>97</value> <value>25</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
......
...@@ -61,7 +61,39 @@ namespace OnlineStore.XLRStore ...@@ -61,7 +61,39 @@ namespace OnlineStore.XLRStore
lblSingle.Text = "检测有料"; lblSingle.Text = "检测有料";
lblSingle.BackColor = Color.LimeGreen; lblSingle.BackColor = Color.LimeGreen;
} }
} }
public void ShowData(string text, List<InOutPosInfo> posInfos, IO_VALUE value)
{
lblText.Text = text;
if (posInfos == null || posInfos.Count<1)
{
lblReelInfo.Text = "";
this.BackColor = Color.White;
linkClear.Visible = false;
}
else
{
StringBuilder sb = new StringBuilder();
foreach (InOutPosInfo item in posInfos)
{
sb.Append($"{item.CreateTime};\r\n");
}
lblReelInfo.Text = sb.ToString();
this.BackColor = Color.LimeGreen;
linkClear.Visible = true;
}
if (value.Equals(IO_VALUE.LOW))
{
lblSingle.Visible = false;
lblSingle.Text = "";
}
else
{
lblSingle.Visible = true;
lblSingle.Text = "检测有料";
lblSingle.BackColor = Color.LimeGreen;
}
}
public ReelDataControl() public ReelDataControl()
{ {
InitializeComponent(); InitializeComponent();
......
...@@ -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.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\packages\log4net.2.0.12\lib\net40\log4net.dll</HintPath> <HintPath>..\..\packages\log4net.2.0.14\lib\net45\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>
......
...@@ -28,13 +28,7 @@ namespace OnlineStore.Common ...@@ -28,13 +28,7 @@ namespace OnlineStore.Common
public static string ImagePath = "ImagePath"; public static string ImagePath = "ImagePath";
public static string ConfigPath_XLRStore = "ConfigPath_XLRStore"; public static string ConfigPath_Client = "ConfigPath_Client";
public static string ConfigPath_Input = "ConfigPath_Input";
public static string ConfigPath_Box = "ConfigPath_Box";
public static string ConfigPath_BoxPosition = "ConfigPath_BoxPosition";
public static string ConfigPath_DrawerPosition = "ConfigPath_DrawerPosition";
public static string CloseCamDetect = "CloseCamDetect";
public static string ConfigPath_PosDebugInfo = "ConfigPath_PosDebugInfo";
/// <summary> /// <summary>
/// 需要识别的二维码类型,多个中间使用#分割 /// 需要识别的二维码类型,多个中间使用#分割
/// </summary> /// </summary>
...@@ -107,16 +101,15 @@ namespace OnlineStore.Common ...@@ -107,16 +101,15 @@ namespace OnlineStore.Common
public static string AutoInput = "AutoInput"; public static string AutoInput = "AutoInput";
public static string AInStoreInfo = "AInStoreInfo"; public static string TrayInRobotInfo = "TrayInRobotInfo";
public static string AOutStoreInfo = "AOutStoreInfo"; public static string TrayInOutletInfo = "TrayInOutletInfo";
public static string BInStoreInfo = "BInStoreInfo"; public static string TraysInNGBoxInfo = "TraysInNGBoxInfo";
public static string BOutStoreInfo = "BOutStoreInfo";
public static string AShelfInfo = "AShelfInfo";
public static string BShelfInfo = "BShelfInfo";
/// <summary> /// <summary>
/// 禁用光栅 /// 禁用光栅
/// </summary> /// </summary>
public static string DisSecurityAccess = "DisSecurityAccess"; public static string DisSecurityAccess = "DisSecurityAccess";
public static string ValidityPeriod = "ValidityPeriod";
public static string ValidityCnt = "ValidityCnt";
} }
} }
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.12" targetFramework="net40" requireReinstallation="true" /> <package id="log4net" version="2.0.14" targetFramework="net48" />
</packages> </packages>
\ No newline at end of file \ No newline at end of file
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,行走机构,MoveAxis,0,HC,,35000,1000000,350000,5000,30000,50000,10,100,0,0
AXIS,0,压紧轴,CompressAxis,0,HC,,35000,1000000,350000,5000,30000,50000,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,当多久没操作时流水线休眠(秒),Sleep_MSeconds,600,,,,,,,,,,,,,,
PRO,0,气压检测信号关闭需要持续的时间,Airpressure_CheckSeconds,600,,,,,,,,,,,,,,
PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,,,,,,,,,,
PRO,0,机器人IP,Robot_IP,192.168.102.21,,,,,,,,,,,,,,
PRO,0,料盘高度转换系数,Coeff_Height,0.5,,,,,,,,,,,,,,
PRO,0,料盘宽度转换系数,Coeff_Width,0.5,,,,,,,,,,,,,,
PRO,0,扫码的相机名称(多个用#分隔),ScanCodeCamera,GigE:MV-CE200-10GC (00E70964538),,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,行走机构_待机点,MoveAxis_P1,0,,,,,,,,,,,,
PRO,0,行走机构_入料口,MoveAxis_P2_Inlet,0,,,,,,,,,,,,
PRO,0,行走机构_出料口,MoveAxis_P3_Outlet,0,,,,,,,,,,,,
PRO,0,行走机构_NG口,MoveAxis_P4_NGBox,0,,,,,,,,,,,,
PRO,0,行走机构_料仓1门口,MoveAxis_P5_Store1,0,,,,,,,,,,,,
PRO,0,行走机构_料仓2门口,MoveAxis_P6_Store2,0,,,,,,,,,,,,
PRO,0,行走机构_料仓3门口,MoveAxis_P7_Store3,0,,,,,,,,,,,,
PRO,0,行走机构_料仓4门口,MoveAxis_P8_Store4,0,,,,,,,,,,,,
PRO,0,行走机构_料仓5门口,MoveAxis_P9_Store5,0,,,,,,,,,,,,
PRO,0,行走机构_料仓6门口,MoveAxis_P10_Store6,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,压紧轴_待机点,CompressAxis_P1,0,,,,,,,,,,,,
PRO,0,压紧轴_张开点,CompressAxis_P2,0,,,,,,,,,,,,
PRO,0,压紧轴_压紧前点,CompressAxis_P3,0,,,,,,,,,,,,
PRO,0,压紧轴_压紧点,CompressAxis_P4,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,行走机构_待机点速度,MoveAxis_P1_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_入料口速度,MoveAxis_P2_Inlet_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_出料口速度,MoveAxis_P3_Outlet_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_NG口速度,MoveAxis_P4_NGBox_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_料仓1门口速度,MoveAxis_P5_Store1_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_料仓2门口速度,MoveAxis_P6_Store2_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_料仓3门口速度,MoveAxis_P7_Store3_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_料仓4门口速度,MoveAxis_P8_Store4_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_料仓5门口速度,MoveAxis_P9_Store5_Speed,0,,,,,,,,,,,,
PRO,0,行走机构_料仓6门口速度,MoveAxis_P10_Store6_Speed,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,压紧轴_待机点速度,CompressAxis_P1_Speed,0,,,,,,,,,,,,
PRO,0,压紧轴_张开点速度,CompressAxis_P2_Speed,0,,,,,,,,,,,,
PRO,0,压紧轴_压紧前点速度,CompressAxis_P3_Speed,0,,,,,,,,,,,,
PRO,0,压紧轴_压紧点速度,CompressAxis_P4_Speed,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,急停,SuddenStop_BTN,0,HC,X00,,,,,,,,,,,,
DI,0,安全门禁,SecurityAccessSig,1,HC,X01,,,,,,,,,,,,
DI,0,气压检测,Airpressure_Check,2,HC,X02,,,,,,,,,,,,
DI,0,自动模式按钮,AutoMode_BTN,3,HC,X03,,,,,,,,,,,,
DI,0,复位,Reset_BTN,4,HC,X04,,,,,,,,,,,,
DI,1,入料线体料盘检测,Inlet_TrayCheck,5,HC,X05,,,,,,,,,,,,
DI,1,7寸料盘顶升上升端,Inlet_7InchJackUpSig,6,HC,X06,,,,,,,,,,,,
DI,1,7寸料盘顶升下降端,Inlet_7InchJackDownSig,7,HC,X07,,,,,,,,,,,,
DI,1,13寸料盘顶升上升端,Inlet_13InchJackUpSig,8,HC,X08,,,,,,,,,,,,
DI,1,13寸料盘顶升下降端,Inlet_13InchJackDownSig,9,HC,X09,,,,,,,,,,,,
DI,3,NG料暂存区料盘检测,NGBox_TrayCheck,10,HC,X10,,,,,,,,,,,,
DI,3,机械臂料盘检测,RobotArm_TrayCheck,11,HC,X11,,,,,,,,,,,,
DI,3,机械臂夹紧检测,RobotArm_ClampingSig,12,HC,X12,,,,,,,,,,,,
DI,2,出料线体顶升上升端,Outlet_JackUpSig,13,HC,X13,,,,,,,,,,,,
DI,2,出料线体顶升下降端,Outlet_JackDownSig,14,HC,X14,,,,,,,,,,,,
DI,2,出料线体料盘检测1,Outlet_TrayCheck1,15,HC,X15,,,,,,,,,,,,
DI,2,出料线体料盘检测2,Outlet_TrayCheck2,16,HC,X16,,,,,,,,,,,,
DI,2,出料线体允许送料,Outlet_AllowFeedSig,17,HC,X17,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,自动绿色指示灯,RunSign_HddLed,0,HC,Y00,,,,,,,,,,,,
DO,0,故障红色指示灯,Alarm_HddLed,1,HC,Y01,,,,,,,,,,,,
DO,0,待机黄色指示灯,AutoRun_HddLed,2,HC,Y02,,,,,,,,,,,,
DO,0,报警蜂鸣器,Alarm_Buzzer,3,HC,Y03,,,,,,,,,,,,
DO,1,入料线体皮带运转,Inlet_Run,4,HC,Y04,,,,,,,,,,,,
DO,2,出料线体皮带运转,Outlet_Run,5,HC,Y05,,,,,,,,,,,,
DO,1,7寸料盘顶升上升,Inlet_7InchJackUp,6,HC,Y06,,,,,,,,,,,,
DO,1,7寸料盘顶升下降,Inlet_7InchJackDown,7,HC,Y07,,,,,,,,,,,,
DO,1,13寸料盘顶升上升,Inlet_13InchJackUp,8,HC,Y08,,,,,,,,,,,,
DO,1,13寸料盘顶升下降,Inlet_13InchJackDown,9,HC,Y09,,,,,,,,,,,,
DO,2,出料线体顶升上升,Outlet_JackUp,10,HC,Y10,,,,,,,,,,,,
DO,2,出料线体顶升下降,Outlet_JackDown,11,HC,Y11,,,,,,,,,,,,
DO,1,入料线体送料允许,Inlet_AllowFeed,12,HC,Y12,,,,,,,,,,,,
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,A料口提升轴,BatchAxis_A,10,HC,,30000,80000,80000,2000,10000,30000,10,100,0,0
AXIS,0,B料口提升轴,BatchAxis_B,11,HC,,30000,80000,80000,2000,10000,30000,10,100,0,0
AXIS,0,取料升降轴,TakeAxis_Updown,12,HC,,30000,150000,100000,800,10000,30000,10,200,0,0
AXIS,0,取料旋转轴,TakeAxis_Middle,13,HC,,20000,250000,150000,2000,8000,20000,10,200,0,0
,,,,,,,,,,,,,,,,
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,,,,,,,,
PRO,0,是否使用夹爪(1=使用夹爪,0=用吸盘),UseClampJaw,1,,,,,,,,,,,,
PRO,0,A侧扫码的相机名称(多个用#分隔),CameraNameList_A,GigE:MV-CE200-10GC (00E70964538),,,,,,,,,,,,
PRO,0,B侧扫码的相机名称(多个用#分隔),CameraNameList_B,GigE:MV-CE200-10GC (00E78064946),,,,,,,,,,,,
PRO,0,旋转轴到暂存区附近等待时的偏移位置,MiddleOffsetValue,40000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,A侧上料料架-RFID-IP,PRO_RFIP_A,192.168.101.103,,,,,,,,,,,,
PRO,0,B侧上料料架-RFID-IP,PRO_RFIP_B,192.168.101.104,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,AGV小车站号名称_A侧,AgvName_A,T1_1,,,,,,,,,,,,
PRO,0,AGV小车站号名称_B侧,AgvName_B,T1_2,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_A侧,BatchAxisP1_A,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_A侧,BatchAxisP2_A,582239,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,,
PRO,0,提升轴上料目标点_B侧,BatchAxisP2_B,564177,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,提升上料轴P1速度,BatchAxis_P1Speed,30000,,,,,,,,,,,,
PRO,0,提升上料轴P2速度,BatchAxis_P2Speed,5000,,,,,,,,,,,,
PRO,0,提升上料轴P3速度/料盘拿走后提升轴下降速度,BatchAxis_P3Speed,20000,,,,,,,,,,,,
PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,1250,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料升降轴_待机点,Updown_P1,310000,,,,,,,,,,,,
PRO,0,取料升降轴_A料口取料点,Updown_P2_ATake,394000,,,,,,,,,,,,
PRO,0,取料升降轴_B料口取料点,Updown_P3_BTake,405356,,,,,,,,,,,,
PRO,0,取料升降轴_A上暂存区放料高点,Updown_P4_AUpperH,18000,,,,,,,,,,,,
PRO,0,取料升降轴_A上暂存区放料低点,Updown_P5_AUpperL,65798,,,,,,,,,,,,
PRO,0,取料升降轴_A下暂存区取料高点,Updown_P6_AUnderH,310000,,,,,,,,,,,,
PRO,0,取料升降轴_A下暂存区取料低点,Updown_P7_AUnderL,368000,,,,,,,,,,,,
PRO,0,取料升降轴_NG料区放料高点,Updown_P8_NGH,310000,,,,,,,,,,,,
PRO,0,取料升降轴_NG料区放料低点,Updown_P9_NGL,310000,,,,,,,,,,,,
PRO,0,取料升降轴_B上暂存区放料高点,Updown_P10_BUpperH,18000,,,,,,,,,,,,
PRO,0,取料升降轴_B上暂存区放料低点,Updown_P11_BUpperL,65798,,,,,,,,,,,,
PRO,0,取料升降轴_B下暂存区取料高点,Updown_P12_BUnderH,310000,,,,,,,,,,,,
PRO,0,取料升降轴_B下暂存区取料低点,Updown_P13_BUnderL,370000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料升降轴_P1速度,Updown_P1_Speed,45000,,,,,,,,,,,,
PRO,1,取料升降轴_P2速度,Updown_P2_Speed,45000,,,,,,,,,,,,
PRO,2,取料升降轴_P3速度,Updown_P3_Speed,45000,,,,,,,,,,,,
PRO,3,取料升降轴_P4速度,Updown_P4_Speed,45000,,,,,,,,,,,,
PRO,4,取料升降轴_P5速度,Updown_P5_Speed,45000,,,,,,,,,,,,
PRO,5,取料升降轴_P6速度,Updown_P6_Speed,45000,,,,,,,,,,,,
PRO,6,取料升降轴_P7速度,Updown_P7_Speed,45000,,,,,,,,,,,,
PRO,7,取料升降轴_P8速度,Updown_P8_Speed,45000,,,,,,,,,,,,
PRO,8,取料升降轴_P9速度,Updown_P9_Speed,45000,,,,,,,,,,,,
PRO,9,取料升降轴_P10速度,Updown_P10_Speed,45000,,,,,,,,,,,,
PRO,10,取料升降轴_P11速度,Updown_P11_Speed,45000,,,,,,,,,,,,
PRO,11,取料升降轴_P12速度,Updown_P12_Speed,45000,,,,,,,,,,,,
PRO,12,取料升降轴_P13速度,Updown_P13_Speed,45000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料旋转轴_待机点,Middle_P1,126912,,,,,,,,,,,,
PRO,0,取料旋转轴_A料口取料点,Middle_P2_ATake,161600,,,,,,,,,,,,
PRO,0,取料旋转轴_B料口取料点,Middle_P3_BTake,90566,,,,,,,,,,,,
PRO,0,取料旋转轴_A上暂存区放料点,Middle_P4_AUpper,250000,,,,,,,,,,,,
PRO,0,取料旋转轴_B上暂存区放料点,Middle_P5_BUpper,107,,,,,,,,,,,,
PRO,0,取料旋转轴_NG料区放料点,Middle_P6_NG,214355,,,,,,,,,,,,
PRO,0,取料旋转轴_A下暂存区取料点,Middle_P7_AUnder,250330,,,,,,,,,,,,
PRO,0,取料旋转轴_B下暂存区取料点,Middle_P8_BUnder,107,,,,,,,,,,,,
PRO,0,取料旋转轴_P1速度,Middle_P1_Speed,100000,,,,,,,,,,,,
PRO,1,取料旋转轴_P2速度,Middle_P2_Speed,100000,,,,,,,,,,,,
PRO,2,取料旋转轴_P3速度,Middle_P3_Speed,100000,,,,,,,,,,,,
PRO,3,取料旋转轴_P4速度,Middle_P4_Speed,100000,,,,,,,,,,,,
PRO,4,取料旋转轴_P5速度,Middle_P5_Speed,100000,,,,,,,,,,,,
PRO,5,取料旋转轴_P6速度,Middle_P6_Speed,100000,,,,,,,,,,,,
PRO,6,取料旋转轴_P7速度,Middle_P7_Speed,100000,,,,,,,,,,,,
PRO,7,取料旋转轴_P8速度,Middle_P8_Speed,100000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,取料旋转轴_反向间隙补偿值,MiddleAxis_Reverse_Offset,300,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,出力,距离,推压速度,脆盘目标速度,脆盘加速度,脆盘减速度,脆盘出力,脆盘距离,脆盘推压速度
CLAW,1,入料机构夹爪,CLAW_Input,0,COM12,,100,500,500,60,6,20,15,15,15,20,20,15
PRO,0,当多久没操作时流水线休眠(秒),Sleep_MSeconds,600,,,,,,,,,,,,,,
PRO,0,气压检测信号关闭需要持续的时间,Airpressure_CheckSeconds,600,,,,,,,,,,,,,,
PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,,,,,,,,,,
,0,IO模块对应的DI数量,IO_DILength,,,,,,,,,,,,,,,
,0,模块对应的DO数量,IO_DOLength,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DI,2,急停(存储机构),SuddenStop_BTN,0,HC,X00,,,,,,,,,,,,
DI,2,复位(存储机构),Reset_BTN,1,HC,X01,,,,,,,,,,,,
DI,2,A面移栽旋转轴水平检测,AHorizontal_Check,2,HC,X02,,,,,,,,,,,,
DI,2,B面移栽旋转轴水平检测,BHorizontal_Check,3,HC,X03,,,,,,,,,,,,
DI,2,A面第1列料屉检测信号,Column_Check_A1,4,HC,X04,,,,,,,,,,,,
DI,2,A面第2列料屉检测信号,Column_Check_A2,5,HC,X05,,,,,,,,,,,,
DI,2,A面第3列料屉检测信号,Column_Check_A3,6,HC,X06,,,,,,,,,,,,
DI,2,A面第4列料屉检测信号,Column_Check_A4,7,HC,X07,,,,,,,,,,,,
DI,2,A面第5列料屉检测信号,Column_Check_A5,8,HC,X08,,,,,,,,,,,,
DI,2,A面第6列料屉检测信号,Column_Check_A6,9,HC,X09,,,,,,,,,,,,
DI,2,B面第1列料屉检测信号,Column_Check_B1,10,HC,X10,,,,,,,,,,,,
DI,2,B面第2列料屉检测信号,Column_Check_B2,11,HC,X11,,,,,,,,,,,,
DI,2,B面第3列料屉检测信号,Column_Check_B3,12,HC,X12,,,,,,,,,,,,
DI,2,B面第4列料屉检测信号,Column_Check_B4,13,HC,X13,,,,,,,,,,,,
DI,2,B面第5列料屉检测信号,Column_Check_B5,14,HC,X14,,,,,,,,,,,,
DI,2,B面第6列料屉检测信号,Column_Check_B6,15,HC,X15,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DI,2,料屉第1层检测信号,Row_Check_1,16,HC,X16,,,,,,,,,,,,
DI,2,料屉第2层检测信号,Row_Check_2,17,HC,X17,,,,,,,,,,,,
DI,2,料屉第3层检测信号,Row_Check_3,18,HC,X18,,,,,,,,,,,,
DI,2,料屉第4层检测信号,Row_Check_4,19,HC,X19,,,,,,,,,,,,
DI,2,料屉第5层检测信号,Row_Check_5,20,HC,X20,,,,,,,,,,,,
DI,2,料屉第6层检测信号,Row_Check_6,21,HC,X21,,,,,,,,,,,,
DI,2,料屉第7层检测信号,Row_Check_7,22,HC,X22,,,,,,,,,,,,
DI,2,料屉第8层检测信号,Row_Check_8,23,HC,X23,,,,,,,,,,,,
DI,2,料屉第9层检测信号,Row_Check_9,24,HC,X24,,,,,,,,,,,,
DI,2,料屉第10层检测信号,Row_Check_10,25,HC,X25,,,,,,,,,,,,
DI,2,料屉第11层检测信号,Row_Check_11,26,HC,X26,,,,,,,,,,,,
DI,2,料屉第12层检测信号,Row_Check_12,27,HC,X27,,,,,,,,,,,,
DI,2,料屉第13层检测信号,Row_Check_13,28,HC,X28,,,,,,,,,,,,
DI,2,料屉第14层检测信号,Row_Check_14,29,HC,X29,,,,,,,,,,,,
DI,2,料屉第15层检测信号,Row_Check_15,30,HC,X30,,,,,,,,,,,,
,,,,31,HC,X31,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DI,2,左前门门禁信号(存储机构),LeftDoor_Limit,32,HC,X32,,,,,,,,,,,,
DI,2,右前门门禁信号(存储机构),RightDoor_Limit,33,HC,X33,,,,,,,,,,,,
DI,2,后门门禁信号(存储机构),BackDoor_Limit,34,HC,X34,,,,,,,,,,,,
DI,1,急停(取料机构),SuddenStop_BTN,35,HC,X35,,,,,,,,,,,,
DI,1,复位(取料机构),Reset_BTN,36,HC,X36,,,,,,,,,,,,
DI,1,光栅信号,SafetyRasterSignal,37,HC,X37,,,,,,,,,,,,
DI,1,旋转臂A料口侧检测,MAxis_Check_A,38,HC,X38,,,,,,,,,,,,
DI,1,旋转臂B料口侧检测,MAxis_Check_B,39,HC,X39,,,,,,,,,,,,
DI,1,旋转臂A侧暂存区域检测,MAxis_Check_AreaA,40,HC,X40,,,,,,,,,,,,
DI,1,旋转臂7寸料盘检测,MAxis_ReelCheck_7,41,HC,X41,,,,,,,,,,,,
DI,1,旋转臂13寸料盘检测,MAxis_ReelCheck_13,42,HC,X42,,,,,,,,,,,,
DI,1,A料口前端料串检测,LineIn_Check_A,43,HC,X43,,,,,,,,,,,,
DI,1,A料口料串到位检测,LineEnd_Check_A,44,HC,X44,,,,,,,,,,,,
DI,1,A料口阻挡上升端,Shelf_StopUp_A,45,HC,X45,,,,,,,,,,,,
DI,1,A料口阻挡下降端,Shelf_StopDown_A,46,HC,X46,,,,,,,,,,,,
DI,1,B料口前端料串检测,LineIn_Check_B,47,HC,X47,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DI,1,B料口料串到位检测,LineEnd_Check_B,48,HC,X48,,,,,,,,,,,,
DI,1,B料口阻挡上升端,Shelf_StopUp_B,49,HC,X49,,,,,,,,,,,,
DI,1,B料口阻挡下降端,Shelf_StopDown_B,50,HC,X50,,,,,,,,,,,,
DI,1,A料口定位料盘检测,ReelCheck_A,51,HC,X51,,,,,,,,,,,,
DI,1,B料口定位料盘检测,ReelCheck_B,52,HC,X52,,,,,,,,,,,,
DI,1,A进料上暂存区料盘检测,UpperArea_Check_A,53,HC,X53,,,,,,,,,,,,
DI,1,A出料下暂存区料盘检测,UnderArea_Check_A,54,HC,X54,,,,,,,,,,,,
DI,1,B进料上暂存区料盘检测,UpperArea_Check_B,55,HC,X55,,,,,,,,,,,,
DI,1,B出料下暂存区料盘检测,UnderArea_Check_B,56,HC,X56,,,,,,,,,,,,
DI,1,空气压力检测,Airpressure_Check,57,HC,X57,,,,,,,,,,,,
,,,,58,HC,X58,,,,,,,,,,,,
,,,,59,HC,X59,,,,,,,,,,,,
,,,,60,HC,X60,,,,,,,,,,,,
,,,,61,HC,X61,,,,,,,,,,,,
,,,,62,HC,X62,,,,,,,,,,,,
,,,,63,HC,X63,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DI,2,A进料上暂存区料盘检测,UpperArea_Check_A,53,HC,X53,,,,,,,,,,,,
DI,2,A出料下暂存区料盘检测,UnderArea_Check_A,54,HC,X54,,,,,,,,,,,,
DI,2,B进料上暂存区料盘检测,UpperArea_Check_B,55,HC,X55,,,,,,,,,,,,
DI,2,B出料下暂存区料盘检测,UnderArea_Check_B,56,HC,X56,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DO,2,自动绿色指示灯(存储机构),RunSign_HddLed,0,HC,Y00,,,,,,,,,,,,
DO,2,故障红色指示灯(存储机构),Alarm_HddLed,1,HC,Y01,,,,,,,,,,,,
DO,2,待机黄色指示灯(存储机构),AutoRun_HddLed,2,HC,Y02,,,,,,,,,,,,
DO,2,报警蜂鸣器,Alarm_Buzzer,3,HC,Y03,,,,,,,,,,,,
DO,2,设备照明,DeviceLed,4,HC,Y04,,,,,,,,,,,,
DO,2,门禁屏蔽,DisDoorLimit,5,HC,Y05,,,,,,,,,,,,
,,,,6,HC,Y06,,,,,,,,,,,,
,,,,7,HC,Y07,,,,,,,,,,,,
,,,,8,HC,Y08,,,,,,,,,,,,
,,,,9,HC,Y09,,,,,,,,,,,,
,,,,10,HC,Y10,,,,,,,,,,,,
,,,,11,HC,Y11,,,,,,,,,,,,
,,,,12,HC,Y12,,,,,,,,,,,,
,,,,13,HC,Y13,,,,,,,,,,,,
,,,,14,HC,Y14,,,,,,,,,,,,
,,,,15,HC,Y15,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
,,,,16,HC,Y16,,,,,,,,,,,,
,,,,17,HC,Y17,,,,,,,,,,,,
,,,,18,HC,Y18,,,,,,,,,,,,
,,,,19,HC,Y19,,,,,,,,,,,,
,,,,20,HC,Y20,,,,,,,,,,,,
,,,,21,HC,Y21,,,,,,,,,,,,
,,,,22,HC,Y22,,,,,,,,,,,,
,,,,23,HC,Y23,,,,,,,,,,,,
,,,,24,HC,Y24,,,,,,,,,,,,
,,,,25,HC,Y25,,,,,,,,,,,,
,,,,26,HC,Y26,,,,,,,,,,,,
,,,,27,HC,Y27,,,,,,,,,,,,
,,,,28,HC,Y28,,,,,,,,,,,,
,,,,29,HC,Y29,,,,,,,,,,,,
,,,,30,HC,Y30,,,,,,,,,,,,
,,,,31,HC,Y31,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
DO,1,自动绿色指示灯(取料机构),RunSign_HddLed,32,HC,Y32,,,,,,,,,,,,
DO,1,故障红色指示灯(取料机构),Alarm_HddLed,33,HC,Y33,,,,,,,,,,,,
DO,1,待机黄色指示灯(取料机构),AutoRun_HddLed,34,HC,Y34,,,,,,,,,,,,
DO,1,报警蜂鸣器,Alarm_Buzzer,35,HC,Y35,,,,,,,,,,,,
DO,1,相机照明,CameraLed,36,HC,Y36,,,,,,,,,,,,
DO,1,A料口阻挡上升,Shelf_StopUp_A,37,HC,Y37,,,,,,,,,,,,
DO,1,A料口阻挡下降,Shelf_StopDown_A,38,HC,Y38,,,,,,,,,,,,
DO,1,B料口阻挡上升,Shelf_StopUp_B,39,HC,Y39,,,,,,,,,,,,
DO,1,B料口阻挡下降,Shelf_StopDown_B,40,HC,Y40,,,,,,,,,,,,
DO,1,A料口电机启动,LineStart_A,41,HC,Y41,,,,,,,,,,,,
DO,1,A料口电机反转指令,LineBack_A,42,HC,Y42,,,,,,,,,,,,
DO,1,B料口电机启动,LineStart_B,43,HC,Y43,,,,,,,,,,,,
DO,1,B料口电机反转指令,LineBack_B,44,HC,Y44,,,,,,,,,,,,
DO,1,吸盘工作信号,ClampWork,45,HC,Y45,,,,,,,,,,,,
,,,,46,HC,Y46,,,,,,,,,,,,
,,,,47,HC,Y47,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,
,,,,48,HC,Y48,,,,,,,,,,,,
,,,,49,HC,Y49,,,,,,,,,,,,
,,,,50,HC,Y50,,,,,,,,,,,,
,,,,51,HC,Y51,,,,,,,,,,,,
,,,,52,HC,Y52,,,,,,,,,,,,
,,,,53,HC,Y53,,,,,,,,,,,,
,,,,54,HC,Y54,,,,,,,,,,,,
,,,,55,HC,Y55,,,,,,,,,,,,
,,,,56,HC,Y56,,,,,,,,,,,,
,,,,57,HC,Y57,,,,,,,,,,,,
,,,,58,HC,Y58,,,,,,,,,,,,
,,,,59,HC,Y59,,,,,,,,,,,,
,,,,60,HC,Y60,,,,,,,,,,,,
,,,,61,HC,Y61,,,,,,,,,,,,
,,,,62,HC,Y62,,,,,,,,,,,,
,,,,63,HC,Y63,,,,,,,,,,,,
位置,料仓ID,优先级,高度,宽度,X坐标,Y坐标,X方向误差范围,Y方向误差范围
05AA0101,2,1,8,7,20,3,100,100
05AA0102,2,1,8,7,20,3,100,100
05AA0103,2,1,8,7,20,3,100,100
05AA0104,2,1,8,7,20,3,100,100
05AA0105,2,1,8,7,20,3,100,100
05AA0106,2,1,8,7,20,3,100,100
05AA0201,2,1,8,7,20,3,100,100
05AA0202,2,1,8,7,20,3,100,100
05AA0203,2,1,8,7,20,3,100,100
05AA0204,2,1,8,7,20,3,100,100
05AA0205,2,1,8,7,20,3,100,100
05AA0206,2,1,8,7,20,3,100,100
05AA0301,2,1,8,7,20,3,100,100
05AA0302,2,1,8,7,20,3,100,100
05AA0303,2,1,8,7,20,3,100,100
05AA0304,2,1,8,7,20,3,100,100
05AA0305,2,1,8,7,20,3,100,100
05AA0306,2,1,8,7,20,3,100,100
05AA0401,2,1,8,7,20,3,100,100
05AA0402,2,1,8,7,20,3,100,100
05AA0403,2,1,8,7,20,3,100,100
05AA0404,2,1,8,7,20,3,100,100
05AA0405,2,1,8,7,20,3,100,100
05AA0406,2,1,8,7,20,3,100,100
05AA0501,2,1,8,7,20,3,100,100
05AA0502,2,1,8,7,20,3,100,100
05AA0503,2,1,8,7,20,3,100,100
05AA0504,2,1,8,7,20,3,100,100
05AA0505,2,1,8,7,20,3,100,100
05AA0506,2,1,8,7,20,3,100,100
05AA0601,2,1,8,7,20,3,100,100
05AA0602,2,1,8,7,20,3,100,100
05AA0603,2,1,8,7,20,3,100,100
05AA0604,2,1,8,7,20,3,100,100
05AA0605,2,1,8,7,20,3,100,100
05AA0606,2,1,8,7,20,3,100,100
05AA0701,2,1,8,7,20,3,100,100
05AA0702,2,1,8,7,20,3,100,100
05AA0703,2,1,8,7,20,3,100,100
05AA0704,2,1,8,7,20,3,100,100
05AA0705,2,1,8,7,20,3,100,100
05AA0706,2,1,8,7,20,3,100,100
05AA0801,2,1,8,7,20,3,100,100
05AA0802,2,1,8,7,20,3,100,100
05AA0803,2,1,8,7,20,3,100,100
05AA0804,2,1,8,7,20,3,100,100
05AA0805,2,1,8,7,20,3,100,100
05AA0806,2,1,8,7,20,3,100,100
05AA0901,2,1,8,7,20,3,100,100
05AA0902,2,1,8,7,20,3,100,100
05AA0903,2,1,8,7,20,3,100,100
05AA0904,2,1,8,7,20,3,100,100
05AA0905,2,1,8,7,20,3,100,100
05AA0906,2,1,8,7,20,3,100,100
05AA1001,2,1,8,7,20,3,100,100
05AA1002,2,1,8,7,20,3,100,100
05AA1003,2,1,8,7,20,3,100,100
05AA1004,2,1,8,7,20,3,100,100
05AA1005,2,1,8,7,20,3,100,100
05AA1006,2,1,8,7,20,3,100,100
05AA1101,2,1,8,7,20,3,100,100
05AA1102,2,1,8,7,20,3,100,100
05AA1103,2,1,8,7,20,3,100,100
05AA1104,2,1,8,7,20,3,100,100
05AA1105,2,1,8,7,20,3,100,100
05AA1106,2,1,8,7,20,3,100,100
05AA1201,2,1,8,7,20,3,100,100
05AA1202,2,1,8,7,20,3,100,100
05AA1203,2,1,8,7,20,3,100,100
05AA1204,2,1,8,7,20,3,100,100
05AA1205,2,1,8,7,20,3,100,100
05AA1206,2,1,8,7,20,3,100,100
05AA1301,2,1,8,7,20,3,100,100
05AA1302,2,1,8,7,20,3,100,100
05AA1303,2,1,8,7,20,3,100,100
05AA1304,2,1,8,7,20,3,100,100
05AA1305,2,1,8,7,20,3,100,100
05AA1306,2,1,8,7,20,3,100,100
05AA1401,2,1,8,7,20,3,100,100
05AA1402,2,1,8,7,20,3,100,100
05AA1403,2,1,8,7,20,3,100,100
05AA1404,2,1,8,7,20,3,100,100
05AA1405,2,1,8,7,20,3,100,100
05AA1406,2,1,8,7,20,3,100,100
05AA1501,2,1,8,7,20,3,100,100
05AA1502,2,1,8,7,20,3,100,100
05AA1503,2,1,8,7,20,3,100,100
05AA1504,2,1,8,7,20,3,100,100
05AA1505,2,1,8,7,20,3,100,100
05AA1506,2,1,8,7,20,3,100,100
05AA1601,2,1,8,7,20,3,100,100
05AA1602,2,1,8,7,20,3,100,100
05AA1603,2,1,8,7,20,3,100,100
05AA1604,2,1,8,7,20,3,100,100
05AA1605,2,1,8,7,20,3,100,100
05AA1606,2,1,8,7,20,3,100,100
05BB0101,2,1,8,7,20,3,100,100
05BB0102,2,1,8,7,20,3,100,100
05BB0103,2,1,8,7,20,3,100,100
05BB0104,2,1,8,7,20,3,100,100
05BB0105,2,1,8,7,20,3,100,100
05BB0106,2,1,8,7,20,3,100,100
05BB0201,2,1,8,7,20,3,100,100
05BB0202,2,1,8,7,20,3,100,100
05BB0203,2,1,8,7,20,3,100,100
05BB0204,2,1,8,7,20,3,100,100
05BB0205,2,1,8,7,20,3,100,100
05BB0206,2,1,8,7,20,3,100,100
05BB0301,2,1,8,7,20,3,100,100
05BB0302,2,1,8,7,20,3,100,100
05BB0303,2,1,8,7,20,3,100,100
05BB0304,2,1,8,7,20,3,100,100
05BB0305,2,1,8,7,20,3,100,100
05BB0306,2,1,8,7,20,3,100,100
05BB0401,2,1,8,7,20,3,100,100
05BB0402,2,1,8,7,20,3,100,100
05BB0403,2,1,8,7,20,3,100,100
05BB0404,2,1,8,7,20,3,100,100
05BB0405,2,1,8,7,20,3,100,100
05BB0406,2,1,8,7,20,3,100,100
05BB0501,2,1,8,7,20,3,100,100
05BB0502,2,1,8,7,20,3,100,100
05BB0503,2,1,8,7,20,3,100,100
05BB0504,2,1,8,7,20,3,100,100
05BB0505,2,1,8,7,20,3,100,100
05BB0506,2,1,8,7,20,3,100,100
05BB0601,2,1,8,7,20,3,100,100
05BB0602,2,1,8,7,20,3,100,100
05BB0603,2,1,8,7,20,3,100,100
05BB0604,2,1,8,7,20,3,100,100
05BB0605,2,1,8,7,20,3,100,100
05BB0606,2,1,8,7,20,3,100,100
05BB0701,2,1,8,7,20,3,100,100
05BB0702,2,1,8,7,20,3,100,100
05BB0703,2,1,8,7,20,3,100,100
05BB0704,2,1,8,7,20,3,100,100
05BB0705,2,1,8,7,20,3,100,100
05BB0706,2,1,8,7,20,3,100,100
05BB0801,2,1,8,7,20,3,100,100
05BB0802,2,1,8,7,20,3,100,100
05BB0803,2,1,8,7,20,3,100,100
05BB0804,2,1,8,7,20,3,100,100
05BB0805,2,1,8,7,20,3,100,100
05BB0806,2,1,8,7,20,3,100,100
05BB0901,2,1,8,7,20,3,100,100
05BB0902,2,1,8,7,20,3,100,100
05BB0903,2,1,8,7,20,3,100,100
05BB0904,2,1,8,7,20,3,100,100
05BB0905,2,1,8,7,20,3,100,100
05BB0906,2,1,8,7,20,3,100,100
05BB1001,2,1,8,7,20,3,100,100
05BB1002,2,1,8,7,20,3,100,100
05BB1003,2,1,8,7,20,3,100,100
05BB1004,2,1,8,7,20,3,100,100
05BB1005,2,1,8,7,20,3,100,100
05BB1006,2,1,8,7,20,3,100,100
05BB1101,2,1,8,7,20,3,100,100
05BB1102,2,1,8,7,20,3,100,100
05BB1103,2,1,8,7,20,3,100,100
05BB1104,2,1,8,7,20,3,100,100
05BB1105,2,1,8,7,20,3,100,100
05BB1106,2,1,8,7,20,3,100,100
05BB1201,2,1,8,7,20,3,100,100
05BB1202,2,1,8,7,20,3,100,100
05BB1203,2,1,8,7,20,3,100,100
05BB1204,2,1,8,7,20,3,100,100
05BB1205,2,1,8,7,20,3,100,100
05BB1206,2,1,8,7,20,3,100,100
05BB1301,2,1,8,7,20,3,100,100
05BB1302,2,1,8,7,20,3,100,100
05BB1303,2,1,8,7,20,3,100,100
05BB1304,2,1,8,7,20,3,100,100
05BB1305,2,1,8,7,20,3,100,100
05BB1306,2,1,8,7,20,3,100,100
05BB1401,2,1,8,7,20,3,100,100
05BB1402,2,1,8,7,20,3,100,100
05BB1403,2,1,8,7,20,3,100,100
05BB1404,2,1,8,7,20,3,100,100
05BB1405,2,1,8,7,20,3,100,100
05BB1406,2,1,8,7,20,3,100,100
05BB1501,2,1,8,7,20,3,100,100
05BB1502,2,1,8,7,20,3,100,100
05BB1503,2,1,8,7,20,3,100,100
05BB1504,2,1,8,7,20,3,100,100
05BB1505,2,1,8,7,20,3,100,100
05BB1506,2,1,8,7,20,3,100,100
05BB1601,2,1,8,7,20,3,100,100
05BB1602,2,1,8,7,20,3,100,100
05BB1603,2,1,8,7,20,3,100,100
05BB1604,2,1,8,7,20,3,100,100
05BB1605,2,1,8,7,20,3,100,100
05BB1606,2,1,8,7,20,3,100,100
\ 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.DeviceLibrary</RootNamespace> <RootNamespace>OnlineStore.DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName> <AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
...@@ -59,8 +59,8 @@ ...@@ -59,8 +59,8 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\HuichuanDLL\HuichuanLibrary.dll</HintPath> <HintPath>..\..\dll\HuichuanDLL\HuichuanLibrary.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.14.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath> <HintPath>..\..\packages\log4net.2.0.14\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="MvCameraControl.Net"> <Reference Include="MvCameraControl.Net">
<HintPath>..\..\dll\MvCameraControl.Net.dll</HintPath> <HintPath>..\..\dll\MvCameraControl.Net.dll</HintPath>
...@@ -81,33 +81,25 @@ ...@@ -81,33 +81,25 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="clientEquip\outletEquip\OutletEquip.cs" />
<Compile Include="clientEquip\outletEquip\OutletEquip_OutStore.cs" />
<Compile Include="clientEquip\robotEquip\RobotEquip_Camera.cs" />
<Compile Include="clientEquip\robotEquip\NGBox.cs" />
<Compile Include="clientEquip\robotEquip\RobotEquip-NGBox.cs" />
<Compile Include="manager\agvClient\AgvClient.cs" /> <Compile Include="manager\agvClient\AgvClient.cs" />
<Compile Include="manager\BufferDataManager.cs" /> <Compile Include="manager\BufferDataManager.cs" />
<Compile Include="manager\StoreManager.cs" /> <Compile Include="manager\StoreManager.cs" />
<Compile Include="deviceLibrary\RFID\RFIDManagercs.cs" /> <Compile Include="deviceLibrary\RFID\RFIDManagercs.cs" />
<Compile Include="manager\SServerManager.cs" /> <Compile Include="manager\SServerManager.cs" />
<Compile Include="storeBean\boxBean\BoxEqiup_Tongs.cs" /> <Compile Include="clientEquip\robotEquip\RobotEquip_ConnectServerTimer.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_Camera.cs" /> <Compile Include="clientEquip\robotEquip\RobotEquip_InExecute.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_ConnectServerTimer.cs" /> <Compile Include="clientEquip\robotEquip\RobotEquip_OutExecute.cs" />
<Compile Include="storeBean\boxBean\AutoInoutInfo.cs" /> <Compile Include="clientEquip\EquipBase.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_InExecute.cs" /> <Compile Include="clientEquip\inletEquip\InletEquip.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_OutExecute.cs" /> <Compile Include="clientEquip\inletEquip\InletEquip_InStore.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_AutoFindPos.cs" /> <Compile Include="clientEquip\robotEquip\RobotEquip.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_PosDebug.cs" /> <Compile Include="clientEquip\robotEquip\RobotEquip_Partial.cs" />
<Compile Include="storeBean\boxBean\EyemLibDemo.cs" /> <Compile Include="clientEquip\ClientBean.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureBean.cs" />
<Compile Include="storeBean\boxBean\Humiture\HumitureController.cs" />
<Compile Include="storeBean\boxBean\positionDebug\DrawerResult.cs" />
<Compile Include="storeBean\boxBean\positionDebug\PositionDebugManager.cs" />
<Compile Include="storeBean\boxBean\positionDebug\PositionDebugResult.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean.cs" />
<Compile Include="storeBean\inputBean\BatchMoveBean_Partial.cs" />
<Compile Include="storeBean\EquipBase.cs" />
<Compile Include="storeBean\inputBean\InputEquip.cs" />
<Compile Include="storeBean\inputBean\InputEquip_InStore.cs" />
<Compile Include="storeBean\boxBean\BoxEquip.cs" />
<Compile Include="storeBean\boxBean\BoxEquip_Partial.cs" />
<Compile Include="storeBean\XLRStoreBean.cs" />
<Compile Include="baan\AxisBean.cs" /> <Compile Include="baan\AxisBean.cs" />
<Compile Include="baan\ClampJawBean.cs" /> <Compile Include="baan\ClampJawBean.cs" />
<Compile Include="deviceLibrary\AXIS\AxisManager.cs" /> <Compile Include="deviceLibrary\AXIS\AxisManager.cs" />
...@@ -184,6 +176,10 @@ ...@@ -184,6 +176,10 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\..\Projects\CSharp-Workspace\Dolen\JAKA\JAKA.csproj">
<Project>{b702ab04-bb76-491f-812a-603298d08fbf}</Project>
<Name>JAKA</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj"> <ProjectReference Include="..\Common\Common.csproj">
<Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project> <Project>{43cdd09e-fcf3-4960-a01d-3bbfe9933122}</Project>
<Name>Common</Name> <Name>Common</Name>
...@@ -194,13 +190,7 @@ ...@@ -194,13 +190,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Config\Config_InputEquip.csv"> <Content Include="Config\Config_Client.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Config\Config_Store.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Config\Config_BoxEquip.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
...@@ -212,17 +202,15 @@ ...@@ -212,17 +202,15 @@
<Content Include="huichuan_x86\IMC_API_x86.lib"> <Content Include="huichuan_x86\IMC_API_x86.lib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Config\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Config\Camera.json"> <None Include="Config\Camera.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="packages.config" />
<Content Include="SDK\MotorMaster.config"> <Content Include="SDK\MotorMaster.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<None Include="packages.config" />
</ItemGroup> </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.
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"?> <?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="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral"/> <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0"/> <bindingRedirect oldVersion="0.0.0.0-2.0.14.0" newVersion="2.0.14.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
...@@ -16,21 +16,22 @@ using System.Windows.Forms; ...@@ -16,21 +16,22 @@ using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public partial class XLRStoreBean : DeviceBase public partial class ClientBean : DeviceBase
{ {
#region 初始化 #region 初始化
public bool IsDebug = false; public bool IsDebug = false;
public InputEquip inputEquip; public InletEquip inletEquip;
public BoxEquip boxEquip; public OutletEquip outletEquip;
public RobotEquip robotEquip;
public Dictionary<int, EquipBase> equipsMap = new Dictionary<int, EquipBase>(); public Dictionary<int, EquipBase> equipsMap = new Dictionary<int, EquipBase>();
public XLRStore_Config Config = null; public Client_Config Config = null;
private bool canStart = false; private bool canStart = false;
//public SQLite sQLite = null; //public SQLite sQLite = null;
public XLRStoreBean(XLRStore_Config config, InputEquip_Config inputConfig, BoxEquip_Config boxConfig) public ClientBean(Client_Config config)
{ {
equipsMap = new Dictionary<int, EquipBase>(); equipsMap = new Dictionary<int, EquipBase>();
if (config.IOSingle_TimerOut <= 0) if (config.IOSingle_TimerOut <= 0)
...@@ -42,20 +43,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -42,20 +43,18 @@ namespace OnlineStore.DeviceLibrary
this.Config = config; this.Config = config;
this.DeviceID = config.Id; this.DeviceID = config.Id;
Name = (" 智能存储仓_" + " ").ToUpper(); Name = (" 机器人运输线" + " ").ToUpper();
MoveInfo = new DeviceMoveInfo(Name); MoveInfo = new DeviceMoveInfo(Name);
inletEquip = new InletEquip(config, 1);
outletEquip = new OutletEquip(config, 2);
robotEquip = new RobotEquip(config, 3);
List<string> ioList = new List<string>(); List<string> ioList = new List<string>();
ioList = new List<string>(DeviceConfig.ProIOIpMap.Values); ioList = new List<string>(DeviceConfig.ProIOIpMap.Values);
equipsMap.Add(1, inletEquip);
inputEquip = new InputEquip("1", inputConfig); equipsMap.Add(2, outletEquip);
boxEquip = new BoxEquip("2", boxConfig); equipsMap.Add(3, robotEquip);
equipsMap.Add(1, inputEquip);
equipsMap.Add(2, boxEquip);
//先初始化设备 //先初始化设备
RFIDManager.Open(); // RFIDManager.Open();
HCBoardManager.InitConfig(); HCBoardManager.InitConfig();
IOManager.Init(); IOManager.Init();
AxisManager.Init(); AxisManager.Init();
...@@ -64,8 +63,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -64,8 +63,8 @@ namespace OnlineStore.DeviceLibrary
//初始化摄像机配置 //初始化摄像机配置
CodeManager.LoadConfig(); CodeManager.LoadConfig();
AgvClient.NodeList.Add(inputConfig.AgvName_A); //AgvClient.NodeList.Add(inputConfig.AgvName_A);
AgvClient.NodeList.Add(inputConfig.AgvName_B); //AgvClient.NodeList.Add(inputConfig.AgvName_B);
BufferDataManager.InitData(); BufferDataManager.InitData();
mainTimer.Enabled = true; mainTimer.Enabled = true;
...@@ -296,8 +295,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -296,8 +295,8 @@ namespace OnlineStore.DeviceLibrary
default: break; default: break;
} }
inputEquip.AutoStartProcess(); inletEquip.AutoStartProcess();
boxEquip.AutoStartProcess(); outletEquip.AutoStartProcess();
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -201,7 +201,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -201,7 +201,7 @@ namespace OnlineStore.DeviceLibrary
} }
public bool CanStartRun() public bool CanStartRun()
{ {
string canResult = StoreManager.XLRStore.CanStart(); string canResult = StoreManager.Client.CanStart();
if (String.IsNullOrEmpty(canResult).Equals(false)) if (String.IsNullOrEmpty(canResult).Equals(false))
{ {
SetWarnMsg(Name + canResult); SetWarnMsg(Name + canResult);
......
using Asa;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
partial class OutletEquip
{
/// <summary>
/// 等待机器人在安全位置
/// </summary>
/// <param name="moveInfo"></param>
/// <param name="wait"></param>
/// <returns></returns>
protected override bool CheckWaitResult(DeviceMoveInfo moveInfo, WaitResultInfo wait)
{
if (wait.WaitType.Equals(WaitEnum.W201_RobotMove))
{
if (StoreManager.Client.robotEquip.RobotMoveEnd(curcmd))
{
wait.IsEnd = true;
}
}
return wait.IsEnd;
}
/// <summary>
/// 当前命令
/// </summary>
private string curcmd = "";
#region 自动出料
private DateTime startInTime = DateTime.Now;
private void NextMoveStep(StepEnum step, string msg)
{
MoveInfo.NextMoveStep(step);
MoveLog($" {MoveInfo.SLog}:{msg}");
}
protected override void OutstoreProcess()
{
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
}
if (MoveInfo.IsInWait)
{
return;
}
if (MoveInfo.IsStep(StepEnum.Outlet_01_Wait))
{
NextMoveStep(StepEnum.Outlet_02_CheckTray, "检查是否有料盘");
SetCurCmd(RobotEquip.GetCmd_Standby());
AddWaitTime(10000);
MoveInfo.OneWaitCanEndStep=true;
}
else if (MoveInfo.IsStep(StepEnum.Outlet_02_CheckTray))
{
if (TrayCheck())
{
NextMoveStep(StepEnum.Outlet_03_CheckAllowFeedOut, "有料盘,顶升下降,准备送走");
JackUp(false);
AddWaitAllowFeedOut();
}
else//无料盘
{
NextMoveStep(StepEnum.Outlet_05_JackUp, "无料盘,顶升抬起,准备料盘放入");
JackUp(true);
AddWaitTime(5000);
}
}
else if (MoveInfo.IsStep(StepEnum.Outlet_03_CheckAllowFeedOut))
{
NextMoveStep(StepEnum.Outlet_04_WaitTrayLeave, "允许料盘离开,链条运行");
OutletRun(true);
AddWaitTrayCheck1(false);
AddWaitTrayCheck2(true);
AddWaitTrayCheck2(false);
}
else if (MoveInfo.IsStep(StepEnum.Outlet_04_WaitTrayLeave))
{
NextMoveStep(StepEnum.Outlet_05_JackUp, "料盘离开完成,链条停止,顶升抬起");
OutletRun(false);
JackUp(true);
AddWaitTrayCheck2(false);
}
else if (MoveInfo.IsStep(StepEnum.Outlet_05_JackUp))
{
curcmd = "";
MoveInfo.EndMove();
}
}
private void SetCurCmd(string cmd)
{
curcmd = cmd;
MoveInfo.WaitList.Add(WaitResultInfo.WaitRobotMove());
}
#endregion
}
}
...@@ -6,15 +6,22 @@ using System.Threading.Tasks; ...@@ -6,15 +6,22 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class PosDebugResult internal class NGBox
{ {
private int trayCnt = 0;
private string checkTray = "";
/// <summary> /// <summary>
/// 位置名称 /// NG箱
/// </summary> /// </summary>
public string Name { get; set; } /// <param name="checkTray">料盘检测信号</param>
public NGBox(string checkTray)
{
this.checkTray = checkTray;
}
/// <summary> /// <summary>
/// 调试结果:-1表示未运行过,0表示NG,1表示OK /// 料盘数量
/// </summary> /// </summary>
public int ResCode { get; set; } = -1; public int TrayCnt { get => trayCnt; set => trayCnt = value; }
} }
} }
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public partial class RobotEquip
{
/// <summary>
/// NG箱子有料时的有效期(分钟)
/// </summary>
private int validityPeriod = Common.ConfigAppSettings.GetIntValue(Setting_Init.ValidityPeriod);
/// <summary>
/// NG箱可放置料盘的个数
/// </summary>
private int validityCnt = ConfigAppSettings.GetIntValue(Setting_Init.ValidityCnt);
public int TrayCntInNGBox
{
get { return BufferDataManager.TraysInNGBoxInfo.Count; }
}
/// <summary>
/// NG箱触发报警
/// </summary>
/// <returns></returns>
public bool NGBoxAlarm()
{
List<InOutPosInfo> posInfos = BufferDataManager.TraysInNGBoxInfo;
if (TrayCntInNGBox >= validityCnt ||
(posInfos != null && posInfos.Count > 0 && (DateTime.Now - posInfos[0].CreateTime).TotalMinutes >= validityPeriod))
return true;
return false;
}
}
}
...@@ -11,7 +11,7 @@ using System.Windows.Forms; ...@@ -11,7 +11,7 @@ using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
partial class BoxEquip partial class RobotEquip
{ {
Thread[] camerathread; Thread[] camerathread;
bool IsOpen = false; bool IsOpen = false;
......
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms.VisualStyles;
namespace OnlineStore.DeviceLibrary
{
partial class RobotEquip
{
#region 入库
private void InstoreExecute()
{
switch (MoveInfo.MoveStep)
{
case StepEnum.InStore_01_Wait:
SetBoxStatus(DeviceStatus.InStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo);
NextMoveStep(StepEnum.InStore_02_ArmToP1, "入库开始,机械臂回待机点");
InStore_02_ArmToP1();
break;
case StepEnum.InStore_02_ArmToP1:
NextMoveStep(StepEnum.InStore_03_MoveAxisToInlet, "行走机构去入料口");
InStore_03_MoveAxisToInlet();
break;
case StepEnum.InStore_03_MoveAxisToInlet:
NextMoveStep(StepEnum.InStore_04_CheckInletState, "到达入料口,检查其状态");
break;
case StepEnum.InStore_04_CheckInletState:
if (InStore_04_CheckInletState())
{
NextMoveStep(StepEnum.InStore_05_ArmToTrayLow, "机械臂去入料口的取料低点");
InStore_05_ArmToTrayLow();
}
break;
case StepEnum.InStore_05_ArmToTrayLow:
NextMoveStep(StepEnum.InStore_06_CompressTray, "机械臂到入料口取料高点");
InStore_06_CompressTray();
break;
case StepEnum.InStore_06_CompressTray:
NextMoveStep(StepEnum.InStore_07_ArmBackToP1, "在入料口取料完成,机械臂回待机点");
InStore_07_ArmBackToP1();
break;
case StepEnum.InStore_07_ArmBackToP1:
if (CheckInstoreTrayTarget())
{
NextMoveStep(StepEnum.InStore_08_MoveAxisToStore, "行走机构去目标仓位");
InStore_08_MoveAxisToStore();
}
else
{
NextMoveStep(StepEnum.InStore_12_MoveAxisToNGBox, "行走机构去NG箱");
InStore_12_MoveAxisToNGBox();
}
break;
case StepEnum.InStore_08_MoveAxisToStore:
NextMoveStep(StepEnum.InStore_09_CheckStoreState, "行走机构到达指定仓,检查其状态");
break;
case StepEnum.InStore_09_CheckStoreState:
if (InStore_09_CheckStoreState())
{
NextMoveStep(StepEnum.InStore_10_ArmToStoreDoorHigh, "当前仓门口可放料,机械臂到仓放料高点");
InStore_10_ArmToStoreDoorHigh();
}
break;
case StepEnum.InStore_10_ArmToStoreDoorHigh:
NextMoveStep(StepEnum.InStore_11_ReleaseTray, "机械臂到放料低点,压紧轴张开");
InStore_11_ReleaseTray();
break;
case StepEnum.InStore_11_ReleaseTray:
NextMoveStep(StepEnum.InStore_16_ArmBackToP1, "在仓门口放料完成,机械臂回待机点");
InStore_16_ArmBackToP1();
break;
#region NG
case StepEnum.InStore_12_MoveAxisToNGBox:
NextMoveStep(StepEnum.InStore_13_CheckNGBoxState, "检查NG箱状态");
break;
case StepEnum.InStore_13_CheckNGBoxState:
if (InStore_13_CheckNGBoxState())
{
NextMoveStep(StepEnum.InStore_14_ArmToNGBoxHigh, "NG箱可放料,机械臂去NG箱放料高点");
ClearSpecifiedAlarm($"NG箱中已存在{TrayCntInNGBox}个料盘,机器人无法放料,需要清空NG箱");
InStore_14_ArmToNGBoxHigh();
}
else
{
SetWarnMsg($"NG箱中已存在{TrayCntInNGBox}个料盘,机器人无法放料,需要清空NG箱");
}
break;
case StepEnum.InStore_14_ArmToNGBoxHigh:
NextMoveStep(StepEnum.InStore_15_ReleaseTray, "机械臂到放料低点,压紧轴张开");
InStore_15_ReleaseTray();
break;
case StepEnum.InStore_15_ReleaseTray:
NextMoveStep(StepEnum.InStore_16_ArmBackToP1, "在NG箱放料完成,机械臂回待机点");
InStore_16_ArmBackToP1();
break;
#endregion
case StepEnum.InStore_16_ArmBackToP1:
NextMoveStep(StepEnum.InStore_17_Finish, "入库结束");
InStore_17_Finish();
break;
case StepEnum.InStore_17_Finish:
MoveInfo.EndMove();
break;
}
}
/// <summary>
/// 检查入库料盘的目的地
/// </summary>
/// <returns>true,去料仓;false:去ng箱子</returns>
private bool CheckInstoreTrayTarget()
{
return !MoveInfo.MoveParam.PosInfo.IsNG;
}
private void InStore_02_ArmToP1()
{
SendCmd(GetCmd_Standby());
}
private void InStore_03_MoveAxisToInlet()
{
MoveAxis.AbsMove(MoveInfo, Config.MoveAxis_P2_Inlet, Config.MoveAxis_P2_Inlet_Speed);
}
private bool InStore_04_CheckInletState()
{
if (IOValue(IO_Type.Inlet_TrayCheck).Equals(IO_VALUE.HIGH))
return true;
return false;
}
private void InStore_05_ArmToTrayLow()
{
SendCmd(GetCmd_InletLow());
}
private void InStore_06_CompressTray()
{
SendCmd(GetCmd_InletUp());
CompressAxis.AbsMove(MoveInfo, Config.CompressAxis_P4, Config.CompressAxis_P4_Speed);
}
private void InStore_07_ArmBackToP1()
{
SendCmd(GetCmd_Standby());
}
private void InStore_08_MoveAxisToStore()
{
MoveAxisToStore();
}
/// <summary>
/// 检查当前仓门口是否可用
/// </summary>
/// <returns></returns>
private bool InStore_09_CheckStoreState()
{
return true;
}
private void InStore_10_ArmToStoreDoorHigh()
{
SendCmd(GetCmd_StoreHigh(targetIndex));
}
private void InStore_11_ReleaseTray()
{
SendCmd(GetCmd_StoreDown());
CompressAxis.AbsMove(MoveInfo, Config.CompressAxis_P2, Config.CompressAxis_P2_Speed);
}
private void InStore_12_MoveAxisToNGBox()
{
MoveAxis.AbsMove(MoveInfo, Config.MoveAxis_P4_NGBox, Config.MoveAxis_P4_NGBox_Speed);
}
private bool InStore_13_CheckNGBoxState()
{
if (TrayCntInNGBox >= validityCnt)
return false;
return true;
}
private void InStore_14_ArmToNGBoxHigh()
{
SendCmd(GetCmd_NGBoxHigh());
}
private void InStore_15_ReleaseTray()
{
SendCmd(GetCmd_NGBoxDown());
CompressAxis.AbsMove(MoveInfo, Config.CompressAxis_P2, Config.CompressAxis_P2_Speed);
}
private void InStore_16_ArmBackToP1()
{
SendCmd(GetCmd_Standby());
}
private void InStore_17_Finish()
{
targetIndex = 0;
}
#endregion
}
}
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms.VisualStyles;
namespace OnlineStore.DeviceLibrary
{
partial class RobotEquip
{
#region 出库
private void OutstoreExecute()
{
switch (MoveInfo.MoveStep)
{
case StepEnum.OutStore_01_Wait:
SetBoxStatus(DeviceStatus.OutStoreExecute, RunStatus.Busy, MoveInfo.MoveParam.PosInfo);
NextMoveStep(StepEnum.OutStore_02_ArmToP1, "出库开始,机械臂回待机点");
OutStore_02_ArmToP1();
break;
case StepEnum.OutStore_02_ArmToP1:
NextMoveStep(StepEnum.OutStore_03_MoveAxisToStore, "行走机构到仓门口");
OutStore_03_MoveAxisToStore();
break;
case StepEnum.OutStore_03_MoveAxisToStore:
NextMoveStep(StepEnum.OutStore_04_CheckStoreState, "到达仓门口,检查其状态");
break;
case StepEnum.OutStore_04_CheckStoreState:
if (OutStore_04_CheckStoreState())
{
NextMoveStep(StepEnum.OutStore_05_ArmToStoreDoorLow, "当前仓可取料,机械臂到仓取料低点");
OutStore_05_ArmToStoreDoorLow();
}
break;
case StepEnum.OutStore_05_ArmToStoreDoorLow:
NextMoveStep(StepEnum.OutStore_06_CompressTray, "机械臂到仓取料高点,压紧轴压紧");
OutStore_06_CompressTray();
break;
case StepEnum.OutStore_06_CompressTray:
NextMoveStep(StepEnum.OutStore_07_ArmBackToP1, "在仓门口取料完成,机械臂回待机点");
OutStore_07_ArmBackToP1();
break;
case StepEnum.OutStore_07_ArmBackToP1:
NextMoveStep(StepEnum.OutStore_08_MoveAxisToOutlet, "行走机构到出料口");
OutStore_08_MoveAxisToOutlet();
break;
case StepEnum.OutStore_08_MoveAxisToOutlet:
NextMoveStep(StepEnum.OutStore_09_CheckOutletState, "到达出料口,检查其状态:顶升上升且无料盘");
break;
case StepEnum.OutStore_09_CheckOutletState:
if (OutStore_09_CheckOutletState())
{
NextMoveStep(StepEnum.OutStore_10_ArmToTrayHigh, "机械臂到出料口放料高点");
OutStore_10_ArmToTrayHigh();
}
break;
case StepEnum.OutStore_10_ArmToTrayHigh:
NextMoveStep(StepEnum.OutStore_11_ReleaseTray, "机械臂到出料口放料低点,压紧轴张开");
OutStore_11_ReleaseTray();
break;
case StepEnum.OutStore_11_ReleaseTray:
NextMoveStep(StepEnum.OutStore_12_ArmBackToP1, "在出料口放料完成,机械臂回待机点");
OutStore_12_ArmBackToP1();
break;
case StepEnum.OutStore_12_ArmBackToP1:
NextMoveStep(StepEnum.OutStore_13_Finish, "出库结束");
break;
case StepEnum.OutStore_13_Finish:
MoveInfo.EndMove();
break;
}
}
private void OutStore_02_ArmToP1()
{
SendCmd(GetCmd_Standby());
}
private void OutStore_03_MoveAxisToStore()
{
MoveAxisToStore();
}
private bool OutStore_04_CheckStoreState()
{
return true;
}
private void OutStore_05_ArmToStoreDoorLow()
{
SendCmd(GetCmd_StoreLow(targetIndex));
}
private void OutStore_06_CompressTray()
{
SendCmd(GetCmd_StoreUp());
CompressAxis.AbsMove(MoveInfo, Config.CompressAxis_P4, Config.CompressAxis_P4_Speed);
}
private void OutStore_07_ArmBackToP1()
{
SendCmd(GetCmd_Standby());
}
private void OutStore_08_MoveAxisToOutlet()
{
MoveAxis.AbsMove(MoveInfo, Config.MoveAxis_P3_Outlet, Config.MoveAxis_P3_Outlet_Speed);
}
private bool OutStore_09_CheckOutletState()
{
if (IOValue(IO_Type.Outlet_JackUpSig).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.Outlet_TrayCheck1).Equals(IO_VALUE.LOW))
{
return true;
}
return false;
}
private void OutStore_10_ArmToTrayHigh()
{
SendCmd(GetCmd_OutletHigh());
}
private void OutStore_11_ReleaseTray()
{
SendCmd(GetCmd_OutletDown());
CompressAxis.AbsMove(MoveInfo,Config.CompressAxis_P2, Config.CompressAxis_P2_Speed);
}
private void OutStore_12_ArmBackToP1()
{
SendCmd(GetCmd_Standby());
}
#endregion
}
}
...@@ -100,5 +100,14 @@ namespace OnlineStore.DeviceLibrary.IO ...@@ -100,5 +100,14 @@ namespace OnlineStore.DeviceLibrary.IO
HCBoardManager.SetBitDO((short)index, v); HCBoardManager.SetBitDO((short)index, v);
} }
/// <summary>
/// 获取模拟量值
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public override int GetAdVal(int index)
{
return (int)HCBoardManager.GetAdVal((short)index);
}
} }
} }
...@@ -207,6 +207,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -207,6 +207,15 @@ namespace OnlineStore.DeviceLibrary
} }
CloseDeviceDO(DoList); CloseDeviceDO(DoList);
} }
/// <summary>
/// 获取模拟量值
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public static int GetADVal(int index)
{
return instance.GetAdVal(index);
}
#endregion #endregion
public static void Init() public static void Init()
{ {
...@@ -234,6 +243,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,6 +243,6 @@ namespace OnlineStore.DeviceLibrary
public abstract void CloseAllConnection(); public abstract void CloseAllConnection();
//public abstract bool IsConnect(string ip); //public abstract bool IsConnect(string ip);
public abstract int GetAdVal(int index);
} }
} }
...@@ -9,67 +9,55 @@ namespace OnlineStore.DeviceLibrary ...@@ -9,67 +9,55 @@ namespace OnlineStore.DeviceLibrary
{ {
public class BufferDataManager public class BufferDataManager
{ {
private static InOutPosInfo aInStoreInfo=null; private static InOutPosInfo trayInRobotInfo = null;
private static InOutPosInfo aOutStoreInfo = null; private static InOutPosInfo trayInOutletInfo = null;
private static InOutPosInfo bInStoreInfo = null; private static List<InOutPosInfo> traysInNGBoxInfo = null;
private static InOutPosInfo bOutStoreInfo = null;
/// <summary> /// <summary>
/// A进料上暂存区料盘信息,null时无料 ///机器人夹爪上的料盘信息,null时无料
/// </summary> /// </summary>
public static InOutPosInfo AInStoreInfo public static InOutPosInfo TrayInRobotInfo
{ {
get { return aInStoreInfo; } get { return trayInRobotInfo; }
set set
{ {
aInStoreInfo = value; trayInRobotInfo = value;
SaveData(Setting_Init.AInStoreInfo, value); SaveData(Setting_Init.TrayInRobotInfo, value);
} }
} }
/// <summary> public static InOutPosInfo TrayInOutletInfo
/// A出料下暂存区料盘信息,null时无料
/// </summary>
public static InOutPosInfo AOutStoreInfo
{ {
get { return aOutStoreInfo; } get { return trayInOutletInfo; }
set set
{ {
aOutStoreInfo = value; trayInOutletInfo = value;
SaveData(Setting_Init.AOutStoreInfo, value); SaveData(Setting_Init.TrayInOutletInfo, value);
} }
} }
/// <summary> /// <summary>
/// B进料上暂存区料盘信息,null时无料 /// NG箱里的料盘信息
/// </summary> /// </summary>
public static InOutPosInfo BInStoreInfo public static List<InOutPosInfo> TraysInNGBoxInfo
{ {
get { return bInStoreInfo; } get { return traysInNGBoxInfo; }
set private set { traysInNGBoxInfo = value;}
{
bInStoreInfo = value;
SaveData(Setting_Init.BInStoreInfo, value);
}
} }
/// <summary> public static void AddTrayInNGBox(InOutPosInfo inOutPosInfo)
/// B出料下暂存区料盘信息,null时无料
/// </summary>
public static InOutPosInfo BOutStoreInfo
{ {
get { return bOutStoreInfo; } traysInNGBoxInfo.Add(inOutPosInfo);
set SaveData(Setting_Init.TraysInNGBoxInfo, traysInNGBoxInfo);
{
bOutStoreInfo = value;
SaveData(Setting_Init.BOutStoreInfo, value);
}
} }
public static void ClearTraysInNGBox()
{
public static void InitData() if (traysInNGBoxInfo == null)
return;
traysInNGBoxInfo.Clear();
SaveData(Setting_Init.TraysInNGBoxInfo, traysInNGBoxInfo);
}
public static void InitData()
{ {
AInStoreInfo = LoadInoutPosInfo(Setting_Init.AInStoreInfo); TrayInRobotInfo = LoadInoutPosInfo(Setting_Init.TrayInRobotInfo);
AOutStoreInfo = LoadInoutPosInfo(Setting_Init.AOutStoreInfo); TraysInNGBoxInfo = LoadNGBoxPosInfos(Setting_Init.TraysInNGBoxInfo);
BInStoreInfo = LoadInoutPosInfo(Setting_Init.BInStoreInfo); TrayInOutletInfo = LoadInoutPosInfo(Setting_Init.TrayInOutletInfo);
BOutStoreInfo = LoadInoutPosInfo(Setting_Init.BOutStoreInfo);
} }
private static InOutPosInfo LoadInoutPosInfo(string configStr) private static InOutPosInfo LoadInoutPosInfo(string configStr)
{ {
...@@ -78,13 +66,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,13 +66,26 @@ namespace OnlineStore.DeviceLibrary
{ {
InOutPosInfo ainPos = JsonHelper.DeserializeJsonToObject<InOutPosInfo>(saveData); InOutPosInfo ainPos = JsonHelper.DeserializeJsonToObject<InOutPosInfo>(saveData);
if (ainPos != null && (!ainPos.barcode.Equals("")) && (!ainPos.PosId.Equals(""))) if (ainPos != null && (!ainPos.barcode.Equals("")) && (!ainPos.PosId.Equals("")))
{ {
return ainPos; return ainPos;
} }
} }
return null; return null;
} }
public static T LoadData<T>(string configStr)where T:class private static List<InOutPosInfo> LoadNGBoxPosInfos(string configStr)
{
string saveData = ConfigAppSettings.GetValue(configStr);
if (!String.IsNullOrEmpty(saveData))
{
List<InOutPosInfo> ainPos = JsonHelper.DeserializeJsonToList<InOutPosInfo>(saveData);
if (ainPos != null)
{
return ainPos;
}
}
return new List<InOutPosInfo>();
}
public static T LoadData<T>(string configStr) where T : class
{ {
string saveData = ConfigAppSettings.GetValue(configStr); string saveData = ConfigAppSettings.GetValue(configStr);
if (!String.IsNullOrEmpty(saveData)) if (!String.IsNullOrEmpty(saveData))
...@@ -105,6 +106,5 @@ namespace OnlineStore.DeviceLibrary ...@@ -105,6 +106,5 @@ namespace OnlineStore.DeviceLibrary
ConfigAppSettings.SaveValue(configStr, jsonData); ConfigAppSettings.SaveValue(configStr, jsonData);
LogUtil.info($"保存配置:[{ configStr}]=[{jsonData }]"); LogUtil.info($"保存配置:[{ configStr}]=[{jsonData }]");
} }
} }
} }
...@@ -27,8 +27,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,8 +27,8 @@ namespace OnlineStore.DeviceLibrary
private static bool isInit = false; private static bool isInit = false;
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals(""); public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public static XLRStoreBean XLRStore = null; public static ClientBean Client = null;
public static XLRStore_Config Config = null; public static Client_Config Config = null;
public static Dictionary<int, DeviceConfig> allConfigMap = null; public static Dictionary<int, DeviceConfig> allConfigMap = null;
public StoreManager() public StoreManager()
{ {
...@@ -93,35 +93,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -93,35 +93,19 @@ namespace OnlineStore.DeviceLibrary
string appPath = Application.StartupPath; string appPath = Application.StartupPath;
string CID = ConfigAppSettings.GetValue(Setting_Init.Line_CID); string CID = ConfigAppSettings.GetValue(Setting_Init.Line_CID);
string storeConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_XLRStore); string storeConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Client);
Config = CSVConfigReader.LoadBoxConfig(0, CID, DeviceType.Store, storeConfigPath); Config = CSVConfigReader.LoadBoxConfig(0, CID, DeviceType.Store, storeConfigPath);
allConfigMap.Add(0, Config); allConfigMap.Add(0, Config);
string inputConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input); allConfigMap.Add(1, Config);
allConfigMap.Add(2, Config);
InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(1, DeviceType.InputEquip, inputConfigPath); allConfigMap.Add(3, Config);
inputConfig.CID = CID; Client = new ClientBean(Config);
inputConfig.SetIO(1); LogUtil.info("加载完成!");
allConfigMap.Add(1, inputConfig);
string boxPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box);
BoxEquip_Config boxConfig = CSVConfigReader.LoadBoxConfig(2, DeviceType.BoxEquip, boxPath);
boxConfig.SetIO(2);
boxConfig.CID = CID;
allConfigMap.Add(2, boxConfig);
//加载仓位点位
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_BoxPosition);
CSVPositionReader<BoxPosition>.AddCSVFile(positionConfigFile);
//加载抽屉点位
//string drawConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_DrawerPosition);
//CSVPositionReader<DrawerPosition>.AddCSVFile(drawConfigFile);
XLRStore = new XLRStoreBean(Config, inputConfig, boxConfig);
LogUtil.info("加载 完成!");
return true; return true;
} }
else if (XLRStore != null) else if (Client != null)
{ {
return true; return true;
} }
...@@ -153,17 +137,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,17 +137,17 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
public static bool SaveBoxConfig(BoxEquip_Config config) public static bool SaveClientConfig(Client_Config config)
{ {
try try
{ {
//位置配置到文件中 //位置配置到文件中
string appPath = Application.StartupPath; string appPath = Application.StartupPath;
string boxConfig = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box); string boxConfig = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Client);
allConfigMap[config.Id] = config; allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(boxConfig, config, typeof(BoxEquip_Config)); bool result = CSVConfigReader.SaveConfig(boxConfig, config, typeof(Client_Config));
if (!result) if (!result)
{ {
LogUtil.error("保存配置文件失败:" + boxConfig); LogUtil.error("保存配置文件失败:" + boxConfig);
...@@ -177,26 +161,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -177,26 +161,6 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
} }
public static void SaveInputEquipConfig(InputEquip_Config config)
{
try
{
//位置配置到文件中
string appPath = Application.StartupPath;
string configFile = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input);
allConfigMap[config.Id] = config;
bool result = CSVConfigReader.SaveConfig(configFile, config, typeof(InputEquip_Config));
if (!result)
{
LogUtil.error("保存配置文件失败:" + configFile);
}
}
catch (Exception ex)
{
LogUtil.error("出错:", ex);
}
}
private static List<int> trayHeightList = new List<int>(); private static List<int> trayHeightList = new List<int>();
......
...@@ -401,8 +401,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -401,8 +401,8 @@ namespace OnlineStore.DeviceLibrary
} }
protected void MoveLog(string msg) protected void MoveLog(string msg)
{ {
string posId = (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PosInfo != null) ? " [" + MoveInfo.MoveParam.PosInfo.PosId + "]" : ""; //string posId = (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PosInfo != null) ? " [" + MoveInfo.MoveParam.PosInfo.PosId + "]" : "";
//string posId = (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PosInfo != null) ? " [" + MoveInfo.MoveParam.PosInfo.PosId + "][" + MoveInfo.MoveParam.PosInfo.barcode + "]" : ""; string posId = (MoveInfo.MoveParam != null && MoveInfo.MoveParam.PosInfo != null) ? " [" + MoveInfo.MoveParam.PosInfo.PosId + "][" + MoveInfo.MoveParam.PosInfo.barcode + "]" : "";
LogUtil.info(Name + " " + posId + msg); LogUtil.info(Name + " " + posId + msg);
} }
......
...@@ -318,7 +318,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -318,7 +318,12 @@ namespace OnlineStore.DeviceLibrary
wait.WaitType = WaitEnum.W102_FeedScanCode; wait.WaitType = WaitEnum.W102_FeedScanCode;
return wait; return wait;
} }
public static WaitResultInfo WaitRobotMove()
{
WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = WaitEnum.W201_RobotMove;
return wait;
}
public string ToStr() public string ToStr()
{ {
if (WaitType.Equals(WaitEnum.W001_AxisMove)) if (WaitType.Equals(WaitEnum.W001_AxisMove))
...@@ -361,7 +366,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -361,7 +366,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return "入料模块扫码"; return "入料模块扫码";
} }
else if (WaitType.Equals(WaitEnum.W201_RobotMove))
{
return "机器人移动";
}
else else
{ {
return "Wait位置类型:WaitType=【" + WaitType + "】"; return "Wait位置类型:WaitType=【" + WaitType + "】";
...@@ -456,7 +464,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -456,7 +464,10 @@ namespace OnlineStore.DeviceLibrary
/// 入料模块扫码 /// 入料模块扫码
/// </summary> /// </summary>
internal static int W102_FeedScanCode = 102; internal static int W102_FeedScanCode = 102;
/// <summary>
/// 机器人移动完成
/// </summary>
internal static int W201_RobotMove = 201;
} }
public enum MoveType public enum MoveType
{ {
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.12" targetFramework="net461" /> <package id="log4net" version="2.0.14" targetFramework="net48" />
</packages> </packages>
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class AutoInoutInfo
{
/// <summary>
/// 入库完成后自动出库,出库完成后自动入库
/// </summary>
public bool autoNext = false;
/// <summary>
/// 自动出入库间隔
/// </summary>
private int Jiange = 3;
private int positionIndex = 0;
public string autoMsg = "";
private int startIndex = -1;
private string shelfPosId = "";
#region 出入库参数
/// <summary>
/// 当前出入库的次数,超过配置的数量时,需要自动重置一下,再进行出入库
/// </summary>
internal int CurrInOutCount = 0;
internal int CurrInOutACount = 0;
#endregion
public void StartAuto(int jiange, int currIndex, string shelfPosId)
{
autoNext = true;
Jiange = jiange;
positionIndex = currIndex;
startIndex = currIndex;
this.shelfPosId = shelfPosId;
}
public void StopAuto()
{
autoNext = false;
}
internal void InOutEndProcess(BoxEquip boxBean, MoveType storeMoveType)
{
try
{
//是否自动进入出库状态
if (!autoNext)
{
return;
}
if (storeMoveType.Equals(MoveType.InStore))
{
int newIndex = positionIndex - 1;
if (newIndex < 0)
{
if (startIndex >= 0 && startIndex < boxBean.PositionNumList.Count)
{
newIndex = startIndex;
boxBean.LogInfo("下一个索引不存在,重新开始自动出入库,索引【" + startIndex + "】");
}
else
{
autoNext = false;
autoMsg = "自动出入库结束!";
boxBean.LogInfo("下一个索引不存在,自动 出入库结束!");
}
}
else
{
positionIndex = newIndex;
string posid = boxBean.PositionNumList[positionIndex];
InOutParam param = new InOutParam(new InOutPosInfo("AAAA", posid));
//param.NeedOutShelf = false;
//param.NeedEnterShelf = false;
//判断是否需要重置
//if (CurrInOutACount >= boxBean.Config.Box_ResetACount)
//{
// boxBean.LogInfo("自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
// boxBean.Reset(false);
// autoMsg = "自动出库:" + posid;
// boxBean.waitOutStoreList.Enqueue(param);
//}
//else
{
boxBean.LogInfo("自动进入下一个出库:posid=" + posid);
autoMsg = "自动出库:" + posid;
boxBean.StartOutstore(param);
}
}
}
else if (storeMoveType.Equals(MoveType.OutStore))
{
int newIndex = positionIndex - Jiange;
if (newIndex < 0)
{
if (startIndex >= 0 && startIndex < boxBean.PositionNumList.Count)
{
newIndex = startIndex;
boxBean.LogInfo("下一个索引不存在,重新开始自动出入库,索引【" + startIndex + "】");
}
else
{
autoNext = false;
autoMsg = "自动出入库结束!";
boxBean.LogInfo("下一个索引不存在,自动 出入库结束!");
}
}
else
{
string posid = boxBean.PositionNumList[newIndex];
InOutParam param = new InOutParam(new InOutPosInfo("AAAA", posid));
// param.NeedOutShelf = false;
//判断是否需要重置
//if (CurrInOutACount >= boxBean.Config.Box_ResetACount)
//{
// boxBean.LogInfo("自动进入下一个入库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把入库信息存入排队列表中");
// boxBean.Reset(false);
// autoMsg = "自动入库:" + posid;
// boxBean.waitOutStoreList.Enqueue(param);
//}
//else
{
boxBean.LogInfo("自动进入下一个入库:posid=" + posid);
autoMsg = "自动入库:" + posid;
boxBean.StartInstore(param);
}
}
}
}
catch (Exception ex)
{
LogUtil.error(boxBean.Name + "InOutEndProcess ERROR:" + ex.ToString());
}
}
internal void ClearCount()
{
CurrInOutACount = 0;
CurrInOutCount = 0;
}
}
}
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public partial class BoxEquip
{
/// <summary>
/// 图像信息
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct EyemImage
{
/// <summary>
/// 地址
/// </summary>
public IntPtr ucpImage;
/// <summary>
/// 图像内存 x 方向大小
/// </summary>
public int iWidth;
/// <summary>
/// 图像内存 y 方向大小
/// </summary>
public int iHeight;
/// <summary>
/// iDepth:
/// uint8_t 取值范围[0, 255], iDepth = 0(常用,解码图像一般为此种格式)
/// int8_t 取值范围[-128, 127], iDepth = 1
/// uint16_t 取值范围[0, 56635], iDepth = 2(常用,点料机图像一般为此种格式)
/// int16_t 取值范围[-32768, 32767], iDepth = 3
/// int32_t 取值范围[-2147483648, 2147483647], iDepth = 4
/// float_t 取值范围[-3.4028235E38, 3.4028235E38], iDepth = 5
/// double_t 取值范围[-1.7E-308, 1.7E+308], iDepth = 6
/// </summary>
public int iDepth;
/// <summary>
/// 彩色图 iChannels=3或4(比RGB多了Alpha通道),一般为3
/// 灰度图 iChannels = 1
/// </summary>
public int iChannels; // 图像通道数
}
[DllImport("libresnet.dll", CharSet = CharSet.None)]
unsafe internal static extern int match_feature(string output_path, EyemImage tpImage, char* partnumber, bool is_enroll, out float score);
[DllImport("libresnet.dll", CharSet = CharSet.None, CallingConvention = CallingConvention.Cdecl)]
internal static extern int enroll_feature(string input_path, string output_path);
string input_path = "./Tongs/test_huanhong";
string output_path = "./Tongs/feature/";
string temp_path = "./Tongs/temp/";
//学习范围
Rectangle rectangle = new Rectangle(564, 953, 379, 107);
/// <summary>
/// 匹配抓手外观类型
/// </summary>
/// <param name="filename">x光图像文件名</param>
/// <param name="pn">返回标识</param>
/// <returns>匹配分值 -1:匹配失败 >=0:匹配成功</returns>
unsafe float match(string filename, out string pn, out Bitmap bitmap)
{
bitmap = null;
pn = "";
try
{
Directory.CreateDirectory(input_path);
Directory.CreateDirectory(output_path);
Directory.CreateDirectory(temp_path);
Bitmap a = new Bitmap(filename);
Bitmap b = new Bitmap(224, 224, PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(b);
g.DrawImage(a, new Rectangle(0, 0, 224, 224), rectangle, GraphicsUnit.Pixel);
g.Save();
EyemImage eyemImage1 = new EyemImage();
eyemImage1.iWidth = 224;
eyemImage1.iHeight = 224;
eyemImage1.iChannels = 4;
eyemImage1.iDepth = 0;
BitmapData bitmapData = b.LockBits(new Rectangle(0, 0, 224, 224), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
eyemImage1.ucpImage = bitmapData.Scan0;
char* p = (char*)Marshal.AllocHGlobal(100);
match_feature(output_path, eyemImage1, (char*)p, false, out float score);
b.UnlockBits(bitmapData);
pn = Marshal.PtrToStringAnsi((IntPtr)p);
Marshal.FreeHGlobal((IntPtr)p);
bitmap = b;
score = score * 100;
return score;
}
catch(Exception e)
{
Common.LogUtil.error("match",e);
}
return 0;
}
public bool MatchAndSaveImg(Bitmap bitmap,string imgname)
{
if (bitmap == null)
return false;
try
{
var score = match(bitmap, out string pn, out Bitmap bitmap1);
var pnpath = Path.Combine($"{temp_path}/{DateTime.Now.ToString("yyyyMMdd")}/", score > Config.TongsDetectThreshold ? "OK" : "NG");
Directory.CreateDirectory(pnpath);
var simpletemp = Path.Combine(pnpath, $"{imgname}-{score.ToString("##.##")}-{pn}.png");
bitmap.Save(simpletemp, ImageFormat.Png);
bitmap.Dispose();
return score > Config.TongsDetectThreshold;
}
catch(Exception e)
{
Common.LogUtil.error("MatchAndSaveImg", e);
}
return false;
}
/// <summary>
/// 匹配抓手外观类型
/// </summary>
/// <param name="filename">x光图像文件名</param>
/// <param name="pn">返回标识</param>
/// <returns>匹配分值 -1:匹配失败 >=0:匹配成功</returns>
public unsafe float match(Bitmap inputImg, out string pn, out Bitmap bitmap)
{
Directory.CreateDirectory(input_path);
Directory.CreateDirectory(output_path);
Directory.CreateDirectory(temp_path);
bitmap = null;
pn = "";
if (inputImg == null)
return 0;
try
{
Bitmap b = new Bitmap(224, 224, PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(b);
g.DrawImage(inputImg, new Rectangle(0, 0, 224, 224), rectangle, GraphicsUnit.Pixel);
g.Save();
EyemImage eyemImage1 = new EyemImage();
eyemImage1.iWidth = 224;
eyemImage1.iHeight = 224;
eyemImage1.iChannels = 4;
eyemImage1.iDepth = 0;
BitmapData bitmapData = b.LockBits(new Rectangle(0, 0, 224, 224), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
eyemImage1.ucpImage = bitmapData.Scan0;
char* p = (char*)Marshal.AllocHGlobal(100);
match_feature(output_path, eyemImage1, (char*)p, false, out float score);
b.UnlockBits(bitmapData);
pn = Marshal.PtrToStringAnsi((IntPtr)p);
Marshal.FreeHGlobal((IntPtr)p);
bitmap = b;
score = score * 100;
return score;
}
catch(Exception e)
{
Common.LogUtil.error("match", e);
}
return 0;
}
/// <summary>
/// 学习抓手外观
/// </summary>
/// <param name="filename">x光图像</param>
/// <param name="pn">标识符</param>
public unsafe void learn(string filename, string pn)
{
try
{
Directory.CreateDirectory(input_path);
Directory.CreateDirectory(output_path);
Directory.CreateDirectory(temp_path);
Bitmap a = new Bitmap(filename);
Bitmap b = new Bitmap(224, 224, PixelFormat.Format32bppRgb);
Graphics g = Graphics.FromImage(b);
g.DrawImage(a, new Rectangle(0, 0, 224, 224), rectangle, GraphicsUnit.Pixel);
g.Save();
EyemImage eyemImage1 = new EyemImage();
eyemImage1.iWidth = 224;
eyemImage1.iHeight = 224;
eyemImage1.iChannels = 3;
eyemImage1.iDepth = 0;
BitmapData bitmapData = b.LockBits(new Rectangle(0, 0, 224, 224), ImageLockMode.ReadWrite, PixelFormat.Format32bppRgb);
eyemImage1.ucpImage = bitmapData.Scan0;
char* p = (char*)Marshal.StringToHGlobalAnsi(pn).ToPointer();
match_feature(output_path, eyemImage1, (char*)p, true, out _);
b.UnlockBits(bitmapData);
b.Dispose();
}
catch(Exception e)
{
Common.LogUtil.error("learn",e);
}
}
/// <summary>
/// 学习抓手外观
/// </summary>
/// <param name="filename">x光图像</param>
/// <param name="pn">标识符</param>
public unsafe void learn(Bitmap inputimg, string pn)
{
if (inputimg == null)
return;
try
{
Directory.CreateDirectory(input_path);
Directory.CreateDirectory(output_path);
Directory.CreateDirectory(temp_path);
Bitmap b = new Bitmap(224, 224, PixelFormat.Format32bppRgb);
Graphics g = Graphics.FromImage(b);
g.DrawImage(inputimg, new Rectangle(0, 0, 224, 224), rectangle, GraphicsUnit.Pixel);
g.Save();
EyemImage eyemImage1 = new EyemImage();
eyemImage1.iWidth = 224;
eyemImage1.iHeight = 224;
eyemImage1.iChannels = 3;
eyemImage1.iDepth = 0;
BitmapData bitmapData = b.LockBits(new Rectangle(0, 0, 224, 224), ImageLockMode.ReadWrite, PixelFormat.Format32bppRgb);
eyemImage1.ucpImage = bitmapData.Scan0;
char* p = (char*)Marshal.StringToHGlobalAnsi(pn).ToPointer();
match_feature(output_path, eyemImage1, (char*)p, true, out _);
b.UnlockBits(bitmapData);
b.Dispose();
}
catch(Exception e)
{
Common.LogUtil.error("learn",e);
}
}
}
}
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class HumitureBean
{
private string PortName = "";
private string Name = "";
public HumitureParam LastData = new HumitureParam(0, 0);
internal HumitureBean(string port,string deviceName)
{
this.Name = deviceName;
this.PortName = port;
}
public HumitureParam QueryData()
{
HumitureParam param = HumitureController.QueryData(PortName);
LastData = param;
return LastData;
}
internal void ProcessHumidityCMD(Operation resultOperation)
{
Dictionary<string, string> data = resultOperation.data;
if (data != null && data.ContainsKey(ParamDefine.maxHumidity) && data.ContainsKey(ParamDefine.maxTemperature))
{
string maxHumidity = data[ParamDefine.maxHumidity];
string maxTemp = data[ParamDefine.maxTemperature];
LogUtil.info( Name+"收到服务器温湿度预警值:maxHumidity=" + maxHumidity + ",maxTemperature=" + maxTemp);
try
{
this.Max_Humidity = (float)Convert.ToDouble(maxHumidity);
this.Max_Temperature = (float)Convert.ToDouble(maxTemp);
LogUtil.info(Name+"保存温湿度预警值:Max_Humidity=" + Max_Humidity + ",Max_Temperature=" + Max_Temperature);
}
catch (Exception ex)
{
LogUtil.error(Name+"转换温湿度失败:" + ex.ToString());
}
}
}
#region 温湿度处理
/// <summary>
/// 湿度标准,超过后需要报警
/// </summary>
private float Max_Humidity = 0;
/// <summary>
/// 温度标准,超过后需要报警
/// </summary>
private float Max_Temperature = 0;
private bool IsInBlowing = false;
private DateTime LastBeginBlowTime = DateTime.Now;
private DateTime LastEndBlowTime = new DateTime(1997, 1, 1);
private DateTime preLogTime = DateTime.Now;
public bool TempOrHumidityIsAlarm = false;
public DateTime TempAlarmTime = DateTime.Now;
private float StartBlowValue = (float)ConfigAppSettings.GetNumValue(Setting_Init.StartBlowValue);
private float StopBlowValue = (float)ConfigAppSettings.GetNumValue(Setting_Init.StopBlowValue);
public string currTempStr = "";
internal void HumidityProcess(BoxEquip box)
{
try
{
if ((DateTime.Now - preLogTime).TotalSeconds > (8+box.DeviceID))
{
preLogTime = DateTime.Now;
//用最大的湿度判断是否需要吹气,开始吹气的值=发过来的值-4
//温湿度
//ASTemperateParam param = HumitureServer.GetTemperateParam(Config.GetTempAddrList());
HumitureParam param = QueryData();
double humidity = 0;
double temp = 0;
if (param != null)
{
humidity = param.Humidity;
temp = param.Temperate;
currTempStr = Name + ("湿度:" + humidity.ToString() + ",温度:" + temp);
}
//double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList());
double currMaxHumidity = param.Humidity;
float startBlowHumidity = Max_Humidity - StartBlowValue;
float stopBlowHumidity = Max_Humidity - StopBlowValue;
//判断是否需要吹气
if (startBlowHumidity > 0 && startBlowHumidity < currMaxHumidity && IsInBlowing.Equals(false))
{
//判断是否距离上次结束指定的时间
TimeSpan span = DateTime.Now - LastEndBlowTime;
if (span.TotalMinutes > box.Config.BlowAir_Interval)
{
LogUtil.info(Name + "当前最大湿度:" + currMaxHumidity.ToString() + ",开始吹气湿度:" + startBlowHumidity + ",当前不在吹气中,且间隔超过" + box.Config.BlowAir_Interval + "分钟,开始吹气!");
IsInBlowing = true;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.HIGH);
LastBeginBlowTime = DateTime.Now;
LastEndBlowTime = DateTime.Now;
}
}
if (IsInBlowing && stopBlowHumidity > currMaxHumidity)
{
LogUtil.info(Name + "当前最大湿度:" + currMaxHumidity.ToString() + ",停止吹气湿度:" + stopBlowHumidity + ",停止吹气!");
IsInBlowing = false;
// box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
LastEndBlowTime = DateTime.Now;
}
if (IsInBlowing)
{
//判断是否需要结束吹气
TimeSpan span = DateTime.Now - LastBeginBlowTime;
if (span.TotalMinutes > box.Config.BlowAir_Time)
{
LogUtil.info(Name + "已经吹气" + span.TotalMinutes + "分钟,超过配置的吹气时间" + box.Config.BlowAir_Time + "分钟,停止吹气!");
IsInBlowing = false;
//Thread.Sleep(100);
// box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
LastEndBlowTime = DateTime.Now;
}
}
bool needAlarm = false;
//如果开始吹气并且当前达到报警值
if (IsInBlowing && humidity > Max_Humidity)
{
needAlarm = true;
}
else if (temp > Max_Temperature && Max_Temperature > 0)
{
LogUtil.info(Name + "当前温度【" + param.Temperate + "】超过最高温度【" + Max_Temperature + "】,开始报警!");
needAlarm = true;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
}
else if (temp < Max_Temperature)
{
if (IsInBlowing.Equals(false) && TempOrHumidityIsAlarm)
{
LogUtil.info(Name + "不在吹气中,且当前温度【" + param.Temperate + "】低于【" + Max_Temperature + "】,关闭报警!");
TempOrHumidityIsAlarm = false;
//Thread.Sleep(100);
//box.IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
}
}
else
{
TempOrHumidityIsAlarm = false;
}
if (needAlarm)
{
HTAlarm();
}
}
}
catch (Exception ex)
{
LogUtil.error(Name + "HumidityProcess出错:" + ex.ToString());
}
}
private void HTAlarm()
{
if (TempOrHumidityIsAlarm)
{
return;
}
TempAlarmTime = DateTime.Now;
TempOrHumidityIsAlarm = true;
}
internal bool NeedGetTem()
{
if (Max_Humidity <= 0 || (Max_Temperature <= 0))
{
return true;
}
return false;
}
#endregion
}
public class HumitureParam
{
public HumitureParam(string clientipe, string add, string pwd, double wendu, double shidu, DateTime updateTime)
{
this.IpAddress = clientipe;
this.DeviceAddress = add;
this.Password = pwd;
this.Temperate = wendu;
this.Humidity = shidu;
this.UpdateTime = updateTime;
}
//获取平均值时使用此 参数,只做显示用
public HumitureParam(double wendu, double shidu)
{
this.IpAddress = "";
this.DeviceAddress = "";
this.Password = "";
this.Temperate = wendu;
this.Humidity = shidu;
this.UpdateTime = DateTime.Now;
}
/// <summary>
/// 判断值是否在有效期内。默认有效期是一分钟
/// </summary>
/// <returns></returns>
public bool IsValid()
{
TimeSpan span = DateTime.Now - UpdateTime;
if (span.TotalMinutes > 3)
{
return false;
}
return true;
}
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// IP地址
/// </summary>
public string IpAddress { get; set; }
/// <summary>
/// 设备地址
/// </summary>
public string DeviceAddress { get; set; }
/// <summary>
/// 访问密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 温度
/// </summary>
public double Temperate { get; set; }
/// <summary>
/// 湿度
/// </summary>
public double Humidity { get; set; }
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!