Property Loader Step Type - Loading Limits from a Database
- Updated2025-03-28
- 2 minute(s) read
Purpose
This example demonstrates how to use the Property Loader step type to load step properties, such as limits for Numeric Limit Test steps, from a database.
Example File Location
<TestStand Public>\Examples\Built-In Step Types\Property Loader Step Type\Property Loader - Loading Limits From a Database.seq
Highlighted Features
- Database step types
- Database Viewer Application
- Property Loader steps
Major API
None
Prerequisites
TestStand loads the property values from the Access.mdb file located in the same directory as the sequence file. (32-bit TestStand) You must have the Microsoft Jet 4.0 Object Linking and Embedding Database (OLE DB) Provider installed. (64-bit TestStand) You must have the Microsoft Access Database Engine 2010 Redistributable installed. Visit ni.com/info and enter the Info Code 64TSaccdb to access the NI support article, Using Microsoft Access Databases with 64-bit TestStand, for more information about installing this provider.
How to Use This Example
This example uses a Property Loader step to load property values, including local variable values and step limits, from a Microsoft Access database file. The Property Loader step applies these values to the sequence before the test steps execute, which demonstrates how the limits and variables can be loaded each time a sequence executes.
Complete the following steps to review the Property Loader step settings.
- On the Steps pane, select the Property Loader step in the Setup step group.
- On the Step Settings tab of the Steps pane, review the items in the sources table. In this table, the database is configured as the properties source.
- On the Target File and Source Settings tab, review the properties selected in the Property Tree control. The step loads the Comp, Limits.Low, and Limits.High values for each step specified, as well as a local and file global variable.
Complete the following steps to run this example.
- Select Execute»Single Pass to run the sequence.
- When execution completes, review the report on the Report pane. The report indicates that the Video step failed because the test result of 65 was not within the acceptable limits.
- Complete the following steps to edit the database to include an acceptable value.
- Select Tools»Database Viewer to launch the TestStand Database Viewer application.
- Select File»Open, browse to <TestStand Public>\Examples\Built-In Step Types\Property Loader Step Type\Access.mdb, and click OK.
- Right-click the STEP_PROPERTIES table in the Database Explorer pane and select View Data.
- Right-click the table and select Edit Data.
- Change the value of the LIMITS_LOW field for the video record from 71 to 60. Click the Submit button to submit the values to the database.
- Close the Database Viewer application.
- Select Execute»Single Pass to run the sequence again.
- When execution completes, review the report on the Report pane. The report indicates that the Video step passed because the test result is now within the acceptable limits.