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)
{
if (receiveBytes[1] == 1 || receiveBytes[1] == 2)
if (receiveBytes[1] == 1 || receiveBytes[1] == 3)
{
writeContent = null;
return new ReceiveDataDef()

View File

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

View File

@@ -61,7 +61,7 @@ Manage several types of Protocol to a same calling interface.
### 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