using iWareCc.Cache.Entity;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace iWareCc.HeartBeat.Entity
|
{
|
public class HeartBeatEntity
|
{
|
|
/// <summary>
|
/// PLC心跳
|
/// </summary>
|
public int PlcHeartBeat { get; set; }
|
|
/// <summary>
|
/// 告警信息
|
/// </summary>
|
public int AlarmCode { get; set; }
|
|
/// <summary>
|
/// 服务器心跳
|
/// </summary>
|
public bool WServerHeartBeat { get; set; }
|
|
/// <summary>
|
/// WCS需要写入的OPC地址
|
/// </summary>
|
public OpcWriteItem OpcWriteItems { get; set; }
|
|
|
/// <summary>
|
/// WCS需要读取的OPC地址
|
/// </summary>
|
public OpcReadItem OpcReadItems { get; set; }
|
|
|
public HeartBeatEntity()
|
{
|
OpcWriteItems = new OpcWriteItem
|
{
|
ServerHeartBeat = CacheEntity.IsRealMode ? "S7:[S7_Connection_1]DB600,X2662.0" : "S7:[@LOCALSERVER]DB1,X159.0"
|
};
|
|
OpcReadItems = new OpcReadItem
|
{
|
PlcHeartBeat = CacheEntity.IsRealMode ? "S7:[S7_Connection_1]DB600,INT2660" : "S7:[@LOCALSERVER]DB1,INT160",
|
AlarmCode = CacheEntity.IsRealMode ? "S7:[S7_Connection_1]DB600,W2664" : "S7:[@LOCALSERVER]DB1,W162"
|
};
|
}
|
|
|
}
|
}
|