Sets a new parameter value in the model. The elements of non-scalars such as arrays can be set individually. The parameter you want to set is specified by its param index and subindex. The parameter structure is double buffered. Changes can be made to the parameters while the model is running. The model will not see the changes until they are applied. To apply changes to multiple parameters at the same time, set apply changes (T) to FALSE except for the last parameter of the group. This is useful if you want to change multiple values such as the elements of an array or multiple related parameters and want the changes to take affect in the same model timestep.

![]() |
apply changes (T) specifies if you want to apply the new parameter value (and any previously unapplied changes). This is the default. Set apply changes (T) to FALSE if you do not want to apply the changes immediately. The change will be applied the next time you call the VI with apply changes set to TRUE. | ||||||
![]() |
Simulation Data in specifies unique information about the model DLL. | ||||||
![]() |
param index specifies the index number of a scalar or nonscalar parameter. If the parameter is nonscalar, sub index specifies the index number of an element in that nonscalar parameter. | ||||||
![]() |
sub index specifies the index number of an element in a nonscalar parameter. | ||||||
![]() |
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| ||||||
![]() |
value specifies the new parameter value. | ||||||
![]() |
setparam (F) is TRUE if you want to set the parameter value. setparam (F) is FALSE if you do not want to set the parameter value. | ||||||
![]() |
Simulation Data out returns unique information about the model DLL. | ||||||
![]() |
set returns TRUE if you set a new parameter value. set returns FALSE if you did not set a new parameter value. | ||||||
![]() |
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|