From Target

Read data from target computer

  • Library:
  • Simulink Real-Time / Displays and Logging

Description

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 Target blocks.

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.

Note

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.

Parameters

expand all

The function SimulinkRealTime.utils.createInstrumentationModel automatically enters a name entry for this parameter. It is the same name as the Simulink model that the Simulink Real-Time™ software uses to build the real-time application.

Programmatic Use

Block Parameter: appname

The function SimulinkRealTime.utils.createInstrumentationModel 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.

Programmatic Use

Block Parameter: blockpath

The function SimulinkRealTime.utils.createInstrumentationModel 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.

Programmatic Use

Block Parameter: ts

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.

Programmatic Use

Block Parameter: isdefault

If you deselect the Use default target PC check box, this field is displayed. Enter the name of the configured target computer.

Programmatic Use

Block Parameter: targetname

Introduced in R2014a