Send data to target computer
Simulink Real-Time / Displays and Logging
This block behaves as a sink. The main purpose of this block is to write a new value to a specific parameter on the real-time application.
You can use the function
SimulinkRealTime.utils.createInstrumentationModel to create an
instrumentation model using the To Target and From
The To Target block runs as a non-real-time Simulink® block on the development computer. It is asynchronous to the real-time model running on the target computer. If the To Target block receives continuously changing input, two parameter updates can be sent to the target computer before the next sample time of the real-time application. In this case, the real-time application only uses the last parameter value received. Conversely, it is also possible for one or more sample times to elapse on the target computer before the To Target block sends the next parameter value.
In either case, the To Target block only sends parameter values to the target computer when there is a change (for example, the input of the To Target block changes).
The use of To Target blocks requires a connection between the development and target computers. Without a connection, operations such as opening a model or copying these blocks take longer than normal.
Some notes on the To Target block behavior:
To highlight the Simulink model block referenced by a To Target block, double-click the block.
If the To Target block has not yet been configured, double-clicking the block does nothing.
To edit the To Target block parameters, right-click the block and select Mask Parameters.
Target application name— Name of real-time application
automatically enters a name entry for this parameter. It is the same name as the
Simulink model that
Real-Time™ uses to build the real-time
Path to block in real-time application— Path of real-time application
automatically enters an entry for this parameter and uses it to access the block
Parameter name— Name of parameter
automatically defines the entry for this parameter and enters it. Note that the
parameter name might not match the label name for that parameter in the Block Parameters
dialog box. For example, the label name for a gain block is
value, but the parameter name is Value.
Use default target PC— Download to default target computer
Selecting this option directs Simulink Coder™ to build and download the real-time application to the default target computer. This assumes that you configured a default target computer through the Simulink Real-Time Explorer (see PCI Bus Ethernet Setup if you have not). By default, this check box is selected.
Specify target name— Name of target computer
If you deselect the Use default target PC check box, this field is displayed. Enter the name of the configured target computer.