Table Of Contents

Logging Incoming NI-XNET Frames

Last Modified: June 10, 2021

Create TDMS (.tdms) or NI-XNET log (.ncl) files to record incoming frame data during an NI-XNET session.

When you deploy and run the project, 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. 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. You can also replay the log file with a CAN interface across a CAN bus.

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

  1. Launch the VeriStand Editor.
  2. In the Project Files pane, double-click a system definition file (.nivssdf). System Explorer opens.
  3. Click Targets»Controller»Hardware»Chassis»NI-XNET in the configuration tree.
  4. Select an NI-XNET LIN, FlexRay, or CAN port.
  5. Click Incoming»Raw Frame Data Logging.
  6. Click New Raw Frame Data Logging .
  7. In the Add NI-XNET Logging File dialog box, configure the data logging file.
    1. Enter a XNET data logging file name.
    2. Select a file type from the drop-down.
    3. For TDMS files, enter a group name and channel name for storing the logged data.
    4. Select a destination for the log file.

      You can choose a destination on either the host computer or real-time target. For real-time targets, the destination automatically populates.

  8. Click OK. The new file appears under Raw Frame Data Logging in the configuration tree.
  9. On the XNET Data Logging Configuration page, enter a Buffer time [s] that is large enough to avoid a buffer overflow while reading data.

    The larger the buffer, the more memory is required for data logging. To avoid additional dynamic memory allocation, determine the bus load for your session before starting a data logging operation.

  10. Optional: Select a filter from the drop-down to configure filtering of the frames to log. Filtering uses frame IDs to include or exclude specific frames from the log file.
  11. Click Trigger and File.
  12. Configure when data logging starts, stops, and the operation that performs when logging restarts after a stop. For example, on a trigger channel, you can specify to start logging when value becomes zero and to stop logging when it is not zero.
  13. Save the system definition file.

Recently Viewed Topics