Files
2026-05-29 13:50:18 +08:00

41 lines
1.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using MesWork;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MesDataFunction
{
public class MesWorkPlc: PlcLinkForm
{
public static Action<OpcData.CustomeEvetnArgs> D_OPCTagData_TagDataOnChangeMIS = null;
/// <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}");
if (D_OPCTagData_TagDataOnChangeMIS != null)
D_OPCTagData_TagDataOnChangeMIS(e);
// 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)
{
}
}
}