222
schangxiang@126.com
2025-08-23 2469c7e6490ee742df25fba27a69f7e866e6e798
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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"
            };
        }
 
 
    }
}