mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-20 10:50:48 +08:00
添加modbus tcp协议是否检查连接id的属性
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user