@ -29,5 +29,10 @@ namespace SlnMesnac.Config
/// PLC Key
/// </summary>
public string plcKey { get; set; }
/// <summary>
/// 是否启用
public bool isFlage { get; set; }
}
@ -43,7 +43,10 @@ namespace SlnMesnac.Plc
{
foreach (var item in _appConfig.plcConfig)
AddPlc(item.plcType, item.plcIp, item.plcPort, item.plcKey);
if (item.isFlage)
else
@ -27,14 +27,16 @@
"plcType": "MelsecBinaryPlc",
"plcIp": "127.0.0.1",
"plcPort": 6000,
"plcKey": "mcs"
"plcKey": "mcs",
"isFlage": false
},
"configId": 2,
"plcKey": "cwss"
"plcKey": "cwss",
]