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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using Bro.Common.Base;
using Bro.Common.Helper;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Bro.Device.OmronFins
{
    [Device("OmronFins", "欧姆龙PLC-Fins通讯", EnumHelper.DeviceAttributeType.OperationConfig)]
    [Serializable]
    public class OmronFinsOperationConfig : PLCOperationConfigBase
    {
        [ConfigOutputResource("OutputResultCommon")]
        public override int ResultOutput { get; set; }
 
        public int StartAddress { get; set; }
 
        public int OpLength { get; set; }
 
        public List<int> OpValues { get; set; }
    }
 
    public class OmronFinsDeviceConfig : PLCDeviceConfigBase
    {
    }
 
    [DefaultProperty("DNA")]
    public class OmronFinsInitialConfig : PLCInitialConfigBase
    {
        /// <summary>
        /// PLC网络号
        /// </summary>
        [Description("PLC网络号")]
        [Category("通信设置-PLC")]
        public byte DNA { get; set; } = 0;
 
        /// <summary>
        /// PLC节点号
        /// </summary>
        [Description("PLC节点号")]
        [Category("通信设置-PLC")]
        public byte DA1 { get; set; } = 1;
 
        /// <summary>
        /// PLC单元号
        /// </summary>
        [Description("PLC单元号")]
        [Category("通信设置-PLC")]
        public byte DA2 { get; set; } = 0;
 
        /// <summary>
        /// PLC监听端口
        /// </summary>
        [Description("PLC IP地址")]
        [Category("通信设置-PLC")]
        public string PLCIpAddress { get; set; }
 
        /// <summary>
        /// PLC监听端口
        /// </summary>
        [Description("PLC监听端口")]
        [Category("通信设置-PLC")]
        public int PLCPort { get; set; } = 9600;
 
        /// <summary>
        /// PC网络号
        /// </summary>
        [Description("PC网络号")]
        [Category("通信设置-本机")]
        public byte SNA { get; set; } = 0;
 
        /// <summary>
        /// PC节点号
        /// </summary>
        [Description("PC节点号")]
        [Category("通信设置-本机")]
        public byte SA1 { get; set; } = 10;
 
        /// <summary>
        /// PC单元号
        /// </summary>
        [Description("PC单元号")]
        [Category("通信设置-本机")]
        public byte SA2 { get; set; } = 0;
 
 
    }
 
    public class OmronFinsInputConfig : PLCInputConfigBase
    {
    }
}