NI VeriStand

Showing results for 
Search instead for 
Did you mean: 

Set model parameters using Channel References (Stimulus Profile Editor)

Go to solution

Hello together,


why can i not set a new value in order to change a simulation model value as channel reference?

Is this maybe not possible, or where could be the reason?

Using a stimulus profile it works out with the update model parameter command.


I need these cannel references for simple applikations like you can see in the attachement.

0 Kudos
Message 1 of 3
Accepted by topic author mihamm

Good question. Model parameters are handled differently than model inputs and outputs. They are optimized for efficiently changing large numbers of parameters at the same time (in one clock cycle) without disrupting the execution of the model. Think of a PID controller as an example, where you need to update the P, I, and D parameters to tune the control algorithm, but you need to set them at exactly the same time so that they work with each other.


The channels in the system definition that represent the model parameters are read-only copies of the data. The model doesn't use these values for its calculations, so changing them would have no effect.


This is different than model inputs and outputs which are managed as channel values that are optimized to update continuously (every clock cycle).


The Stimulus Profile can change model parameters, because it runs on the host PC and uses a special function to change them in the background and apply those changes. A Real-Time Sequence runs in the control loop on the target. It doesn't have the same access to change model parameters in the background.


If there are variables you want to change dynamically in your model, you can consider using model inputs.

Jarrod S.
National Instruments
0 Kudos
Message 2 of 3

Thank you for your answer.
Good hint to use inports istead of parameters. I changed the values and now it seems to work.

0 Kudos
Message 3 of 3