PDA

Просмотр полной версии : OWEN Communication Library



Zulfiqor
12.09.2021, 10:22
Hi Evgeniy .
I am Using Owen Communication library 3.5.11.3 with SPK110M01.
When Using Function block MB_SerialRequest (FB) with RS-485 port, I do not understand tTimeOut timer functionality. Because When Setting tTimeout := T#100ms, function waits 100ms and gives TimeOutError when reading bigger amount of data blocks that need more than 100ms for completing request task(for example 64 bytes, RTU,9600bps) , I think function block must return TimeOutError : If no response returned in 100ms or Function can calculate approximately time to complete tasks by using relativity by uiDataCount with Baudrate that shown on related hCom port. Thanks.

Евгений Кислов
12.09.2021, 11:11
Hi, Zulfiqor.


I think function block must return TimeOutError : If no response returned in 100ms or Function can calculate approximately time to complete tasks by using relativity by uiDataCount with Baudrate that shown on related hCom port. Thanks.

Modbus specifications says:

The master is configured by the user to wait for a predetermined timeout interval ( Response time-out) before aborting the transaction.
This interval is set to be long enough for any slave to respond normally ( unicast request).

https://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf (chapter 2.6)

Therefore, we do not validate the user-specified timeout in any way.
This seems pointless, because the response time depends not only from baudrate / data count, but also from the characteristics of a particular slave, which cannot be taken into account in the calculations.

For your slave device, you can by yourself write a timeout validation function and connect its output to the tTimeout input of our MB_SerialRequest block.

Zulfiqor
12.09.2021, 18:21
Hi, Evgeniy.
Thanks for reply.
I learned modbus specification, and You are right.
I must change TimeOut parameter for every request individually.
Thanks.