Configuring a Log File Reference as a Diagnostic Tool
- 更新时间2024-10-31
- 阅读时长2分钟
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.
The Black Box Recorder contains two buffers that collect and report data before and after a 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.
Complete the following steps to add the Black Box Recorder:
-
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.
-
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.
-
<BlackBoxRecorder>—Top-level tag for
BlackBoxRecorder.xml file.
-
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"/>