Update reading and writing modbus protocol by a waiting time

This commit is contained in:
atef 2025-09-18 12:34:56 +02:00
parent 037b411d6b
commit a094c4f080
2 changed files with 6 additions and 3 deletions

View File

@ -41,7 +41,7 @@ public class ModbusDevice<[DynamicallyAccessedMembers(All)] R> where R : notnull
foreach (var batch in _Batches)
{
batch.Read(record);
Thread.Sleep(50); // this added mainly for Growatt reading
Thread.Sleep(30); // this added mainly for Growatt reading
}
return record;
}
@ -49,6 +49,9 @@ public class ModbusDevice<[DynamicallyAccessedMembers(All)] R> where R : notnull
public void Write(R record)
{
foreach (var batch in _Batches)
{
batch.Write(record);
Thread.Sleep(50); // this added mainly for Growatt reading
}
}
}