chore: 初始化平芝126KV断路器线程序
This commit is contained in:
15
MisDataFunction/Function1054/DataAccess/DataAccess.cs
Normal file
15
MisDataFunction/Function1054/DataAccess/DataAccess.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
partial class Function1052
|
||||
{
|
||||
//针对“MIS.BizFacade.Dll”中没有的存储过程,在此类中新建
|
||||
//新建原则:所有的函数用private,只允许在内部使用
|
||||
//针对单个工艺特殊,需要新建存储过程,但是存储过程不能被加入到“MIS.BizFacade.Dll”中
|
||||
|
||||
private void aa()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
MisDataFunction/Function1054/DataAccess/vssver2.scc
Normal file
BIN
MisDataFunction/Function1054/DataAccess/vssver2.scc
Normal file
Binary file not shown.
15
MisDataFunction/Function1054/Db.cs
Normal file
15
MisDataFunction/Function1054/Db.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
public class Db
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
10
MisDataFunction/Function1054/Function02.csproj.vspscc
Normal file
10
MisDataFunction/Function1054/Function02.csproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = "relative:MesServer.Function\\Function02"
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
167
MisDataFunction/Function1054/Function1054.csproj
Normal file
167
MisDataFunction/Function1054/Function1054.csproj
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{CC45D613-11B9-48AF-B073-6523D6273525}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Function1054</RootNamespace>
|
||||
<AssemblyName>Function1054</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\MisDataFun_Exe\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MesWork.DeviceDriver">
|
||||
<HintPath>..\..\dll_common\MesWork.DeviceDriver.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MQTTnet">
|
||||
<HintPath>..\..\..\Common\dll\MQTTnet.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MQTTnet.Extensions.ManagedClient">
|
||||
<HintPath>..\..\..\Common\dll\MQTTnet.Extensions.ManagedClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\dll_common\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http">
|
||||
<HintPath>..\..\DLL\System.Net.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Security, Version=4.0.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Net.Security.4.3.2\lib\net46\System.Net.Security.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.WebSockets, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Net.WebSockets.4.3.0\lib\net46\System.Net.WebSockets.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.WebSockets.Client, Version=4.0.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Net.WebSockets.Client.4.3.2\lib\net46\System.Net.WebSockets.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Db.cs" />
|
||||
<Compile Include="MesServerFunction\Fun_1054.cs" />
|
||||
<Compile Include="Methods\EngineGetOverBaseWork.cs" />
|
||||
<Compile Include="DataAccess\DataAccess.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Common\00MesWorkMqtt\MesWorkMqtt\00MesWorkMqtt.csproj">
|
||||
<Project>{f55da1a0-a982-4479-8c47-0d9a5aaf3e18}</Project>
|
||||
<Name>00MesWorkMqtt</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\01DoWhatPlc\01_01DoWhatPlc.csproj">
|
||||
<Project>{0d1af432-439a-4920-8692-43ae139f5530}</Project>
|
||||
<Name>01_01DoWhatPlc</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\02WebApiCall\02_02WebApiCallPLC.csproj">
|
||||
<Project>{3e6d1dd5-01c9-435f-9941-61f906ce35bb}</Project>
|
||||
<Name>02_02WebApiCallPLC</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\04DataBaseAccess\DataBaseAccess\04-DataBaseAccess.csproj">
|
||||
<Project>{f434e066-4c59-47c8-aa82-6f48cc84501a}</Project>
|
||||
<Name>04-DataBaseAccess</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\07WebBusinessFacade\BusinessFacade\07BusinessFacade.csproj">
|
||||
<Project>{f0a0c525-03fd-428a-9b17-7f54aa0e4475}</Project>
|
||||
<Name>07BusinessFacade</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Common\08WebFun_base\WebFun_base\08-WebFun_base.csproj">
|
||||
<Project>{d98be764-adeb-488d-9714-61e308aa8201}</Project>
|
||||
<Name>08-WebFun_base</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\09MesDataFunction\MesDataFunction\01-MesDataFunction.csproj">
|
||||
<Project>{90e76fb4-646d-45e2-95db-0b8ab4e465d6}</Project>
|
||||
<Name>09-MesDataFunction</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Common\MyLog4Net\00_MyLog4Net.csproj">
|
||||
<Project>{1dc48c83-1842-4de8-acaf-26e1e7f7c58f}</Project>
|
||||
<Name>00_MyLog4Net</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\MisDataFun\SendMessageToWebMqtt\12SendMessageToWeb.csproj">
|
||||
<Project>{e4eb6420-906d-4672-947a-ca33ddcdadfc}</Project>
|
||||
<Name>12SendMessageToWeb</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\MIS_FuntionSaveData\MIS_FuntionSaveData\13.3MIS_FuntionSaveData.csproj">
|
||||
<Project>{55b510c1-59e9-4bfd-ae84-d76d46f6e365}</Project>
|
||||
<Name>02-13.3MIS_FuntionSaveData</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="OpcServer\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets'))" />
|
||||
</Target>
|
||||
<!-- 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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
235
MisDataFunction/Function1054/MesServerFunction/Fun_1054.cs
Normal file
235
MisDataFunction/Function1054/MesServerFunction/Fun_1054.cs
Normal file
@@ -0,0 +1,235 @@
|
||||
using MesServerWork;
|
||||
using MisDataFunDll;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
public partial class FunctionMES
|
||||
{
|
||||
object lockFunWork;
|
||||
//public void FunWork(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
public void FunWork(string recData)
|
||||
{
|
||||
|
||||
|
||||
lockFunWork = new object();
|
||||
lock (lockFunWork)
|
||||
{
|
||||
List<string> dataArray = MisDataFun.GetCmdStringList(recData);
|
||||
//string[] dataArray = recData.Split('|');
|
||||
//if (dataArray.Count != 4)
|
||||
//return;
|
||||
//消息来源
|
||||
string m_Source = dataArray[0].ToString();
|
||||
//消息类型 Barcode
|
||||
string m_Command = dataArray[1].ToString();
|
||||
//工位号
|
||||
string m_OpName = dataArray[2].ToString();
|
||||
//消息参数
|
||||
string m_Value = dataArray[3].ToString();
|
||||
|
||||
DeviceDriver_BasicData.CustomeEvetnArgs e = new DeviceDriver_BasicData.CustomeEvetnArgs();// = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceDriver_BasicData.CustomeEvetnArgs>(m_Value);
|
||||
string tagValue;
|
||||
|
||||
switch (m_Source)
|
||||
{
|
||||
case "PLC":
|
||||
e = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceDriver_BasicData.CustomeEvetnArgs>(m_Value);
|
||||
switch (e.TagValue.ToString().ToLower())
|
||||
{
|
||||
case "false":
|
||||
tagValue = "0";
|
||||
break;
|
||||
case "true":
|
||||
tagValue = "1";
|
||||
break;
|
||||
default:
|
||||
tagValue = e.TagValue.ToString();
|
||||
break;
|
||||
}
|
||||
e.TagValue = tagValue;
|
||||
switch (e.TagTypeCodeID.ToString())
|
||||
{
|
||||
// AGV相关变量类型代码处理说明:
|
||||
// 301:AGV请求进入
|
||||
// 302:AGV器具放置完毕
|
||||
// 303:AGV退出光栅
|
||||
// 304:送料信息验证完成
|
||||
// 305:送料信息验证结果
|
||||
// 305:任务发送状态 0 没有 1 发送 2 失败
|
||||
// 311:请求叫料
|
||||
// 312:请求退空
|
||||
// 313:请求退料
|
||||
// 314:允许AGV进入
|
||||
// 315:允许AGV离开
|
||||
// 316:器具码扫描完毕
|
||||
// 317:退回并重新配送
|
||||
// 318:器具号
|
||||
// 319:请求上料机型
|
||||
// 320:收到状态反馈点
|
||||
// 321:转序
|
||||
// 322:下空托盘
|
||||
// 323:上空托盘
|
||||
// 324:点对点
|
||||
|
||||
// 请求叫料
|
||||
case "311":
|
||||
fun_CallMaterials(e);
|
||||
break;
|
||||
// 请求退空
|
||||
case "312":
|
||||
fun_RequestReturns(e);
|
||||
break;
|
||||
// 请求退料
|
||||
case "313":
|
||||
fun_RequestReturnMaterial(e);
|
||||
break;
|
||||
// 允许AGV进入
|
||||
case "314":
|
||||
fun_AllowAGVEnter(e);
|
||||
break;
|
||||
// 允许AGV离开
|
||||
case "315":
|
||||
fun_AllowAGVLeave(e);
|
||||
break;
|
||||
// 器具码扫描完毕
|
||||
case "316":
|
||||
fun_ToolCodeScanOver(e);
|
||||
break;
|
||||
// 退回并重新配送
|
||||
case "317":
|
||||
fun_ReturnAndRedispatch(e);
|
||||
break;
|
||||
// 收到任务状态握手
|
||||
case "320":
|
||||
//MIS_BASE.WritePLC(306, m_OpName, 0);
|
||||
break;
|
||||
// 转序
|
||||
case "321":
|
||||
fun_TransferSequence(e);
|
||||
break;
|
||||
// 下空托盘
|
||||
case "322":
|
||||
fun_UnloadEmptyTray(e);
|
||||
break;
|
||||
// 上空托盘
|
||||
case "323":
|
||||
fun_LoadEmptyTray(e);
|
||||
break;
|
||||
// 点对点
|
||||
case "324":
|
||||
fun_PointToPoint(e);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 叫料流程
|
||||
// 1.请求叫料 收到请求叫料后 调用叫料接口 后续收到AGV的
|
||||
// 2.收到工厂 请求进入接口(工厂未开发 跳过) 发给PLC AGV请求进入
|
||||
// 3.收到允许AGV进入 调用接口(未开发 跳过) 允许进入
|
||||
// 4.收到 器具码扫码完成 根据318器具号 调用器具号查询接口 得出校验结果
|
||||
// 5.若器具码校验通过 调用 确认物料配送接口 调用成功后 给PLC发送 送料信息验证结果(1 合格 2 不合格) 和 送料信息验证完成
|
||||
// 6.收到AGV请求离开接口后(未开发 跳过) 发送给PLC请求离开点位
|
||||
// 7.收到PLC允许离开信号后 调用AGV允许离开接口(未开发 跳过)
|
||||
|
||||
// 退空托流程
|
||||
// 1.收到请求退空 调用退空托接口
|
||||
// 2.如叫料AGV请求进入 请求离开。。。。 只不过不需要扫描器具码部分
|
||||
|
||||
|
||||
// AGV相关方法声明(PLC触发的信号)
|
||||
/// <summary>
|
||||
/// 请求叫料
|
||||
/// </summary>
|
||||
public void fun_CallMaterials(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(CallMaterials, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 请求退空
|
||||
/// </summary>
|
||||
public void fun_RequestReturns(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(RequestReturns, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 请求退料
|
||||
/// </summary>
|
||||
public void fun_RequestReturnMaterial(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(RequestReturnMaterial, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 允许AGV进入
|
||||
/// </summary>
|
||||
public void fun_AllowAGVEnter(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(AllowAGVEnter, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 允许AGV离开
|
||||
/// </summary>
|
||||
public void fun_AllowAGVLeave(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(AllowAGVLeave, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 器具码扫描完毕
|
||||
/// </summary>
|
||||
public void fun_ToolCodeScanOver(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(ToolCodeScanOver, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 退回并重新配送
|
||||
/// </summary>
|
||||
public void fun_ReturnAndRedispatch(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(ReturnAndRedispatch, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转序
|
||||
/// </summary>
|
||||
public void fun_TransferSequence(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(TransferSequence, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下空托盘
|
||||
/// </summary>
|
||||
public void fun_UnloadEmptyTray(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(UnloadEmptyTray, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上空托盘
|
||||
/// </summary>
|
||||
public void fun_LoadEmptyTray(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(LoadEmptyTray, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点对点
|
||||
/// </summary>
|
||||
public void fun_PointToPoint(DeviceDriver_BasicData.CustomeEvetnArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(PointToPoint, e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
BIN
MisDataFunction/Function1054/MesServerFunction/vssver2.scc
Normal file
BIN
MisDataFunction/Function1054/MesServerFunction/vssver2.scc
Normal file
Binary file not shown.
177
MisDataFunction/Function1054/Methods/EngineGetOverBaseWork.cs
Normal file
177
MisDataFunction/Function1054/Methods/EngineGetOverBaseWork.cs
Normal file
@@ -0,0 +1,177 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using MesServerWork;
|
||||
using MisDataFunDll;
|
||||
|
||||
namespace MesServerFunctions
|
||||
{
|
||||
partial class FunctionMES
|
||||
{
|
||||
/// <summary>
|
||||
/// 正常逻辑工作(传递机型)
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
/// <param name="EngineTypeID"></param>
|
||||
/// <param name="EngineType"></param>
|
||||
/// <param name="EngineID"></param>
|
||||
/// <param name="PartPallet_Code"></param>
|
||||
private void EngineTypeGetOver_PLC_Work(string OpName, int EngineTypeID, string EngineType, string EngineID, int PartPallet_Code, string OrderForm)
|
||||
{
|
||||
//int IsAllowWork;
|
||||
//int RepairPartStatusPLC = 0;
|
||||
//int MES_QualityMask = 1;
|
||||
|
||||
|
||||
|
||||
////电子看板_装配零件_临时表_增加_北汽
|
||||
////第二步,将零件信息转移到零件_临时表中
|
||||
//BaseDataSystemMES.MesServer_Process_EngineTypeOverBQ(OpName);
|
||||
|
||||
////通知web显示
|
||||
//SendMessageFun.SendMessage("123", "111", OpName);
|
||||
////MIS_BASE.Read_PalletInfo(OpName, out MES_QualityMask);//合格标志 合格标志暂时改为即时响应式的
|
||||
////MIS_BASE.Read_RepairStatus_PLC(OpName, out RepairPartStatusPLC);//返修标志
|
||||
////SendMessageFun.SendInfomation("QualityMask", Convert.ToString(MES_QualityMask), OpName);//显示合格标志
|
||||
////SendMessageFun.SendInfomation("RepairPartStatusPLC", Convert.ToString(RepairPartStatusPLC), OpName);//显示返修标志
|
||||
//MIS_BASE.Read_TagTypeID(201, OpName, out string EngineTypeID_QiaoKe);
|
||||
|
||||
//Db.OP50_OPA90_MatchResult(EngineTypeID, Convert.ToInt32(EngineTypeID_QiaoKe), EngineID, OrderForm, out int MatchResult, out string MatchResultStr);
|
||||
//if (MatchResult == 1)
|
||||
//{
|
||||
// // 轮毂线
|
||||
// MIS_BASE.Write_Match(OpName, true);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName, true);// 匹配完成
|
||||
// MIS_BASE.Write_FixAllow(OpName, true); // 允许工作
|
||||
// return;
|
||||
//}
|
||||
//else if (MatchResult == 2) // 分等待状态 与 报警状态 等待的话就等A60 工作完成时判断清除等待 写入A90 的匹配结果 匹配完成 允许工作
|
||||
//{
|
||||
// MIS_BASE.WritePLC(29, OpName, true); // 开始等待 通知A60 保存完成时更新下等待状态与匹配状态
|
||||
// return;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// // 将根据轮毂号 工位号 时间 报错内容 存储到数据库中供查询
|
||||
// BaseDataSystemMES.HeLi_OoNameAlarmRecord_Add(OpName, EngineID, MatchResultStr);
|
||||
// // 匹配结果不成功
|
||||
// MIS_BASE.Write_Match(OpName, false);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName, true);// 匹配完成
|
||||
// return;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//// 判断分线是否 传递机型
|
||||
//if (EngineGetOver_SubLine)
|
||||
//{
|
||||
// string EngineTypeID_MainLine;
|
||||
// int EngineTypeID_MainLineQiaoKe;
|
||||
// // 读取主线桥壳机型
|
||||
// MIS_BASE.Read_EngineTypeID(OpName_MainLine, out EngineTypeID_MainLineQiaoKe);
|
||||
// // 读取分线存储的桥壳机型
|
||||
// MIS_BASE.Read_TagTypeID(38, OpName_SubLine, out EngineTypeID_MainLine);
|
||||
|
||||
// if (Convert.ToInt32(EngineTypeID_MainLine) == EngineTypeID)
|
||||
// {
|
||||
// Db.OP50_OPA90_MatchResult(EngineTypeID, Convert.ToInt32(EngineTypeID_MainLine), EngineTypeID_MainLineQiaoKe, out int MatchResult);
|
||||
|
||||
// if (MatchResult == 0) // 不匹配
|
||||
// {
|
||||
// // 主线
|
||||
// MIS_BASE.Write_Match(OpName_MainLine, false);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName_MainLine, false);// 匹配完成
|
||||
// MIS_BASE.Write_FixAllow(OpName_MainLine, false); // 允许工作
|
||||
// // 分线
|
||||
// MIS_BASE.Write_Match(OpName_SubLine, false);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName_SubLine, false);// 匹配完成
|
||||
// MIS_BASE.Write_FixAllow(OpName_SubLine, false); // 允许工作
|
||||
|
||||
// // 写入分线 等待 0
|
||||
// MIS_BASE.WritePLC(29, OpName_SubLine, "0");
|
||||
// }
|
||||
// if (MatchResult == 1) // 允许抓
|
||||
// {
|
||||
// // 主线
|
||||
// MIS_BASE.Write_Match(OpName_MainLine, true);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName_MainLine, true);// 匹配完成
|
||||
// // 分线
|
||||
// MIS_BASE.Write_Match(OpName_SubLine, true);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName_SubLine, true);// 匹配完成
|
||||
// MIS_BASE.Write_FixAllow(OpName_MainLine, true); // 允许工作
|
||||
|
||||
// // 写入分线 等待 0
|
||||
// MIS_BASE.WritePLC(29, OpName_SubLine, "0");
|
||||
// }
|
||||
// if (MatchResult == 2) // 等待
|
||||
// {
|
||||
// // 写入分线 等待 1
|
||||
// MIS_BASE.WritePLC(29, OpName_SubLine, "1");
|
||||
// }
|
||||
// }
|
||||
// else // 不匹配
|
||||
// {
|
||||
// // 主线
|
||||
// MIS_BASE.Write_Match(OpName_MainLine, false);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName_MainLine, false);// 匹配完成
|
||||
// MIS_BASE.Write_FixAllow(OpName_MainLine, false); // 允许工作
|
||||
// // 分线
|
||||
// MIS_BASE.Write_Match(OpName_SubLine, false);// 匹配结果
|
||||
// MIS_BASE.Write_MatchingCompleted(OpName_SubLine, false);// 匹配完成
|
||||
// MIS_BASE.Write_FixAllow(OpName_SubLine, false); // 允许工作
|
||||
|
||||
// // 写入分线 等待 0
|
||||
// MIS_BASE.WritePLC(29, OpName_SubLine, "0");
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 二次工作
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
private void EngineTypeGetOver_PLC_Work_two(string OpName)
|
||||
{
|
||||
int EngineTypeID;//机型代码
|
||||
int PartPallet_Code;//托盘编号
|
||||
|
||||
string EngineType;//机型
|
||||
string EngineID;//工件编号
|
||||
string OrderForm;
|
||||
MIS_BASE.GetEngineTypeFromPLC(OpName, out EngineTypeID, out EngineType, out EngineID, out PartPallet_Code, out OrderForm);
|
||||
EngineTypeGetOver_PLC_Work(OpName, EngineTypeID, EngineType, EngineID, Convert.ToInt32(PartPallet_Code), OrderForm);
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 跳过二次工作
|
||||
/// </summary>
|
||||
/// <param name="OpName"></param>
|
||||
private void EngineTypeGetOver_PLC_Work_Skip(string OpName)
|
||||
{
|
||||
MIS_BASE.Write_MesReadOver(OpName, true);
|
||||
MIS_BASE.Write_MaterialVerifyOver(OpName, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返修件需要工作
|
||||
/// </summary>
|
||||
/// <param name="OpName">工位号</param>
|
||||
private void IsNeedRepaire_OK(string OpName)
|
||||
{
|
||||
string orderForm = "";
|
||||
int engineTypeID;
|
||||
string engineType = "";
|
||||
string engineID = "";
|
||||
string palletCode = "";
|
||||
int isRepair;
|
||||
string repairCode = "";
|
||||
//从监控系统中查询出本工位信息
|
||||
//MisDataFun.OpName_MIS_Moby_Select(OpName,
|
||||
//out orderForm, out engineTypeID, out engineType,
|
||||
//out engineID, out palletCode, out isRepair, out repairCode);
|
||||
|
||||
//EngineTypeGetOver_PLC_Work(OpName, engineTypeID, engineType, engineID, Convert.ToInt32(palletCode), orderForm);
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
MisDataFunction/Function1054/Methods/vssver2.scc
Normal file
BIN
MisDataFunction/Function1054/Methods/vssver2.scc
Normal file
Binary file not shown.
BIN
MisDataFunction/Function1054/OpcServer/vssver2.scc
Normal file
BIN
MisDataFunction/Function1054/OpcServer/vssver2.scc
Normal file
Binary file not shown.
36
MisDataFunction/Function1054/Properties/AssemblyInfo.cs
Normal file
36
MisDataFunction/Function1054/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的常规信息通过以下
|
||||
// 特性集控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Function02")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("苏州宏软信息技术有限公司")]
|
||||
[assembly: AssemblyProduct("Function02")]
|
||||
[assembly: AssemblyCopyright("Copyright © 苏州宏软信息技术有限公司 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 使此程序集中的类型
|
||||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
|
||||
// 则将该类型上的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("47710f2c-e141-4252-8d13-701bf4c1c027")]
|
||||
|
||||
// 程序集的版本信息由下面四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 内部版本号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
BIN
MisDataFunction/Function1054/Properties/vssver2.scc
Normal file
BIN
MisDataFunction/Function1054/Properties/vssver2.scc
Normal file
Binary file not shown.
5
MisDataFunction/Function1054/mssccprj.scc
Normal file
5
MisDataFunction/Function1054/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a Source Code Control file
|
||||
|
||||
[Function02.csproj]
|
||||
SCC_Aux_Path = "\\192.168.0.100\vss\MES4.0"
|
||||
SCC_Project_Name = "$/MisData/MisData/MisData/MesServer.Function/Function02", ILHAAAAA
|
||||
15
MisDataFunction/Function1054/packages.config
Normal file
15
MisDataFunction/Function1054/packages.config
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net461" />
|
||||
<package id="MQTTnet" version="3.0.13" targetFramework="net461" />
|
||||
<package id="MQTTnet.Extensions.ManagedClient" version="3.0.13" targetFramework="net461" />
|
||||
<package id="NETStandard.Library" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
||||
<package id="System.Net.Security" version="4.3.2" targetFramework="net461" />
|
||||
<package id="System.Net.WebSockets" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Net.WebSockets.Client" version="4.3.2" targetFramework="net461" />
|
||||
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" requireReinstallation="true" />
|
||||
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" />
|
||||
</packages>
|
||||
BIN
MisDataFunction/Function1054/vssver2.scc
Normal file
BIN
MisDataFunction/Function1054/vssver2.scc
Normal file
Binary file not shown.
Reference in New Issue
Block a user