LabVIEW Simulation Interface Toolkit API Reference

SIT Write VI

  • Updated2023-02-21
  • 4 minute(s) read

SIT Write VI

Owning Palette: User Interface VIs

Requires: Simulation Interface Toolkit

Writes a new value to a model parameter.

Example

SIT Reference in specifies information about the current simulation.
TCP Connection specifies the TCP reference for the current connection to the SIT Server.
Model Name specifies the name of the current model.
Server Type specifies the type of execution host on which the SIT Server is running.

0Simulation Environment (default)—Specifies that the SIT Server is running on an execution host that is running The MathWorks, Inc. MATLAB® application software.
1MATRIXx—Specifies that the SIT Server is running on an execution host that is running Xmath. The LabVIEW Simulation Interface Toolkit does not currently support this option.
2RT—Specifies that the SIT Server is running on a real-time (RT) target.
Parameter Name specifies the path to a model parameter. You must format Parameter Name with the following syntax:

modelname/subsystem1/subsystem2/subsystemN/Block/Parameter

For example, if you want to manipulate the Amplitude parameter of the Sine Wave block in a model named sinewave, format Parameter Name as sinewave/Sine Wave/Amplitude.
NewVal specifies the value you want to write to the model parameter.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
OldVal specifies the previous value of Parameter Name. If the simulation is running on an RT target and Parameter Name is nonscalar, the SIT Server updates only the changed elements of Parameter Name. Wiring a value to OldVal helps ensure that the current task completes within the task deadline, because the SIT Server updates only the necessary element of Parameter Name. If you do not specify a value for OldVal, the SIT Server updates every element of Parameter Name. OldVal has no effect on a non-RT simulation.
SIT Reference out returns information about the current simulation.
TCP Connection returns the TCP reference for the current connection to the SIT Server.
Model Name returns the name of the current model.
Server Type returns the type of execution host on which the SIT Server is running.

0Simulation Environment (default)—Specifies that the SIT Server is running on an execution host that is running The MathWorks, Inc. MATLAB® application software.
1MATRIXx—Specifies that the SIT Server is running on an execution host that is running Xmath. The LabVIEW Simulation Interface Toolkit does not currently support this option.
2RT—Specifies that the SIT Server is running on a real-time (RT) target.
error out contains error information. This output provides standard error out functionality.

Example

Refer to the batch simulation VI in the labview\examples\Simulation Interface\Batch Simulation directory for an example of using the SIT Write VI.