VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected behavior whan applying model parameters from file at initialization

Hi all,

 

This issue has been reported here , back in 2016, but that post remained unanswered, so here it is again:

This is what I'm experiencing:
I have a Veristand project that contains several models (compiled from LabView), their parameters have been imported into the System Definition.
I checked the "Apply parameter values from file at initialization" option and made a txt file, containing model parameters to set (no alias file).

 

It seems that it only works as long as I only include parameters for one model. When I add parameters for multiple models, the values get switched around (It seems to me like the parameters are only identified by their 'index', not by the model they belong to).

 

(Using Veristand 2018, deploying to a RT PXI system)

 

Has anyone else encountered this? Any solutions/workarounds?

 

Thanks.
PJ

 

 

0 Kudos
Message 1 of 7
(2,651 Views)

in VS2021 in the option window of the tool menu you can choose the scope of the Global Parametres. I think in earlier versions it was also possible.

 

thumble_0-1675857797598.png

 

0 Kudos
Message 2 of 7
(2,635 Views)

@thumble - Yes, there's an option for that in VS2018 as well. i tried both "Target" and "Model" scope with the same result.

It shouldn't make much difference anyway, as the parameter names are unique in this case.

I made a small test project with 2 simple models in it today, just to try different things (attached).

 

Here's what I found so far:
- Using 1 file with parameters for 1 model works just fine.
- Using 1 file with parameters for 2 models : only 1 model's parameters are loaded.

  • The second model's parameters are loaded correctly, the first model uses its default parameter values.
  • The "Model Parameter Manager" tool shows the values in the file but the actual model uses the default parameter values. 
  • A "Model Calibration" object I added on the workspace also shows the values in the file but the actual model uses its default parameter values. 
  • Reading all the model parameters in a vi, through the VS API, shows the actual parameter values used (the model's default values).
  • As soon as I manually change 1 single  parameter value (either from the "Model Parameter Manager" or the workspace object), this value is used AND all the other parameter values for that model are updated to the values read from the initialization file.

- Using 1 master file, calling 2 separate model files ("subscript" enties) produces the same result

0 Kudos
Message 3 of 7
(2,624 Views)

Ok there seems to be an issue there, but since I not from NI, I have not the time to help you further. In case we run in the same problem I will continue the thread. Maybe there's a side effecte due to names or values: because we are localized French, if we don't adjust the language parameters (decimal separator)  the import of parameter has bias (https://forums.ni.com/t5/VeriStand/Import-export-of-model-parameter-inconsitence/td-p/4271027)

 

Hopping you find the solution soon++

 

0 Kudos
Message 4 of 7
(2,583 Views)

Thanks for your replies, thumble.

I hope someone from NI will chime in here...

 

The regional settings also crossed my mind but my PC is configured for "." (point) as decimal separator, floating point values are imported correctly (for 1 model) and even when I use only integers, the behavior is the same.

The only workaround I see at the moment is adding a custom VI under the "Services" section of the VS project that loads model parameters (using the API) when deploying. But that can't be maintained/configured from the System Definition, which is detrimental for our use case.

0 Kudos
Message 5 of 7
(2,572 Views)

Hi @Pianne,

 

You are correct that this was a bug in VeriStand 2018 and prior. It was fixed in VeriStand 2019.

 

Are you able to try in a version newer than VeriStand 2018?

Message 6 of 7
(2,376 Views)

Thank you for clarifying that, @BlairElliot.

At this time, it's not an option to update all our test rigs to a newer version of Veristand.
So, I will have to come up with a workaround.

I do, however have a PC with Veristand 2020 installed and I will verify the behavior on that machine as soon as I get a chance.

 

0 Kudos
Message 7 of 7
(2,346 Views)