Add receiver (not complete)
This commit is contained in:
55
Samples/ModbusTcpToRtu/appsettings.json
Normal file
55
Samples/ModbusTcpToRtu/appsettings.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"Serilog": {
|
||||
"MinimumLevel": {
|
||||
"Default": "Information",
|
||||
"Override": {
|
||||
"Microsoft": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"Quartz": {
|
||||
"LogLevel": "Info"
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"DatabaseWriteConnectionString": "Server=127.0.0.1; User ID=root; Password=123456; Database=modbusnettest;"
|
||||
},
|
||||
|
||||
"Modbus.Net": {
|
||||
"Utility": {
|
||||
"interval": 10, //间隔时常(秒)
|
||||
"count": -1, //不要动
|
||||
"readwrite": [
|
||||
{
|
||||
"readStart": 40001, //读取开始地址
|
||||
"readCount": 16, //读取字的个数
|
||||
"writeStart": 40001 //写入开始地址
|
||||
}, //可以写多个
|
||||
{
|
||||
"readStart": 40016, //读取开始地址
|
||||
"readCount": 16, //读取字的个数
|
||||
"writeStart": 40016 //写入开始地址
|
||||
} //可以写多个
|
||||
],
|
||||
"read": {
|
||||
"type": "Tcp",
|
||||
"address": "127.0.0.1:502", //读取的设备地址
|
||||
"slaveAddress": 2, //从站地址
|
||||
"masterAddress": 1 //主站地址
|
||||
},
|
||||
"write": {
|
||||
"type": "Rtu",
|
||||
"address": "COM2", //写入的设备地址
|
||||
"slaveAddress": 3, //从站地址
|
||||
"masterAddress": 1 //主站地址
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user