-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathform_config.json
More file actions
180 lines (180 loc) · 6.66 KB
/
form_config.json
File metadata and controls
180 lines (180 loc) · 6.66 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[
{
"type": "table",
"label": "Modbus配置",
"dataKey": "CommandRawList",
"array": [
{
"type": "select",
"dataKey": "FunctionCode",
"label": "功能码",
"options": [
{
"label": "01/05: 读/写线圈(开关量)",
"value": 1
},
{
"label": "02: 读输入位状态(开关量只读)",
"value": 2
},
{
"label": "03/06/16: 读/写保持寄存器(数值)",
"value": 3
},
{
"label": "04: 读输入寄存器(数值只读)",
"value": 4
}
],
"placeholder": "请选择要读取或写入的数据类型",
"validate": {
"type": "number",
"required": true,
"message": "请选择功能码"
}
},
{
"type": "input",
"dataKey": "Interval",
"label": "采集周期(单位:秒)",
"placeholder": "请输入数据采集的时间间隔",
"validate": {
"type": "number",
"rules": "/^\\d{1,}$/",
"required": true,
"message": "采集周期必须为正整数"
}
},
{
"type": "input",
"dataKey": "StartingAddress",
"label": "起始地址(十进制,从0开始)",
"placeholder": "请输入寄存器或线圈的起始地址",
"validate": {
"type": "number",
"rules": "/^\\d{1,}$/",
"required": true,
"message": "起始地址必须为非负整数"
}
},
{
"type": "input",
"dataKey": "Quantity",
"label": "读取数量",
"placeholder": "请输入要读取的连续地址数量(需与数据类型匹配)",
"validate": {
"type": "number",
"rules": "/^\\d{1,}$/",
"required": true,
"message": "读取数量必须为正整数"
}
},
{
"type": "select",
"dataKey": "DataType",
"label": "数据类型(功能码01/02选择线圈)",
"options": [
{
"label": "线圈(占用1个地址)",
"value": "coil"
},
{
"label": "16位整数(占用1个地址)",
"value": "int16"
},
{
"label": "16位无符号整数(占用1个地址)",
"value": "uint16"
},
{
"label": "32位整数(占用2个地址)",
"value": "int32"
},
{
"label": "32位无符号整数(占用2个地址)",
"value": "uint32"
},
{
"label": "64位整数(占用4个地址)",
"value": "int64"
},
{
"label": "32位浮点数(占用2个地址)",
"value": "float32"
},
{
"label": "64位浮点数(占用4个地址)",
"value": "float64"
}
],
"placeholder": "请选择数据存储格式",
"validate": {
"type": "string",
"required": true,
"message": "请选择数据类型"
}
},
{
"type": "input",
"dataKey": "DataIdentifierListStr",
"label": "字段标识(多个字段用英文逗号分隔,数量需与读取数据的数量匹配,例如:temp1,temp2,humidity)",
"placeholder": "请输入每个数据对应的字段名",
"validate": {
"type": "string",
"required": true,
"message": "字段标识不能为空"
}
},
{
"type": "input",
"dataKey": "EquationListStr",
"label": "数值转换公式(多个字段的公式用英文逗号分隔,支持跨字段计算,例如:temp,temp1*10,temp2+temp1)",
"placeholder": "可选,输入数值转换公式",
"validate": {
"type": "string",
"required": false
}
},
{
"type": "input",
"dataKey": "DecimalPlacesListStr",
"label": "小数位数(单个数字应用于所有字段,多个数字用逗号分隔对应各字段)",
"placeholder": "可选,设置显示的小数位数",
"validate": {
"type": "string",
"required": false
}
},
{
"type": "select",
"dataKey": "Endianess",
"required": true,
"label": "字节序",
"options": [
{
"label": "大端序(ABCD)",
"value": "BIG"
},
{
"label": "小端序(DCBA)",
"value": "LITTLE"
},
{
"label": "字节交换(BADC)",
"value": "BADC"
},
{
"label": "字寄存器交换(CDAB)",
"value": "CDAB"
}
],
"placeholder": "请选择多字节数据的存储顺序",
"validate": {
"type": "string",
"required": true,
"message": "请选择字节序"
}
}
]
}
]