Hello,
My application use the ReadHoldingRegisters function and one time per day, it crashes in this function
procedure TIdModBusClient.DoResponseMismatch(const RequestFunctionCode: Byte;
const ResponseFunctionCode: Byte; const ResponseBuffer: TModBusResponseBuffer);
begin
if Assigned(FOnResponseMismatch) then
FOnResponseMismatch(RequestFunctionCode, ResponseFunctionCode, ResponseBuffer);
end;
and it comes from
if ((AModBusFunction or $80) = ReceiveBuffer.FunctionCode) then
DoResponseError(AModBusFunction, ReceiveBuffer.MBPData[0], ReceiveBuffer)
else
DoResponseMismatch(AModBusFunction, ReceiveBuffer.FunctionCode, ReceiveBuffer);
Result := False;
How could i do solve it?
I use v 1.7.0 and delphi 10.2
Hello, My application use the ReadHoldingRegisters function and one time per day, it crashes in this function procedure TIdModBusClient.DoResponseMismatch(const RequestFunctionCode: Byte; const ResponseFunctionCode: Byte; const ResponseBuffer: TModBusResponseBuffer); begin if Assigned(FOnResponseMismatch) then FOnResponseMismatch(RequestFunctionCode, ResponseFunctionCode, ResponseBuffer); end;
and it comes from if ((AModBusFunction or $80) = ReceiveBuffer.FunctionCode) then DoResponseError(AModBusFunction, ReceiveBuffer.MBPData[0], ReceiveBuffer) else DoResponseMismatch(AModBusFunction, ReceiveBuffer.FunctionCode, ReceiveBuffer); Result := False;
How could i do solve it? I use v 1.7.0 and delphi 10.2
Thanks