Modbus I/O Servers with NI 987x Modules Error -1967353902

Updated Feb 13, 2020

Reported In


  • NI-9870
  • NI-9871

Issue Details

I would like to use a NI 9870 or NI 9871 module with Modbus I/O servers to communicate with my Modbus Serial device and I am not getting data back. Is it possible to set this communication up?  I get the following error when I try to connect to any of the ports of the 987x module:  
Error:  -1967353902 (0x8ABC8FD2)

Possible reason(s):
LabVIEW DSC: The Modbus I/O server failed to receive any response from the Modbus slave device. Ensure that the Modbus slave device works properly and that the connection between the Modbus master and slave devices is configured correctly.

This error or warning occurred while reading the following Shared Variable:
\\RT CompactRIO Target\9068_master\000001-065535

I am able communicate with the ports via VISA test panel, but not through the Modbus I/O servers.


Modbus I/O servers expects a different resource mapping than the default NI 987x resource mapping.  You will need to remap the serial ports to make it work and this is only possible on NI Linux Real-Time Targets.  Using Modbus I/O servers with the NI 987x modules on non-NI Linux Real-Time targets is not supported.
  1. Enable ssh on your CompactRIO:  MAX >> System Settings >> Enable Secure Shell Server (sshd)
  2. Use an SFTP client such as FileZilla to navigate to /etc/udev/rules.d and rename ni987x.rules to ni987x.rules.bak so that you have a backup file.
  3. Download the attached ni987x.rules file and transfer it to /etc/udev/rules.d/ using the SFTP client.
  4. Reboot your CompactRIO and now you will have the first three slots on your cRIO capable to work with Modbus I/O Server.  The module in slot one will map from COM 21 to COM 24, where port 1 is COM 21, port 2 is COM 22, etc...  The module in slot two will map from COM 25 to COM 28, and slot three will map from COM 29 to COM 32.

Customizing Port Mapping

If you need to change where the modules are located in your cRIO chassis or if you need to change what COM ports each port is mapped to, you can make those changes by altering the ni987x.rules file.  Here is what each part of the rules file does:

For example, if you want to map the first port of the 987x module to COM 20, you will need to change the below entry from
KERNEL=="ttyNIRIOslot1port0", SYMLINK="ttyS20", GROUP="tty", MODE="666"
KERNEL=="ttyNIRIOslot1port0", SYMLINK="ttyS19", GROUP="tty", MODE="666"

Single 987x Module

If you are only using a single 987x module and need to be able to move it around in different slots without changing the rules file, you can do so by changing the rules entry so that the only line in there besides the first line is:
KERNEL=="ttyNIRIOslot[0-9]*", SYMLINK="ttyS1%n", GROUP="tty", MODE="666"
Note that the mapped ports for the single NI-987x will start at COM 11 and go to COM 14.  This mapping should not change regardless of which slot the module is placed in, as long as the cRIO only has a single NI-987x module in it.