Serial Resource Mapping for Modbus IO Server in NI Linux RT Targets

Updated May 27, 2024

Reported In


  • CompactRIO Controller


  • LabVIEW Real-Time Module

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

When creating a Modbus IO server for a Real-Time target running NI Linux RT, the options shown for serial port are COM1-COM32

But in NI MAX, the onboard serial port I'm using is named as ASRLx::INSTR and bound to /dev/ttySx and I have no way of changing it to a COMx port

How should I configure my Modbus IO Server to be able to link the serial resources properly?


In Linux RT, serial resources are named ttySx and are 0 based, unlike COMx naming which is 1 based. So, COM1 would be mapped to ttyS0 and so on.

ttsY0 > ASRL1::INSTR > COM1
ttsY1 > ASRL2::INSTR > COM2

For example, to setup a Modbus Master that communicates with slaves on ASRL2::INSTR  bound to /dev/ttyS1 you should link the IO Server to COM2.

In the case of NI CompactRIO Controllers, the built in RS 485 port is mapped to ttsyS1, which is mapped to COM2.

Additional Information

When using IO servers with serial C series modules like NI-987X. You need to manually map them to available ttyS resources by modifying the rules files: Modbus I/O Servers with NI 987x Modules Error -1967353902 - NI