添加配置连接窗口已经相关S7与ModbusTCP连接功能
This commit is contained in:
@@ -35,6 +35,15 @@ namespace DeviceCommand.Devices
|
||||
ConfigureDevice(ip, port, sendTimeoutMs, receiveTimeoutMs);
|
||||
}
|
||||
|
||||
public override async Task<bool> ConnectAsync(CancellationToken ct = default)
|
||||
{
|
||||
if (IsConnected)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return await base.ConnectAsync(ct);
|
||||
}
|
||||
|
||||
// ==================== 读取单个值 ====================
|
||||
|
||||
/// <summary>读取温度 PV(工程值)</summary>
|
||||
|
||||
Reference in New Issue
Block a user