USR-N580 User Manual technical support:h.usriot.com
Jinan USR IOT Technology Limited
31
www.usriot.com
5. General Functions
5.1 Serial Packaging Mechanism
USR-N580 can configure serial port packaging time and serial port packaging length. USR-N580 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:
1. Set packaging time as 10ms, packaging length as 512 bytes.
When serial port received data, USR-N580 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。
2. If the value of packaging time or packaging length is 0, the packaging rule is effective for non-zero one.
3. Set packaging time and length as 0.
USR-N580 will conduct default packaging time when packaging time is set as 0ms. When serial port
receiving data, USR-N580 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
When USR-N580 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)
If there is no overflow, m bytes data must be transmitted within n seconds, then the transmitting time of M
bytes data:
If n >2T, then data will not overflow, USR-N580 can work normally. Just need keep n>T under baud rate 9600.
5.2 Flow Control
1. NONE: No flow control.
2. Xon/Xoff: Software flow control function. It is disabled by default. In this mode, the command character
of serial port sends data is 0x11. 0X13 is not allowed.