NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

mulitnumeric limits loading from database

Hi, Sir,

I am trying to use property loader step in TestStand to load multinumeric limits from a database table for different measurements in multinumeric test step. The database table has several columns such as: stepname, measurementname, hi/low limits. To load the limits for different measurement correctly using single property loader step, I have to match both the step name and measurement name in its filtering page. My question is how should I do this? More specific, how can I access the measurement name attached with different loading properties during run time?

I do not find any example for this problem. Most examples seem to be for TestStand 1.0, which has no multinumerica test step type.

Thank you for your help.


Yin
0 Kudos
Message 1 of 4
(3,539 Views)
Hi Yin,

Yes, you are correct. In order to use the Property Loader with any test sequence, there must be a 1-to-1 mapping of the properties in your sequence to the columns in your table.

To acheive what you are trying to do, then you must set the filtering tab on the property loader as follows:

Column Name: STEP_NAME
Value: Locals.MyValue
Format: ""

Now what you need to do is change the value of Locals.MyValue to contain the value of the step for which you wish to load the properties for. Please let me know if this answers your question. If not, please be more specific, perhaps an example.

Bob
0 Kudos
Message 2 of 4
(3,539 Views)
Hi, Bob,

Thank you for your help.

I think I need to make my question more clear. I need to load some hi/low limits from database table for a multinumeric test step which has several different measurements such as: voltage, current, resistance. In my database table, I have 4 columns: stepname, measurementname, hi_limit, low_limit, and I save these information in this table. I need to load hi/low limits for these 3 measurements with a property loader step, so 6 properties in my property list. But I only have 2 columns for hi/low limits in my table. So I have to match both stepname and the measurementname for each property in order to locate the correct value for a specific property. Matching stepname is easy because it is fixed in the sequence, but matching
measurementname during run time is my problem. Do you have any idea on how to make this happen?

Thanks again.

Yin
0 Kudos
Message 3 of 4
(3,539 Views)
Yin,

In your database, you should have a column for each high and low limit and comparison for each multiple numeric limit test step. For example, if I have 2 measurements in my multiple numeric limit test step, I will have the following columns: StepName, Result_Measurement_0_Comp, Result_Measurement_0_Limits_High, Result_Measurement_0_Limits_Low,
Result_Measurement_1_Comp, Result_Measurement_1_Limits_High, Result_Measurement_1_Limits_Low.

After your database is set up, you would use the property loader step to read the values in during run-time. If you insert a property loader step and configure the Data Location to be a database, you can configure which database and table you want to read from. Then near the bottom of the property loader dialog, there are two fields. One is for Property Name and the other is for Column Name/Number. You use these fields to assign a certain column to a certain property. So for this case, we would choose one of the limit properties that we want to load from the database and assign that to a certain column. For example, the Property Name would be Result.Measurement[0].Comp and its corresponding Column Name/Number would be the database column Result_Measurement_0_Comp. The next Property Name would be Result.Measurement[0].Limits.High and its corresponding Column Name/Number would be the database column Result_Measurement_0_Limits_High. You would continue to assign a particular column to each property that you want to read in.

In using the Property Loader step type, it is immensely helpful to use the Import/Export Properties tool to create the database, Excel file, or text file because the tool will create these files with the correct format. You would then know exactly how many columns and their names because TestStand created them for you. Even if you plan to use a pre-existing source file, just creating the default source file will give you a better idea of how you will need to tailor your pre-existing database or excel or text file.

If you have other questions, let us know.

Regards,
Shannon R.
Applications Engineer
National Instruments
Message 4 of 4
(3,539 Views)