NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

property loader / property saver

Property loader works really well, but I have a question ...
 
Where is the ability to 'Property save?'. I see the menu item, import/export properties.
 
Is there an equivalent test stand statement that allows me to save properties from a sequence while it is executing?
 
 
0 Kudos
Message 1 of 12
(5,379 Views)

checkers,

There is not such a thing like a property saver in TestStand.
If you are using a Database as your datasource you could use the Database step types to change the database data.
Another possible solution would be to write your own property saver step type based on the source code shipped under \\TestStand\Components\NI\StepTypes\Database.

Could you describe the problem you are trying to solve?

Antonio Lie.

Best Regards.

 

0 Kudos
Message 2 of 12
(5,369 Views)

I have a test sequence that calculates some calibration values which are then stored in FileGlobals. Property loader is used to pre-load the values.
The calibration sequence is run once a week to validate the measurement system. If a problem is found, new calibration values are calculated and stored in FileGlobals.

So the problem is that I need to save these values (when they are caluclated) into the file that property loader will use the next time we run products.

My preference would be to use a DB, but I have limited time available to learn how to do that. I have manually saved the values to an Access DB, but I do not understand how to update those values in a test sequence.

Have you any good examples of how to write values back to a DB that was populated by Import/Export Properties ...?

0 Kudos
Message 3 of 12
(5,357 Views)

Hi,

In the TestStand Reference Manual there are some steps to setting up the database. see chapter 6 - 14.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 12
(5,352 Views)

Ray,

Doesn't NI have any publications that are less complicated than this? I am not interested in logging test data. I am only interested in storing and retrieving a few values.

 

0 Kudos
Message 5 of 12
(5,345 Views)

Hi,

The procedure is the same whether you wish to log test data or save and retrive some values. The difference will be the schema.

I am sure there's an example some where, are you using version 3.5?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 6 of 12
(5,343 Views)

I am using TS 3.5

I don't have a lot of time to weed through the documentation now, so an example may help.

I am aware that there is a lot of setup work to do. I managed to use property loader to save a selection of the FileGlobals to an Access DB, but I never understood how to re-write them manaully. So, I'm certain that I could set up the database with the columns that I want.

What I need is some info on embedding some SQL statements in the test sequence to save new DB records.
(I didn't have a schema defined for the property loader, as far as I know. )

0 Kudos
Message 7 of 12
(5,342 Views)
checkers18,
 
I am attaching a simple example that uses TestStand database step types to update the values in the database.
The attachment contains an Access database (testdb.mdb). The table where the calibration values are stores is LIMITS.
I created 3 calibration values to impor (export).
FileGlobals.CalibrationVal1.
FileGlobals.CalibrationVal2.
FileGlobals.CalibrationVal3.
The sequence imports the calibration values from the database using a property loader step.
In order to pretend the values changed I ask the user to enter the new values manually one by one.
I store the temporary new values in local variables using a post expression.
Finally I update the values in the database using a DataOperation step.
 
Hope it helps.
Let me know if you have any problem.
I used TS 3.5 and Microsoft Access 2003 to create the database.
 
Antonio Lie
 

 

Message Edited by Antonio Lie (NI) on 10-03-2006 09:51 AM

Message 8 of 12
(5,333 Views)

That was what I needed to get it to work. Thanks.

Now, is it possible to make the DB calls from LabView or CVI through the TestStand API?

0 Kudos
Message 9 of 12
(5,302 Views)

checkers,

I am glad the example was useful.
The TestStand API does not provide any type of database access.
You can use the CVI SQL Toolkit or the LabVIEW Database connectivity Toolkit to make the database calls directly form CVI or LabVIEW.
In that case you would have to pass your calibration values to your module in CVI or LabVIEW and use the corresponding  toolkit to update the database.

Hope it helps.

Antonio Lie.

 

 

0 Kudos
Message 10 of 12
(5,295 Views)