| Target Support Package™ TC2 | ![]() |
rtdxBlocks in Target Support Package™ TC2 software
When you generate code from Simulink® in Real-Time Workshop® software with a From RTDX block in your model, code generation inserts the C commands to create an RTDX input channel on the target. Input channels transfer data from the host to the target.
The generated code contains this command:
RTDX_enableInput(&channelname)
where channelname is the name you enter in Channel name.
Note From RTDX blocks work only in code generation and when your model runs on your target. In simulations, this block does not perform any operations, except generating an output matching your specified initial conditions. |
To use RTDX blocks in your model, you must do the following:
Enable the RTDX channels from MATLAB® or use Enable RTDX channel on start-up on the block dialog.
Use the readmsg and writemsg functions in MATLAB to send and retrieve data from the target over RTDX.

Name of the input channel to be created by the generated code. The channel name must meet C syntax requirements for length and character content.
Blocking mode instructs the target processor to pause processing until new data is available from the From RTDX block. If you enable blocking and new data is not available when the processor needs it, your process stops. In nonblocking mode, the processor uses old data from the block when new data is not available. Nonblocking operation is the default and is recommended for most operations.
Data the processor reads from RTDX for the first read. If blocking mode is not enabled, you must have an entry for this option. Leaving the option blank causes an error in Real-Time Workshop software. Valid values are 0, null ([ ]), or a scalar. The default value is 0.
0 or null ([ ]) outputs a zero to the processor. A scalar generates one output sample with the value of the scalar. If Output dimensions specifies an array, every element in the array has the same scalar or zero value. A null array ([ ]) outputs a zero for every sample.
Time between samples of the signal. The default is 1 second. This produces a sample rate of one sample per second (1/Sample time).
Dimensions of a matrix for the output signal from the block. The first value is the number of rows and the second is the number of columns. For example, the default setting [1 64] represents a 1-by-64 matrix of output values. Enter a 1-by-2 vector for the dimensions.
Sets a flag at the block output that directs downstream blocks to use frame-based processing on the data from this block. In frame-based processing, the samples in a frame are processed simultaneously. In sample-based processing, samples are processed one at a time. Frame-based processing can increase the speed of your application running on your target. Throughput remains the same in samples per second processed. Frame-based operation is the default.
Type of data coming from the block. Select one of the following types:
Double — Double-precision floating-point values. This is the default. Values range from -1 to 1.
Single — Single-precision floating-point values ranging from -1 to 1.
Uint8 — 8-bit unsigned integers. Output values range from 0 to 255.
Int16 — 16-bit signed integers. With the sign, the values range from -32768 to 32767.
Int32 — 32-bit signed integers. Values range from -231 to (231-1).
Enables the RTDX channel when you start the channel from MATLAB. With this selected, you do not need to use the enable function in the Embedded IDE Link™ CC software to prepare your RTDX channels. This option applies only to the channel you specify in Channel name. You do have to open the channel.
ticcs, readmsg, To RTDX, writemsg.
![]() | Read From Memory | Idle Task | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |