Commit 1a885adb 张东亮

新配置导入小软件

1 个父辈 387ece28
......@@ -11,10 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceLibrary", "DeviceLibr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TheMachine", "TheMachine\TheMachine.csproj", "{61FDFF14-8BB7-439A-85A0-592E3011F4C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "旧超级配置读取软件", "旧超级配置读取软件\旧超级配置读取软件.csproj", "{433A95DB-C45D-4BEF-B023-D40EFD99DFA1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImgCheckReel", "ImgCheckReel\ImgCheckReel.csproj", "{2BA382F5-D68E-4B03-B6E0-A75662B3938A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChangeConfigKey", "ChangeConfigKey\ChangeConfigKey.csproj", "{595AEE30-1B33-4C17-BA74-4AA13AC0DF55}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -37,14 +37,14 @@ Global
{61FDFF14-8BB7-439A-85A0-592E3011F4C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61FDFF14-8BB7-439A-85A0-592E3011F4C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61FDFF14-8BB7-439A-85A0-592E3011F4C4}.Release|Any CPU.Build.0 = Release|Any CPU
{433A95DB-C45D-4BEF-B023-D40EFD99DFA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{433A95DB-C45D-4BEF-B023-D40EFD99DFA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{433A95DB-C45D-4BEF-B023-D40EFD99DFA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{433A95DB-C45D-4BEF-B023-D40EFD99DFA1}.Release|Any CPU.Build.0 = Release|Any CPU
{2BA382F5-D68E-4B03-B6E0-A75662B3938A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2BA382F5-D68E-4B03-B6E0-A75662B3938A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2BA382F5-D68E-4B03-B6E0-A75662B3938A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2BA382F5-D68E-4B03-B6E0-A75662B3938A}.Release|Any CPU.Build.0 = Release|Any CPU
{595AEE30-1B33-4C17-BA74-4AA13AC0DF55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{595AEE30-1B33-4C17-BA74-4AA13AC0DF55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{595AEE30-1B33-4C17-BA74-4AA13AC0DF55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{595AEE30-1B33-4C17-BA74-4AA13AC0DF55}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -4,10 +4,10 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{433A95DB-C45D-4BEF-B023-D40EFD99DFA1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>旧超级配置读取软件</RootNamespace>
<AssemblyName>旧超级配置读取软件</AssemblyName>
<ProjectGuid>{595AEE30-1B33-4C17-BA74-4AA13AC0DF55}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ChangeConfigKey</RootNamespace>
<AssemblyName>ChangeConfigKey</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
......@@ -38,38 +38,19 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Common.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Setting_Init.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
......
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace ChangeConfigKey
{
internal class Common
{
static string ConfigDir;
static string SaveDirectory { get { return "SrcConfig"; } }
static string BaseDIr = System.AppDomain.CurrentDomain.BaseDirectory;
public static Dictionary<string, ConfigStruct> configlist = new Dictionary<string, ConfigStruct>();
public static void LoadConfig()
{
int cnt = 1;
ConfigDir = Path.Combine(BaseDIr, SaveDirectory);
if (!Directory.Exists(ConfigDir))
return;
string[] fileslist = Directory.GetFiles(ConfigDir, "*.config");
foreach (string file in fileslist)
{
string filename = Path.GetFileName(file);
string content = File.ReadAllText(file);
XmlDocument xd = new XmlDocument();
bool loaderror = false;
try
{
xd.LoadXml(content);
}
catch (Exception e)
{
//读取异常 尝试加载灾备文件
loaderror = true;
Console.WriteLine($"读取{filename}异常:{e.ToString()}");
}
var crt = xd["config"];
if (crt == null)
continue;
int rootver = 0;
if (xd["config"].Attributes["ver"] != null)
int.TryParse(crt.Attributes["ver"].Value, out rootver);
foreach (XmlNode item in crt.ChildNodes)
{
if (item.Name.ToLower() != "item")
continue;
if (item.Attributes["key"] == null || item.Attributes["value"] == null)
continue;
string key = item.Attributes["key"].Value;
string value = item.Attributes["value"].Value;
int ver = rootver;
if (item.Attributes["ver"] != null)
int.TryParse(item.Attributes["ver"].Value, out ver);
string Comment = "";
if (item.PreviousSibling != null && item.PreviousSibling.NodeType == XmlNodeType.Comment)
{
Comment = item.PreviousSibling.InnerText;
}
if (configlist.ContainsKey(key))
{
if (configlist[key].configVer >= ver) continue;
configlist[key].configVer = ver;
configlist[key].configFile = filename;
configlist[key].Value = value;
configlist[key].Comment = Comment;
}
else
{
var cs = new ConfigStruct();
cs.configFile = filename;
cs.Key = key;
cs.Value = value;
cs.configVer = ver;
cs.Comment = Comment;
configlist.Add(key, cs);
Console.WriteLine($"读取原配置[{cnt++}]:{key}={value}");
}
}
if (!loaderror)
{
//File.Delete(file);
}
}
}
/// <summary>
/// 读取配置
/// </summary>
/// <typeparam name="T">返回类型</typeparam>
/// <param name="key">key</param>
/// <param name="defaultvalue">失败默认值</param>
/// <returns></returns>
public static bool Get<T>(string key, out T val)
{
val = default(T);
if (string.IsNullOrEmpty(key))
return false;
if (configlist.ContainsKey(key))
{
configlist[key].type = typeof(T);
val = (T)TypeDataProcess(typeof(T), configlist[key].Value.ToString(), (object)default(T));
configlist.Remove(key);
Console.WriteLine($"获取到值:{key}={val}");
return true;
}
else
{
return false;
}
}
static object TypeDataProcess(Type t, string data, object defaultvalue)
{
string tname = t.Name;
if (tname == "String")
{
if (data == null)
data = defaultvalue.ToString();
return (object)data.ToString();
}
else if (tname == "Color")
{
return (object)System.Drawing.Color.FromName(data);
}
else if (t.BaseType != null && t.BaseType.Name == "Enum")
{
try
{
return (object)Enum.Parse(t, data.ToString());
}
catch
{
return (object)Enum.Parse(t, Enum.GetNames(t)[0]);
}
}
else if (tname == "Object")
{
return data;
}
else if (tname == "String[]")
{
return data.Split(new char[] { '\n' });
}
else if (tname == "Point")
{
return StringToPoint(data);
}
else if (tname == "Rectangle")
{
return StringToRectangle(data);
}
object obj = Activator.CreateInstance(t);
MethodInfo method = t.GetMethod("TryParse", new Type[] { typeof(String), t.MakeByRefType() });
if (method != null)
{
if (data == null)
{
return defaultvalue;
}
object[] parameters = new object[] { data.ToString(), null };
bool result = (bool)method.Invoke(obj, parameters);
if (result)
{
return parameters[1];
}
else
{
return defaultvalue;
}
}
else
{
throw new Exception("没有找到合适的值转换方法");
}
}
internal class ConfigStruct
{
public string configFile;
//public string configKey;
public string Key;
public string Value;
public int configVer;
public bool haschange = false;
public Type type = typeof(string);
public string Comment = "";
}
internal static Point StringToPoint(string value)
{
try
{
value = value.Trim();
value = value.TrimStart('{');
value = value.TrimEnd('}');
value = value.Trim();
string[] parts = value.Split(',');
var _x = parts[0].Split('=')[1].Trim();
var _y = parts[1].Split('=')[1].Trim();
int x = int.Parse(_x);
int y = int.Parse(_y);
return new Point(x, y);
}
catch
{
return Point.Empty;
}
}
internal static Rectangle StringToRectangle(string value)
{
try
{
value = value.Trim();
value = value.TrimStart('{');
value = value.TrimEnd('}');
value = value.Trim();
string[] parts = value.Split(',');
var _x = parts[0].Split('=')[1].Trim();
var _y = parts[1].Split('=')[1].Trim();
var _w = parts[2].Split('=')[1].Trim();
var _h = parts[3].Split('=')[1].Trim();
int x = int.Parse(_x);
int y = int.Parse(_y);
int w = int.Parse(_w);
int h = int.Parse(_h);
return new Rectangle(x, y, w, h);
}
catch
{
return Rectangle.Empty;
}
}
}
}
......@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("旧超级配置读取软件")]
[assembly: AssemblyTitle("ChangeConfigKey")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("旧超级配置读取软件")]
[assembly: AssemblyProduct("ChangeConfigKey")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("433a95db-c45d-4bef-b023-d40efd99dfa1")]
[assembly: Guid("595aee30-1b33-4c17-ba74-4aa13ac0df55")]
// 程序集的版本信息由下列四个值组成:
//
......
using ConfigHelper;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 旧超级配置读取软件
{
internal static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Config.LoadMyConfig(new Setting_Init().GetType());
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new AdvanceConfigForm());
}
}
}
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace 旧超级配置读取软件.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("旧超级配置读取软件.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace 旧超级配置读取软件.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
using ConfigHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OnlineStore.Common
{
/// <summary>
/// 记录配置的key
/// </summary>
public class Setting_Init
{
[MyConfigComment("当前默认语言")]
public static MyConfig<string> Device_Default_Language = "zh-CN";
[MyConfigComment("系统启动时自动启动料仓,=1时自动启动,并隐藏窗口,=0时不需要")]
public static MyConfig<int> App_AutoRun = 0;
[MyConfigComment("系统主界面标题")]
public static MyConfig<string> App_Title = "SMD BOX MIMO G2";
/// <summary>
/// 摄像机名称
/// </summary>
public static string CameraName = "CameraName";
[MyConfigComment("条码类型")]
public static MyConfig<string> CodeType = "QR Code";
[MyConfigComment("条码解码参数路径")]
public static MyConfig<string> CodeParamPath = "";
[MyConfigComment("筛选条码数量")]
public static MyConfig<int> QRCodeCount = 3;
[MyConfigComment("解码的超时时间")]
public static MyConfig<int> CodeTimeOut = 1000;
/// <summary>
/// 校准库位的料盘信息
/// </summary>
[MyConfigComment("校准库位的料盘信息")]
public static MyConfig<string> FixBuffInfo = "";
[MyConfigComment("进出轴运动负载阈值")]
public static MyConfig<float> Device_InOutMaxLoadRate = 50;
[MyConfigComment("提升轴运动负载阈值")]
public static MyConfig<float> Device_BatchMaxLoadRate = 50;
[MyConfigComment("管理员密码")]
public static MyConfig<string> User_AdminPassword = "123456";
[MyConfigComment("启用管理员密码")]
public static MyConfig<bool> User_Enable = false;
#region 料盘高度计算参数
[MyConfigComment("启用自定义厚度计算策略")]
public static MyConfig<bool> Switch_UseCustHeightList = false;
/// <summary>
/// 宽度15料盘,厚度自减mm
/// </summary>
[MyConfigComment("宽度15料盘,厚度自减mm")]
public static MyConfig<int> Param_CalHeight_Width15HeightSubVal = 2;
/// <summary>
/// 宽度13料盘,厚度自减mm
/// </summary>
[MyConfigComment("宽度13料盘,厚度自减mm")]
public static MyConfig<int> Param_CalHeight_Width13HeightSubVal = 1;
[MyConfigComment("如果计算出的厚度小于指定值,都归类为8mm")]
public static MyConfig<int> Param_CalHeight_Height8MaxVal = 12;
[MyConfigComment("自定义厚度列表")]
public static MyConfig<string[]> Param_CalHeight_HeightList = new string[] { "12=12#16", "16=16#24", "24=24#32", "32=32#44", "44=44#56", "56=56#60" };
#endregion
[MyConfigComment("出库厚度检测下偏差的值")]
public static MyConfig<int> OutstoreHeightCheckLowerDeviation = 5;
[MyConfigComment("出库厚度检测上偏差的值")]
public static MyConfig<int> OutstoreHeightCheckUpperDeviation = 3;
[MyConfigComment("出库料盘定位信号对射触发位置高度偏差")]
public static MyConfig<int> ReelCheckTriggerDeviation = 5;
[MyConfigComment("是否禁止单盘入库")]
public static MyConfig<bool> DisableSingleReelIn = false;
[MyConfigComment("是否启用上料提升轴的料叉检测")]
public static MyConfig<bool> Swicth_BatchFixCheck = false;
[MyConfigComment("料串门光栅触发处理方式:0-设备急停;1-仅料串门停止")]
public static MyConfig<int> StringDoor_SafetyLightCurtainsProcStrategy = 1;
[MyConfigComment("是否启用AGV")]
public static MyConfig<bool> AGV_Enable = false;
[MyConfigComment("AGV服务软件所在电脑IP")]
public static MyConfig<string> AGV_ServerIp = "127.0.0.1";
[MyConfigComment("AGV服务接口")]
public static MyConfig<int> AGV_ServerPort = 12000;
[MyConfigComment("AGV节点编号")]
public static MyConfig<int> AGV_NodeId = 1;
[MyConfigComment("AGV节点名称")]
public static MyConfig<string> AGV_NodeName = "MIMO";
[MyConfigComment("库位高低点最大相差的值")]
public static MyConfig<int> UpDownAxis_Position_MaxRange = 30000;
[MyConfigComment("湿度修正值,写负数 -5等于减5")]
public static MyConfig<int> Device_humidityadjust = 0;
[MyConfigComment("湿度修正最低值,防止修正过头")]
public static MyConfig<int> Device_humiditylimited = 0;
[MyConfigComment("是否使用一维码检测料盘在NG平台")]
public static MyConfig<bool> CamTestReel_useBarcode = false;
[MyConfigComment("NG平台一维码检测料盘:一维码的内容")]
public static MyConfig<string> CamTestReel_barcode = "RW0000015";
[MyConfigComment("NG平台一维码检测料盘:阈值设置,小于该该数量认为有料")]
public static MyConfig<int> CamTestReel_barcodeThreshold = 2;
[MyConfigComment("是否打开NG平台检测料盘调试")]
public static MyConfig<bool> CamTestReel_debug = false;
[MyConfigComment("NG平台颜色检测料盘:总的覆盖数量")]
public static MyConfig<int> CamTestReel_totalcover = 69577;
[MyConfigComment("NG平台颜色检测料盘:色相H的最低值")]
public static MyConfig<int> CamTestReel_HL = 40;
[MyConfigComment("NG平台颜色检测料盘:色相H的最大值")]
public static MyConfig<int> CamTestReel_HH = 70;
[MyConfigComment("NG平台颜色检测料盘:亮度L的最低值")]
public static MyConfig<int> CamTestReel_LL = 15;
[MyConfigComment("NG平台颜色检测料盘:亮度L的最大值")]
public static MyConfig<int> CamTestReel_LH = 100;
[MyConfigComment("NG平台颜色检测料盘:饱和度S的最小值")]
public static MyConfig<int> CamTestReel_SL = 20;
[MyConfigComment("NG平台颜色检测料盘:饱和度S的最大值")]
public static MyConfig<int> CamTestReel_SH = 100;
[MyConfigComment("启用NG平台检测功能")]
public static MyConfig<bool> CamTestReel_Ability = false;
[MyConfigComment("NG平台颜色检测料盘:阈值设置,小于该值认为有料")]
public static MyConfig<double> CamTestReel_threshold = 0.6;
[MyConfigComment("是否单进单出")]
public static MyConfig<bool> Device_SingleInSingleOut = false;
[MyConfigComment("SMF服务器地址")]
public static MyConfig<string> http_server = "";
[MyConfigComment("料仓CID")]
public static MyConfig<string> CID = "";
[MyConfigComment("温湿度串口号")]
public static MyConfig<string> Device_Humiture_Port = "CMO1";
[MyConfigComment("屏蔽升降轴保护")]
public static MyConfig<bool> Device_DisableUpdownProtect = true;
[MyConfigComment("屏蔽单料门")]
public static MyConfig<bool> Device_DisableSingleDoor = false;
[MyConfigComment("屏蔽料串门")]
public static MyConfig<bool> Device_Disable_StringDoor = false;
[MyConfigComment("是否启用在校准库位检查料盘功能")]
public static MyConfig<bool> Func_CheckReelLocInFix = false;
[MyConfigComment("关闭日志窗口")]
public static MyConfig<bool> Device_DisableLogWindow = true;
[MyConfigComment("启用蜂鸣器")]
public static MyConfig<bool> Device_EnableBuzzer = true;
[MyConfigComment("料盘最大厚度,用于出库,最后一盘位置小于该高厚度则将下降")]
public static MyConfig<int> ReelMaxHeightMM = 60;
[MyConfigComment("没有出库任务, 料串在待机点取释放料串")]
public static MyConfig<bool> Device_String_StandbyAtBottom = true;
[MyConfigComment("出库时,是否启用定位旋转气缸检测料盘")]
public static MyConfig<bool> Device_OutStoreStringReelCheck = false;
[MyConfigComment("压紧轴回原失败重试最大次数")]
public static MyConfig<int> Comp_Axis_HomeResetTimes = 999;
[MyConfigComment("是否使用校准库位")]
public static MyConfig<bool> Device_Use_Fixpos = false;
[MyConfigComment("X08 AGV到位信号是否是料串门光栅")]
public static MyConfig<bool> Device_IO_X08IsStringDoor_SafetyLightCurtains = false;
[MyConfigComment("料串门关闭延时,到位信号亮后延时一定时间再停止")]
public static MyConfig<int> Device_StringDoor_DownOverTimeMS = 0;
[MyConfigComment("料串门打开延时,到位信号亮后延时一定时间再停止")]
public static MyConfig<int> Device_StringDoor_UpOverTimeMS = 0;
[MyConfigComment("屏蔽门安全检查")]
public static MyConfig<bool> Device_Disable_DoorSafeCheck = false;
[MyConfigComment("是否启用手动关单料门")]
public static MyConfig<bool> Device_ManualCloseSingleDoor = false;
[MyConfigComment("入库料盘拿走后,料串下降一段距离")]
public static MyConfig<int> Batch_ReelGetedDownMM = 8;
[MyConfigComment("大于7寸料盘高度补偿(mm),进而调整压紧轴压紧点")]
public static MyConfig<int> Device_1315_ReelHeight_Compensation = 0;
[MyConfigComment("启动吹气的湿度偏移值,即当前湿度+偏移量>最大温湿度时吹气")]
public static MyConfig<double> Device_HumidityStartOffser = 1;
[MyConfigComment("停止吹气的湿度偏移值,即当前湿度+偏移量<最大温湿度时停止吹气")]
public static MyConfig<double> Device_HumidityEndOffser = 10;
[MyConfigComment("空料串到P2点与料盘定位信号补偿值")]
public static MyConfig<int> OffsetEmptyToTrayCheck = 10;
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!