Read data from target computer
Simulink Real-Time / Displays and Logging
This block behaves like a source. Its output is connected to the input of a display device.
You can use the function
SimulinkRealTime.utils.createInstrumentationModel to create an
instrumentation model using the From Target and To
The From Target block runs as a non-real-time Simulink® block on the development computer. It is asynchronous to the real-time application running on the target computer. If the real-time application has a sample time slower than the non-real-time model, the From Target block can query the target computer more than once. The target computer returns the same value in this case. Conversely, it is possible for the From Target block to miss some sample times between two successively returned values.
The use of From 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 From Target block behavior:
To highlight a signal line that a From Target block refers to, double-click the From Target block.
If the From Target block has not yet been configured, double-clicking the From Target block does nothing.
To edit the From 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 the
Real-Time™ software uses to build the real-time
Signal name (block name)— Name of block
automatically enters a name entry for this parameter. For multiple blocks, the function
creates a From Target block for each block. Using this method of
specifying signals returns signal values one per time step.
You can also manually enter a cell array of signals for this parameter. Using this method of specifying signals returns the values of a vector of signals (up to 1000) as fast as it can acquire them. The signal values may not be at the same time step and the signal values are more likely to be spaced closely together.
Observer sample time— Sample time of block
automatically enters the sample time for the Simulink block with this signal. It can be equal to the model base sample time or a
multiple of the base sample time.
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— Target computer name
If you deselect the Use default target PC check box, this field is displayed. Enter the name of the configured target computer.