01-20-2022 08:40 PM
I am setting up a sequence that will walk through a station setup.
One thing I want this to do is allow the user to select Results processing options and set them, one for the main results report and one or more for database entries.
Other than literally setting individual properties, is there are way to...
1) Save a configured plugin
2) Copy it to a new machine
Or maybe there's a better way to do this? I know it's probably sitting in the teststand CFG folder, but that might not be the best option either.
01-20-2022 11:08 PM
Hi Jed,
Go to results processing
In active configuration combo ..go to last entry "Manage Configuration"
Create a new configuration with some name "testcfg"
Do the configurations you need.
You can use reset to default-->inline so that you get default configuration to start with.
The file gets saved in ( for TS 2019) :
C:\ProgramData\National Instruments\TestStand 2019 (32-bit)\Cfg\ModelPlugins\ResultProcessing.cfg
Copy this file to the new machine ( overwrite existing).The new testcfg configuration should be already available and selected.
FYI here is a list of all TestStand configuration files:
https://zone.ni.com/reference/en-XX/help/370052AA-01/tsdeploysystem/infotopics/configurationfiles/
Hope this helps.
Ravi
NI Tech Support
01-21-2022 11:25 AM
OK! This is very cool, I can't believe I didn't notice those management options!
But now... is there a way to programmatically load/select a specific configuration?
01-21-2022 01:00 PM
Hi Jed,
Please refer this link :
Check for response from Jiggawax.
Ravi
01-21-2022 04:51 PM - edited 01-21-2022 04:52 PM
For the sake of completeness, I should mention that the ResultProcessing.cfg and any other model plug-in configuration file is a PropertyObjectFile and can be manipulated via the TestStand API.
This is an advanced topic and the file structure is not documented. However, if you are comfortable with C/CVI, the source code that creates and manipulates these files can found at <TestStand>\Components\Models\TestStandModels\ModelSupport2\ResultProcessing.c.
<TestStand>\Components\Models\TestStandModels\ModelSupport2\ResultProcessing.h exports a some functions from there that can be useful. These can be called from C/CVI code or from sequence steps.
Here is an excerpt:
int DLLEXPORT _stdcall AddResultProcessingPluginToConfiguration(const char * pluginSequenceFilePath, const char * configurationName, BOOL alwaysAdd, BigErrMsg errMsg);
int DLLEXPORT _stdcall AddModelPluginToConfiguration(const char *configurationFileName, const char *pluginSequenceFilePath, const char *configurationName, const char *categoryName, BOOL alwaysAdd, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall RemoveResultProcessingPluginFromConfiguration(const char * pluginSequenceFilePath, const char * configurationName, BigErrMsg errMsg);
int DLLEXPORT _stdcall RemoveModelPluginFromConfiguration(const char * configurationFileName, const char * pluginSequenceFilePath, const char * configurationName, const char * categoryName, DefaultConfigurationOptions * defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall CreateDefaultModelPluginConfigurations(CAObjHandle engine, CAObjHandle thread /* for progress messages only, can be 0 */, BigErrMsg errMsg);
int DLLEXPORT _stdcall CreateDefaultModelPluginConfiguration(const char * configurationFileName, CAObjHandle engine, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall LoadModelPluginTypesAndConfigurations(CAObjHandle engine, CAObjHandle thread /* for progress messages only, can be 0 */, const char *categoryName, const char *configurationName, BOOL loadAddons, BOOL loadPluginTypesFirst, CAObjHandle *mergedConfiguration, BigErrMsg errMsg);
int DLLEXPORT _stdcall ReadModelPluginConfiguration(const char * configurationFileName, CAObjHandle engine, const char *configurationName, CAObjHandle *configuration, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall ReadModelPluginConfigurationSet(const char *configurationFileName, CAObjHandle engine, CAObjHandle *configurationSet, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);
05-24-2024 12:19 PM
Here you can find how to use ResultProcessing.c functions in a sequence file: