From 18a29824a66de5bdd26bb8d16f4b6b4380740120 Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期六, 28 三月 2020 16:42:18 +0800 Subject: [PATCH] 1. 部分dll更新 2. Config文件添加到git仓库 --- Configs/Config.xml | 37 ++++++++++++ Configs/MeasureConfige/measure.xml | 11 +++ .gitignore | 1 Lib/halcon/hdevenginedotnet.dll | 0 HalconTools/HalconTools.csproj | 6 + Lib/halcon/halcondotnet.dll | 0 LLMF/LLMF.csproj | 18 +++-- Configs/JobConfige/JobConfige.xml | 31 ++++++++++ LLMF/Program.cs | 38 ++++++------ LLMF/frmMain.cs | 3 Lib/Interop.OPCAutomation.dll | 0 11 files changed, 114 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 1c38a68..1712b0a 100644 --- a/.gitignore +++ b/.gitignore @@ -184,3 +184,4 @@ # Microsoft Fakes FakesAssemblies/ +/.vs/LLMF/v16/Server/sqlite3 diff --git a/Configs/Config.xml b/Configs/Config.xml new file mode 100644 index 0000000..d1177b6 --- /dev/null +++ b/Configs/Config.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<ConfigStruct xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <title>LLMF V3.3</title> + <opcConfig> + <serverName>KEPware.KEPServerEx.V4</serverName> + <serverIP>127.0.0.1</serverIP> + <itmHandleClient>1234</itmHandleClient> + <groupProperty> + <defaultGroupIsActive>true</defaultGroupIsActive> + <defaultGroupDeadband>0</defaultGroupDeadband> + <updateRate>300</updateRate> + <isActive>true</isActive> + <isSubscribed>true</isSubscribed> + </groupProperty> + </opcConfig> + <angleOffset>-0.36000000000001364</angleOffset> + <angleOffset_Left>-0.019999999999996021</angleOffset_Left> + <cams> + <SerialNumber> + <unsignedInt>2470042</unsignedInt> + <unsignedInt>2470042</unsignedInt> + </SerialNumber> + </cams> + <password>1</password> + <minAngle>119.9</minAngle> + <maxAngle>120.11</maxAngle> + <pulsePerDegree>70000</pulsePerDegree> + <pulsePerDegree_Left>88000</pulsePerDegree_Left> + <calAngle>120</calAngle> + <leftUsed>true</leftUsed> + <rightUsed>false</rightUsed> + <saveImage>true</saveImage> + <inch13>15</inch13> + <inch15>20</inch15> + <inch16>30</inch16> + <selectedSizeIndex>0</selectedSizeIndex> +</ConfigStruct> \ No newline at end of file diff --git a/Configs/JobConfige/JobConfige.xml b/Configs/JobConfige/JobConfige.xml new file mode 100644 index 0000000..db42e46 --- /dev/null +++ b/Configs/JobConfige/JobConfige.xml @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<ArrayOfJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <Job> + <name>JobLLMF</name> + <tools> + <JobTool> + <type>FindLine</type> + <fitLineParam> + <hv_RowBegin>761.0526315789474</hv_RowBegin> + <hv_ColumnBegin>657.57831325301208</hv_ColumnBegin> + <hv_RowEnd>376.04953560371519</hv_RowEnd> + <hv_ColumnEnd>880.65060240963851</hv_ColumnEnd> + <hv_measure_Length1>500</hv_measure_Length1> + <hv_measure_Length2>20</hv_measure_Length2> + <hv_measure_sigma>1</hv_measure_sigma> + <hv_measure_threshold>40</hv_measure_threshold> + <hv_measure_number>20</hv_measure_number> + <hv_measure_position>first</hv_measure_position> + <hv_measure_transition>positive</hv_measure_transition> + <hv_measure_interpolation>nearest_neighbor</hv_measure_interpolation> + </fitLineParam> + </JobTool> + <JobTool> + <type>FindLine</type> + </JobTool> + <JobTool> + <type>FindLine</type> + </JobTool> + </tools> + </Job> +</ArrayOfJob> \ No newline at end of file diff --git a/Configs/MeasureConfige/measure.xml b/Configs/MeasureConfige/measure.xml new file mode 100644 index 0000000..fe64afd --- /dev/null +++ b/Configs/MeasureConfige/measure.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<MeasureParamSave xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <hv_measure_Length1>50</hv_measure_Length1> + <hv_measure_Length2>10</hv_measure_Length2> + <hv_measure_sigma>1</hv_measure_sigma> + <hv_measure_threshold>40</hv_measure_threshold> + <hv_measure_number>20</hv_measure_number> + <hv_measure_position>first</hv_measure_position> + <hv_measure_transition>positive</hv_measure_transition> + <hv_measure_interpolation>nearest_neighbor</hv_measure_interpolation> +</MeasureParamSave> \ No newline at end of file diff --git a/HalconTools/HalconTools.csproj b/HalconTools/HalconTools.csproj index ee5e505..44f4f9d 100644 --- a/HalconTools/HalconTools.csproj +++ b/HalconTools/HalconTools.csproj @@ -38,10 +38,12 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="halcondotnet, Version=11.0.1.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> + <Reference Include="halcondotnet"> <HintPath>..\Lib\halcon\halcondotnet.dll</HintPath> </Reference> + <Reference Include="hdevenginedotnet"> + <HintPath>..\Lib\halcon\hdevenginedotnet.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Core"> <RequiredTargetFramework>3.5</RequiredTargetFramework> diff --git a/LLMF/LLMF.csproj b/LLMF/LLMF.csproj index 1c67bb5..c3a63f3 100644 --- a/LLMF/LLMF.csproj +++ b/LLMF/LLMF.csproj @@ -44,17 +44,15 @@ <Reference Include="dog_net_windows"> <HintPath>..\Lib\SuperDog\dog_net_windows.dll</HintPath> </Reference> - <Reference Include="halcondotnet, Version=11.0.1.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> + <Reference Include="halcondotnet"> <HintPath>..\Lib\halcon\halcondotnet.dll</HintPath> </Reference> - <Reference Include="HalconTools, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\HalconTools\bin\Debug\HalconTools.dll</HintPath> + <Reference Include="hdevenginedotnet"> + <HintPath>..\Lib\halcon\hdevenginedotnet.dll</HintPath> </Reference> - <Reference Include="Interop.OPCAutomation, Version=1.0.0.0, Culture=neutral"> - <SpecificVersion>False</SpecificVersion> - <HintPath>C:\Program Files\KEPServerEx\Examples\Simple VB .NET OPC Example\bin\Interop.OPCAutomation.dll</HintPath> + <Reference Include="Interop.OPCAutomation"> + <HintPath>..\Lib\Interop.OPCAutomation.dll</HintPath> + <EmbedInteropTypes>True</EmbedInteropTypes> </Reference> <Reference Include="PresentationCore"> <RequiredTargetFramework>3.0</RequiredTargetFramework> @@ -170,6 +168,10 @@ <Project>{EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}</Project> <Name>FileToolkit</Name> </ProjectReference> + <ProjectReference Include="..\HalconTools\HalconTools.csproj"> + <Project>{461f5de4-f558-41b7-9494-f76854e0e7c7}</Project> + <Name>HalconTools</Name> + </ProjectReference> <ProjectReference Include="..\PointGreyAndHalcon\PointGreyAndHalcon\PointGreyAndHalcon.csproj"> <Project>{91b96d0b-f745-4850-9166-63a07917ac04}</Project> <Name>PointGreyAndHalcon</Name> diff --git a/LLMF/Program.cs b/LLMF/Program.cs index d285f55..23bee41 100644 --- a/LLMF/Program.cs +++ b/LLMF/Program.cs @@ -16,25 +16,25 @@ [STAThread] static void Main() { - DogFeature feature = new DogFeature(1); - using (var dog = new Dog(feature)) - { - string vendorcodes = "tn+2bpxTE0MhQDarbNvbJEPpez6LfT6oB2DjZLKQMs0H2ap3YfmDIzYaLqDsZliOKL677L28ZbDhxwdP3Mq2xIbi/5zkXQ7ybvG9HLKaYXN3ql8yY5XJ1WHn7ISI+m7M9t1SzzQaUwnW/NV2VUslx/PdI5hZ1VVwsIaus042E5u8QGCSPJcDOXBeGIJeJSezvM+scip87hDujXsrubV0n+xCAdrTAs/WU5O1JwpgYNArqrFCpYSV4nO5ZveQRcPchUuED+gaNpHfsKZYAtW/43ud3IYcnTg6HuQPo+9fRu8iDpi18+j8USasj6M8EY9g7x3YjwO1DHCPpNEWB3IrHA0rhWG+c2emcCc3q8r8Qx8yHBCAUdZV7F8CTar/co5NbVv3FNObKULZxqrESWkPhoIKBtuCutspoGkTBHger+2A5qtfEMy6ZHt6MRvmgmiIO23AQGQ3yXKHXkq6HsDtrl1P+8coQTFnqopDOGaPi6C+Pb7qIqCJx+IBnWnjuZEfawKMcR+1hB9m1rSfhY+UQ0crh8jYr5a+tOAbSU9tPw3ZmKLQYbm6m8gLAHIv+EOq1rRfH5XxhUUbL4Lv4mrTFcmWl1Ibnaiz7140PqVqaquI8h8Mj4tL/5u/f1iJTKvnUywmPUDZXAecu6FmwDeQpvGJwa+q1Fgn3WXqBitT/lnEox7pp8deMpT/ol0wpcmlU40Cq5XsvnLmbGdK/qcXYBa+ZYhLYnXpzTe4XUDbatIFKfNVwZsSgXaMPpRLghEMQupv/H9uJ2vtlRYjt0ysoFDgzb3W0qr3bK7T55a8bhiptfh/dq7Q5hHZUolRprjXTbcUlmyhjzrH+bAz+BdmwiHJInx/najqyflknUUuOdO8IrMFAh0zWiICkijghbvWUwjg/DTpLKRO2e6hTaWtvCHTBHfBRV0/0EVW0kMmdx/huL1k1BBo11Fv/X7feCskl0m5rot1ubw/T/shAAvVBg=="; - var status = dog.Login(vendorcodes, defaultScope); - if (status != DogStatus.StatusOk) - { - if (status == DogStatus.TimeError) - { - MessageBox.Show("绂佹绡℃敼鏃堕棿!"); - return; - } - else - { - MessageBox.Show("璇锋彃鍏ユ湁鏁堢殑鍔犲瘑鐙�!"); - return; - } - } - } + //DogFeature feature = new DogFeature(1); + //using (var dog = new Dog(feature)) + //{ + // string vendorcodes = "tn+2bpxTE0MhQDarbNvbJEPpez6LfT6oB2DjZLKQMs0H2ap3YfmDIzYaLqDsZliOKL677L28ZbDhxwdP3Mq2xIbi/5zkXQ7ybvG9HLKaYXN3ql8yY5XJ1WHn7ISI+m7M9t1SzzQaUwnW/NV2VUslx/PdI5hZ1VVwsIaus042E5u8QGCSPJcDOXBeGIJeJSezvM+scip87hDujXsrubV0n+xCAdrTAs/WU5O1JwpgYNArqrFCpYSV4nO5ZveQRcPchUuED+gaNpHfsKZYAtW/43ud3IYcnTg6HuQPo+9fRu8iDpi18+j8USasj6M8EY9g7x3YjwO1DHCPpNEWB3IrHA0rhWG+c2emcCc3q8r8Qx8yHBCAUdZV7F8CTar/co5NbVv3FNObKULZxqrESWkPhoIKBtuCutspoGkTBHger+2A5qtfEMy6ZHt6MRvmgmiIO23AQGQ3yXKHXkq6HsDtrl1P+8coQTFnqopDOGaPi6C+Pb7qIqCJx+IBnWnjuZEfawKMcR+1hB9m1rSfhY+UQ0crh8jYr5a+tOAbSU9tPw3ZmKLQYbm6m8gLAHIv+EOq1rRfH5XxhUUbL4Lv4mrTFcmWl1Ibnaiz7140PqVqaquI8h8Mj4tL/5u/f1iJTKvnUywmPUDZXAecu6FmwDeQpvGJwa+q1Fgn3WXqBitT/lnEox7pp8deMpT/ol0wpcmlU40Cq5XsvnLmbGdK/qcXYBa+ZYhLYnXpzTe4XUDbatIFKfNVwZsSgXaMPpRLghEMQupv/H9uJ2vtlRYjt0ysoFDgzb3W0qr3bK7T55a8bhiptfh/dq7Q5hHZUolRprjXTbcUlmyhjzrH+bAz+BdmwiHJInx/najqyflknUUuOdO8IrMFAh0zWiICkijghbvWUwjg/DTpLKRO2e6hTaWtvCHTBHfBRV0/0EVW0kMmdx/huL1k1BBo11Fv/X7feCskl0m5rot1ubw/T/shAAvVBg=="; + // var status = dog.Login(vendorcodes, defaultScope); + // if (status != DogStatus.StatusOk) + // { + // if (status == DogStatus.TimeError) + // { + // MessageBox.Show("绂佹绡℃敼鏃堕棿!"); + // return; + // } + // else + // { + // MessageBox.Show("璇锋彃鍏ユ湁鏁堢殑鍔犲瘑鐙�!"); + // return; + // } + // } + //} System.Threading.Mutex mutex = new System.Threading.Mutex(); if (ToolKit.StarterTool.IsExistMutex("LLMF",out mutex )) diff --git a/LLMF/frmMain.cs b/LLMF/frmMain.cs index 312b598..b8141bb 100644 --- a/LLMF/frmMain.cs +++ b/LLMF/frmMain.cs @@ -5,11 +5,10 @@ using System.IO; using System.Threading; using HalconDotNet; -using HalconTools; using PointGreyAndHalcon; using System.Diagnostics; using SuperDog; -using Microsoft.Win32; +using HalconTools; namespace LLMF { diff --git a/Lib/Interop.OPCAutomation.dll b/Lib/Interop.OPCAutomation.dll new file mode 100644 index 0000000..6cf6f68 --- /dev/null +++ b/Lib/Interop.OPCAutomation.dll Binary files differ diff --git a/Lib/halcon/halcondotnet.dll b/Lib/halcon/halcondotnet.dll index 59510d9..52831e9 100644 --- a/Lib/halcon/halcondotnet.dll +++ b/Lib/halcon/halcondotnet.dll Binary files differ diff --git a/Lib/halcon/hdevenginedotnet.dll b/Lib/halcon/hdevenginedotnet.dll new file mode 100644 index 0000000..e6c23df --- /dev/null +++ b/Lib/halcon/hdevenginedotnet.dll Binary files differ -- Gitblit v1.8.0