Reducing latency on serial ports
When a BYTE is sent from a serial device (BACnet MSTP thermostat) to a USB to 232/485 converters (USB-COMI-SI-M) it is cached on the USB converter until one of two things happened.
- Transfer size More then x BYTES are collected or
- Latency timer More then n Milliseconds (ms) expirer.
By default most ˜off the self™ USB to serial converters have a latency timer of 50ms and a transfer size of 4096 BYTES
The can be a major problem for PC utilities monitoring a serial network. The PC doesn't get the BYTES fast enough to respond to the serial device before it times out.
For example:
On a network with a BACnet MSTP thermostat and a RS485 to USB converter connected to a PC. The BACnet MSTP thermostat will send a poll to the PC and will expect the PC to respond within 100ms. If the thermostat does not receive a response within this time the thermostat will assume that the device has gone offline. When the USB to 458 converter receives the message it will stay in its buffers for 50ms before being sent to the PC. Depending on the message it may take longer then 50 ms for the PC to respond to the poll and the thermostat will consider the PC offline.
Luckily we can set the Transfer size, and latency timer.
Most USB to 485 devices that I have used have the ability to set the transfer size and the latency timer.
- Start menu > Settings > Control panel > device manager > Ports (COM & LPT) >{Select your USB to RS485 converter}
- Right click and select Properties
- Select the Port Settings tab
- Click the Advanced button
- Change the Latency Timer (mSec) to 1 or the lowest possible setting.
- Change the USB Transfer sizes to 64 or the lowest possible settings
- Save and close.
2 Comments on Reducing latency on com ports
2 Responses to Reducing latency on com ports
-
Le Tien
says:
July 17, 2013 at 9:12 pm
Thanks It's very useful for me to solve my trouble with USB2COM device.
- nico
says: May 5, 2014 at 8:27 am
I don't see those option, only for com port change and buffer reduce