Logging Incoming NI-XNET Frames

NI VeriStand 2018 Help

Edition Date: May 2018

Part Number: 372846M-01

»View Product Info
Download Help (Windows Only)

You can create TDMS (.tdms) or NI-XNET log (.ncl) files from NI VeriStand and use them to record incoming frame data during an NI-XNET session. For CAN interfaces, you also can replay the log file across the CAN bus.

Note  Refer to the NI-XNET Logfile Specification, available in the NI-XNET\Documentation directory, for more information about the .ncl file format.

Complete the following steps to create a log file and configure frame logging.

  1. In the System Explorer window configuration tree, navigate to the Incoming node under an NI-XNET LIN, FlexRay, or CAN port.
  2. Expand Incoming and select Raw Frame Data Logging.
  3. Click the New Raw Frame Data Logging file toolbar button () to display the Add NI-XNET Logging File dialog box.
  4. Specify a name, destination, and file type for the log file. The destination can be on either the host computer or an RT target. However, in the case of an RT target, the destination is populated automatically. You cannot modify the destination path from what appears in the dialog box.
  5. (TDMS only) Specify a Group name and Channel name for storing the logged data.
  6. Click OK. The new file appears under Raw Frame Data Logging in the configuration tree.
  7. Select the log file to display the XNET Data Logging Configuration page.
  8. On the General tab under Data Logging Settings, specify a Number of bytes to read that is large enough to avoid a buffer overflow while reading data.
    Note   The larger the number you specify, the more memory data logging requires. To avoid additional dynamic memory allocation, try to figure out the bus load for your session before starting a data logging operation.
  9. (Optional) Use the Filter option to configure filtering of the frames to log. Filtering uses frame IDs to include or exclude specific frames from the log file.
  10. On the Trigger and File tab, configure the mechanism you want to use to start and stop logging and the Operation to perform when logging restarts after a stop. For example, you can specify to start logging data when the value of the Trigger channel becomes zero, and to stop logging when that condition no longer is true.
    Tip  Refer to the XNET Data Logging Configuration page help topic for detailed information about all the triggering options.

When you deploy and run the project, NI VeriStand logs the frame data you specify to the log file when the trigger condition you specify is met. You can add multiple log files to a single system definition file, and a single log file can store data from multiple clusters within an XNET database. If you do not configure filters on the log file, it simply stores everything that is received on the port.

Monitoring Logging Status

Each log file has the following associated channels that contain data about the logging operation:

  • Error—Stores the most recent logging error.
  • Finished Files—Stores the number of completed log files for the current session of the VeriStand Engine. You can use this channel to determine when a file is ready for use by other processes.
  • Status—Stores the current status of the data logging process. If Status is TRUE, data is logging.

You can monitor these channels from UI Manager or the Workspace or map them to other channels within the project.

WAS THIS ARTICLE HELPFUL?

Not Helpful