• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
November 21, 2024, 07:54:11 am

News:

SMF - Just Installed!


Modbus timeout handling

Started by peer, December 22, 2014, 04:53:22 pm

Previous topic - Next topic

peer

How do I know which request (or address) did timeout in the TimeOut event when registers are polled?
What is the best way to handle a timeout ? Because now a timeout  on one address slows down everything.

peer


Roman Novgorodov

Hello

We are still alive :-)

The timeout is handled by following internal code:

procedure TnrModbus.DoTimeoutError;
begin
  inherited DoTimeoutError;
  if stackRequests.Count > 0
    then ConnectedDeviceRemove(TnrModbusPacket(stackRequests[0]).Address);
  PopNextRequest;
end;


But unfortunately stackRequests items are not PUBLIC for access from external.
We will resolve this issue asap.

By the way .NET version of nrComm already provides necessary functionality:
ModBus.GetCurrentRequest()

We will repeat this method in VCL release soon.

Sorry.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.