Reconnecting NI-XNET Modules After Network Loss on cDAQ Chassis

Updated Nov 3, 2026

Reported In

Hardware

  • NI-9860
  • CompactDAQ Controller

Software

  • LabVIEW

Driver

  • NI-XNET
  • NI-DAQ™mx

Issue Details

I am performing long-term CAN data logging using an NI cDAQ-9181 chassis with an NI 9860 CAN module. During operation, the chassis may temporarily lose network connectivity. After the connection returns, I can verify communication by performing a ping test or a Self-Test; however, my NI-XNET session does not recover correctly.
When I attempt to close the existing session and create a new NI-XNET session, the operation fails with error -1074384855. Data logging cannot resume until I stop and restart the application, after which the initialization process completes successfully.
I need a way to programmatically recover the device and resume CAN data logging after a temporary network interruption.

Solution

A temporary network loss can leave the existing NI-XNET session in an invalid state even after the cDAQ chassis becomes reachable again. In order to recover the chassis programmatically, the cDAQ chassis must be reset. This can be done by using the DAQmx Reset Device.vi, this will allow the PC to recognize the XNET modules again and resume acquisition. To achieve the reset programmatically follow these steps:
 
  1. Add the XNET Clear.vi after the acquisition loop. This allows LabVIEW to create a new NI-XNET session once the chassis detects the interfaces again.
  2. Place the DAQmx Reset Device.vi inside a while loop to reset the chassis after the network interruption occurs.
  3. Add the Clear Errors.vi after the reset operation to clear connectivity-related errors and allow the application to continue execution.
  4. Add a Wait (ms).vi or equivalent delay to give the chassis sufficient time to rediscover the installed modules.
  5. Recreate the NI-XNET session and re-establish communication with the chassis.

This is just a workaround, if the network is known to have intermittent connection loss issues, it is recommended to follow these troubleshooting steps in order to identify the rootcause of the issue: NI-XNET Module Not Detected in MAX