Generating Unique Paths for Working and Archive Directories for Each DUT
- Updated2024-10-31
- 4 minute(s) read
Generating Unique Paths for Working and Archive Directories for Each DUT
The Battery Test System Software provides tokens that you can use in the VeriStand system definition file. Use the tokens as a folder path for any custom asset files generated by VeriStand add-ons or custom devices (for example, TDMS log files generated by the NI-XNET VeriStand Addon) to publish files to SystemLink.
The following tokens are available:
-
%CUSTOM_ASSET_WORKING_PATH%: Use this token for a folder path that
contains asset files that are a work in progress. The format is
%CUSTOM_ASSET_WORKING_PATH%[socketNum],
where [socketNum] denotes a non-negative integer
representing the applicable test station socket.
For example, %CUSTOM_ASSET_WORKING_PATH%1, %CUSTOM_ASSET_WORKING_PATH%2, etc.
-
%CUSTOM_ASSET_ARCHIVE_PATH%: Use this token for a folder path that
contains asset files that are complete and closed. The format is
%CUSTOM_ASSET_ARCHIVE_PATH%[socketNum],
where [socketNum] denotes a non-negative integer
representing the applicable test station socket.
For example, %CUSTOM_ASSET_ARCHIVE_PATH%1, %CUSTOM_ASSET_ARCHIVE_PATH%2, etc.
Conditions for Using the Tokens
You must satisfy the following conditions to use the tokens correctly:
- Use tokens pairwise per socket in the system definition file.
For example, if you enter the working path tokens for sockets 1 and 2 (%CUSTOM_ASSET_WORKING_PATH%1 and %CUSTOM_ASSET_WORKING_PATH%2, respectively) in the system definition file, but only enter the archive path token for socket 1, the test plan execution errors because the archive path token for socket 2 is missing in the system definition file.
- Ensure tokens follow the expected format exactly. Do not append or prepend additional strings to the tokens.
The VeriStand Addon or custom device that uses the custom asset tokens must satisfy the following conditions:
- The token must be saved as a String tag inside the
Property attribute. If the token is not saved internally as
indicated, a folder path does not replace the token.
To verify that the Addon or custom device can use the entered token, save the system definition file and verify that the data is saved with a String tag under a Property attribute in the raw XML file.
The following example demonstrates an appropriate input field:
<Property Name="user.CD.data logging file path"> <String>%CUSTOM_ASSET_WORKING_PATH%1</String> </Property> - The VeriStand Addon or custom device must support either file archival or file
segmenting. If the VeriStand Addon or custom device supports neither, you should not
use the feature. Using the feature incorrectly may result in the VeriStand Addon or
custom device moving files to SystemLink prematurely.
- File archival—the capability to move in-work files from a working folder to
an archive folder when files are complete and closed.
If the VeriStand Addon or custom device supports file archival, you may provide the appropriate tokens to its working folder and archive folder input settings.
- File segmenting—the capability to split files as operations
continue. For example, you
can split TDMS log files every 1 MB or every
1 hour. As files are completed and
closed, you can move files to an archive directory using the File Mover
custom device.
If the VeriStand Addon or custom device supports file segmenting, you may use the File Mover custom device provided by the Battery Test System Software to move files from a working to archive folder. Refer to Transferring Data Log Files to an Archive Directory and to the SystemLink Server for an example of this use case.
- File archival—the capability to move in-work files from a working folder to
an archive folder when files are complete and closed.
- The tokens must be entered for the maximum number of sockets expected for the test station in the system definition file. This feature is not compatible with the %SOCKET% token.
To publish files to SystemLink, configure your test station package to include SystemLink support. Refer to Configuring Data and File Publishing to SystemLink for more information.
The Impact of Using Tokens
When you include the custom asset path tokens in a VeriStand Addon or custom device, the Battery Test System Software does the following:
- Replaces %CUSTOM_ASSET_WORKING_PATH%[socketNum] with a unique working path for the generated test.
- Replaces %CUSTOM_ASSET_ARCHIVE_PATH%[socketNum] with a unique archive path for the generated test.
- If you configure the test station to include SystemLink support, it adds the archive folder paths for the corresponding sockets in the test plan to the SystemLink custom device as source directories and sets the corresponding socket number for each source directory.
For example, when you use tokens to configurate XNET data logging and the File Mover custom device, the Battery Test System Software replaces these tokens as shown in the following figures. Refer to Logging NI-XNET CAN/LIN Frames and Transferring Logged Data to an Archive Directory and to the SystemLink Server for more information.



Related Information
- Transferring Data Log Files to an Archive Directory and to the SystemLink Server
- Configuring Data and File Publishing to SystemLink
Create a SystemLink.xml file to configure settings for the Battery Test System for data and file publishing in the SystemLink plugin. The SystemLink plugin is a custom device for VeriStand that handles publishing of data and files from each socket within your test environment. By creating this SystemLink.xml file and completing the procedure configuring the SystemLink plugin, files generated by the Embedded Data Logger, Black Box Recorder, and XNET Logger are published to SystemLink and attached to the SystemLink Test Results associated with a given test execution.
- Logging NI-XNET CAN/LIN Frames