This commit is contained in:
luosheng
2023-11-14 10:36:25 +08:00
parent b2bc6c82a9
commit e9a8705b03
3 changed files with 8 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ namespace Modbus.Net.Modbus
} }
else if (receiveBytes.Length == 6) else if (receiveBytes.Length == 6)
{ {
if (receiveBytes[1] == 1 || receiveBytes[1] == 2) if (receiveBytes[1] == 1 || receiveBytes[1] == 3)
{ {
writeContent = null; writeContent = null;
return new ReceiveDataDef() return new ReceiveDataDef()

View File

@@ -46,9 +46,13 @@ namespace Modbus.Net
var decBytes = BytesDecact(content); var decBytes = BytesDecact(content);
var explainContent = DataExplain(decBytes); var explainContent = DataExplain(decBytes);
var returnBytes = DataProcess(explainContent); var returnBytes = DataProcess(explainContent);
if (returnBytes != null)
{
var extBytes = BytesExtend(returnBytes); var extBytes = BytesExtend(returnBytes);
return extBytes; return extBytes;
} }
return null;
}
else else
{ {
return null; return null;

View File

@@ -61,7 +61,7 @@ Manage several types of Protocol to a same calling interface.
### Machine ### Machine
Shows the Hardware PLC or other types of machine and implement a high level send and receive api. Shows the Hardware DCS or other types of machine and implement a high level send and receive api.
### Job ### Job