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
page 4-62. Moreover, this does not require any code to be added to the application.
Perform the following steps to configure and run Subordinate mode logging:
- Start the XNET Bus Monitor.
- In XNET Bus Monitor choose Settings menu >> Interface and Database Settings
- Select the NI-XNET you want to use under Interface Name.
- Set Run Mode to Subordinate.
- If you want to use a database to decode signals from frames check Assign Database Alias (opional), select your database under Alias Name and select your cluster under Cluster Name.
- Choose Settings menu >> Logging, check Enable logging to disk and set your logging format and destination file name.
- 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.
- Run your application. When the application starts communicating over NI-XNET the logging will start.
- 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.