添加modbus tcp协议是否检查连接id的属性

This commit is contained in:
2248356998 qq.com
2023-03-06 15:12:54 +08:00
parent dfe4bee2b4
commit 17624c1e4c
2 changed files with 4 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ namespace ThingsGateway.Modbus
[DeviceProperty("端口", "")] public int Port { get; set; } = 502;
[DeviceProperty("默认站号", "")] public byte Station { get; set; } = 1;
[DeviceProperty("读写超时时间", "")] public ushort TimeOut { get; set; } = 3000;
[DeviceProperty("连接标识检测", "")] public bool MessageIdCheckEnable { get; set; }
public override void AfterStop()
{
@@ -60,6 +61,7 @@ namespace ThingsGateway.Modbus
_plc.ConnectTimeOut = ConnectTimeOut;
_plc.Station = Station;
_plc.TimeOut = TimeOut;
_plc.IsCheckMessageId = MessageIdCheckEnable;
}

View File

@@ -29,6 +29,7 @@ namespace ThingsGateway.Modbus
[DeviceProperty("端口", "")] public int Port { get; set; } = 502;
[DeviceProperty("默认站号", "")] public byte Station { get; set; } = 1;
[DeviceProperty("读写超时时间", "")] public ushort TimeOut { get; set; } = 3000;
[DeviceProperty("连接标识检测", "")] public bool MessageIdCheckEnable { get; set; }
public override void AfterStop()
{
@@ -57,6 +58,7 @@ namespace ThingsGateway.Modbus
_plc.ConnectTimeOut = ConnectTimeOut;
_plc.Station = Station;
_plc.TimeOut = TimeOut;
_plc.IsCheckMessageId = MessageIdCheckEnable;
}
public override bool IsSupportAddressRequest()