65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using OpcData;
|
||
using System;
|
||
using SystemFramework;
|
||
using System.Threading;
|
||
using System.Collections;
|
||
using System.Collections.Specialized;
|
||
using MisDataFunction;
|
||
using System.Diagnostics;
|
||
|
||
namespace MisDataName
|
||
{
|
||
//public partial class ___ { }
|
||
public partial class MisData
|
||
{
|
||
|
||
/// <summary>
|
||
/// 监控数据的所有变化,从这里产生
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
public override void OPCTagData_TagDataOnChangeMIS(object sender, OpcData.CustomeEvetnArgs e)
|
||
{
|
||
Console.WriteLine($"【【{e.TagName}【【{e.TagValueBefore}->{e.TagValue}【【{ e.TagKeepTime}");
|
||
|
||
OPCTagData_TagDataOnChange(sender, e);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 定时触发,检测PLC在线状态,周期:3 s
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="eState"></param>
|
||
public override void PlcStateEvent(object sender, OpcData.PlcStateEvetnArgs eState)
|
||
{
|
||
|
||
}
|
||
|
||
public void OPCTagData_TagDataOnChange(object sender, OpcData.CustomeEvetnArgs e)
|
||
{
|
||
|
||
//处理MIS业务 保存数据
|
||
//ThreadPool.QueueUserWorkItem(Function.MIS_Funtion, e);
|
||
//处理MES业务 Function
|
||
ThreadPool.QueueUserWorkItem(TagData_MisData_TagDataOnChangeCustomeEvetnArgs, e);
|
||
//ThreadPool.QueueUserWorkItem(TagData_MisData_TagDataOnChange, e);
|
||
//设备状态日志
|
||
ThreadPool.QueueUserWorkItem(TagTypeCodeID_TagDataOnChange, e);
|
||
|
||
|
||
//发送通讯服务器 MES web界面显示用 加工位号
|
||
TransferInfToWebServer(e);
|
||
//改变控件状态
|
||
//showMessagePLCInvoke(e);
|
||
//更新状态窗口控件状态
|
||
//ExcutePlcChange(e);
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
}
|
||
|
||
} |