Using Moxa’s Nport 5110A series to ethernet converters with Modbus ASCII to remedy Distance Limitation
Serial RS232/422/485 has a distance limitation with legacy wiring of 15M/1200M/1200M respectively. To overcome the distance limitation, a TCP to Serial converter is commonly used to extend the distance capabilities of Serial. Additionally, the serial converter can make use of existing Ethernet & TCP infrastructure.
It may be assumed that because Modbus ASCII is simply serial data, that a TCP to Serial converter should just work – a common misconception.
The Serial Converter buffers serial data, when the buffer is full the data is converted to pure serial and placed on the serial bus. However, because Modbus ASCII data is represented as ‘Frames’ with a header and footer – it is possible that only partial frames will be transmitted to the Modbus Slave devices.
The Nport is actually Modbus unaware, however we can manipulate the data to send correctly formed frames with the Nport ‘Delimiter’ function. This feature, ensures that the NPort will send the data only when the end of the frame is encountered, in this case CR LF or ASCII Chr(013) Chr(010).
Modbus ASCII Frame delimiting.
- To configure frame delimiting on the Nport series.
- Find the port operating settings:
- Insert the first delimiter ‘CR’ as a Hex value 0d.
- Insert the second delimiter ‘LF’ as a Hex value 0a.
- Set the Delimiter Process to ‘Do Nothing’
- Save the settings and reboot.