Log Bus Traffic With NI-XNET Bus Monitor While Running NI-XNET Application

Updated Oct 28, 2025

Environment

Driver

  • NI-XNET

Can I use the NI-XNET Bus Monitor to monitor or log CAN, LIN or FlexRay bus traffic while my NI-XNET based application is running at the same time in parallel?

This is possible when the interface NI-XNET Bus Monitor is set to Subordinate mode. A subordinate session uses the cluster and interface configuration from other sessions, in this case the user application; for more details see NI-XNET Hardware and Software Manual. Moreover, this does not require any code to be added to the application.

Perform the following steps to configure and run Subordinate mode logging:

  1. Start the XNET Bus Monitor.
  2. In XNET Bus Monitor choose Settings>>Interface and Database Settings
  3. Select the NI-XNET you want to use under Interface Name.
  4. Set Run Mode to Subordinate.
  5. If you want to use a database to decode signals from frames check Assign Database Alias (optional), select your database under Alias Name and select your cluster under Cluster Name.
  6. Choose Settings>>Logging, check Enable logging to disk, and set your logging format and destination file name.
  7. Click the Start button in NI-XNET Bus Monitor. Note that at this point logging will not yet start as the NI-XNET Bus Monitor is waiting for the application to start the session.
  8. Run your application. When the application starts communicating over NI-XNET the logging will start.
  9. Click the Stop button in NI-XNET Bus Monitor to stop logging. Note that even if you stop your application the NI-XNET Bus Monitor will keep logging and you have to stop it manually.