S7DataEntity.cs
950 Bytes
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
namespace HHECS.Model.PLCHelper.PLCComponent.Sharp7Component
{
/// <summary>
/// 构造Snap7 dataitem类
/// </summary>
public class S7DataEntity
{
/// <summary>
/// DB,M,I...
/// </summary>
public int Area { get; set; }
/// <summary>
/// 数据类型,word,int...
/// </summary>
public int DataType { get; set; }
/// <summary>
/// DB块或其他块的索引值
/// </summary>
public int DataNumber { get; set; }
/// <summary>
/// 起始量
/// </summary>
public int DataOffset { get; set; }
/// <summary>
/// DB偏移量(注意,这里读取的这个数据类型的数量而不是size)
/// </summary>
public int DataAmount { get; set; }
/// <summary>
/// 缓存buffer
/// </summary>
public byte[] Buffer { get; set; }
}
}