Configuring a Log File Reference as a Diagnostic Tool

Create a BlackBoxRecorder.xml file to configure settings for the Battery Test System to log all channels on the real-time system for a brief period on a trigger command. This is useful for viewing events leading up to an alarm triggering or the current state of the system.

Note The Black Box Recorder does not warranty the preservation of the Real-Time System determinism and is just recommended to be used for diagnostics.

The Black Box Recorder contains two buffers that collect and report data before and after a trigger:

  • Low-speed buffer—Logs an overall summary of the system over a longer period.
  • High-speed buffer—Logs more precise channel data closely timed around the trigger.
  • Both buffers execute simultaneously when the trigger channel is changed to a non-zero value.

    Triggers store previous values of the channel data, and the current values of the channel data begin to collect until the Post-Trigger Length elapses. After the Post-Trigger Length has elapsed, all the previous and current channel data is written to a TDMS file stored in the Logging Directory.

    Note The TDMS file name consists of the date and trigger time.

    Complete the following steps to add the Black Box Recorder:

    1. Add an XML file BlackBoxRecorder.xml within the folder BTSPackages\TestStations\TestStationName on the machine in your system that contains your test station packages.
      Note You can use the template for a BlackBoxRecorder.xml file installed on the Lab PC at %Public%\Documents\National Instruments\Battery Test System\Toolkit\Examples\Templates\TestStation Package Files.
    2. Populate BlackBoxRecorder.xml, using the following elements to define your data logging preferences.
      • <BlackBoxRecorder>—Top-level tag for BlackBoxRecorder.xml file.
        • SegmentSize: Contains the approximate size of each TDMS file in MB. The default value is 0, in which case there is only one TDMS file.
      • <CustomDeviceProperties>—Container tag for other elements; contains attributes that define high- and low-speed configurations.
      • <HighSpeedConfiguration>—Contains attributes defining the configuration for the high-speed buffer.
        • TotalLength: High-speed total length. Valid values are 15, 30, 60, and 120 seconds.
        • PostTriggerLength: High-speed post trigger length. This value should be an integer and smaller than high-speed total length.
        • SampleRate: High-speed sample rate. Valid values are 100, 500, and 1000 Hz.
      • <LowSpeedConfiguration>—Contains attributes defining the configuration for the low-speed buffer.
        • TotalLength: Low-speed total length. Valid values are 60, 120, 180, and 300 seconds.
        • PostTriggerLength: Low-speed post trigger length. This value should be an integer and smaller than high speed total length.
        • SampleRate: Low-speed sample rate. Valid values are 1, 5, 10, and 20 Hz.
    3. Ensure your test station XML configuration file includes the following <Instrument> reference to the Black Box Recorder:
       <Instrument Name="Black Box Recorder" Type="BlackBox Recorder" RootChannelPath="Targets/Controller/Custom Devices/Black Box Recorder" ConfigurationInstrument.ConfigurationPath="BlackBoxRecorder.xml"/>