Browse Source

fixed protocol error code check

master
Z 5 months ago
parent
commit
27464cf4dd
  1. 2
      addons/EGFramework/Module/ProtocolExtension/EGModbusExtension.cs

2
addons/EGFramework/Module/ProtocolExtension/EGModbusExtension.cs

@ -783,7 +783,7 @@ namespace EGFramework{ @@ -783,7 +783,7 @@ namespace EGFramework{
DeviceAddress = protocolBytes[0];
FunctionCode = protocolBytes[1];
FunctionType = (ModbusFunctionType)protocolBytes[1];
if(FunctionCode == 0x83){
if(FunctionCode >= 0x80){
ErrorCode = (ModbusErrorCode)protocolBytes[2];
IsError = true;
return true;

Loading…
Cancel
Save