USR-N540 User Manual www.usriot.com
Jinan USR IOT Technology Limited 49 / 73 inquiry@usriot.com
3.7.8. Serial Port Packaging Mechanism
USR-N540 can configure serial port packaging time and serial port packaging length. USR-N540 will make packaging
for the data of serial port according to the packaging length and packaging time in the transparent transmission mode.
Example for judgment of packaging time and packaging length:
① Set packaging time as 10ms, packaging length as 512 bytes
When serial port received data, USR-N540 will package and send it to network if the interval time of receiving data
is over than 10ms or data length is more than 512。
② If the value of packaging time or packaging length is 0, the packaging rule is effective for non-zero one.
③ Set packaging time and length as 0. USR-N540 will conduct default packaging time when packaging time is set
as 0ms. Namely, when serial port receiving data, USR-N540 will package and send the data to network if interval time
more than packaging time of sending 4 bytes. For example, baud rate 115200, packaging time for 4 bytes is T=0.4ms,
when the calculated value is smaller than 0.1ms, packaging time can be calculated as 0.1ms.
T= 1/baud rate*10*4
3.7.9. Flow Calculation
When USR-N540 receives data from network and then send to serial port, as the limit of serial port speed, user have
to control the flow, if not the problem of data overflow on serial port side will occur. So data flow is required to
calculated when sending data from network to serial port.
Example:
Network sends data in m bytes every n seconds. Method of checking if there is overflow: ( Supposed network
condition is good and network data transmission time is negligible)