| Target Support Package™ TC2 | ![]() |
rtdxBlocks in Target Support Package TC2 software
When you generate code from Simulink in Real-Time Workshop software with a To RTDX block in your model, code generation inserts the C commands to create an RTDX output channel on the target. Output channels transfer data from the target to the host.
The generated code contains this command:
RTDX_enableOutput(&channelname)
where channelname is the name you enter in the channelName field in the To RTDX dialog box.
Note To RTDX blocks work only in code generation and when your model runs on your target. In simulations, this block does not perform any operations. |
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 output channel to be created by the generated code. The channel name must meet C syntax requirements for length and character content.
Enables blocking mode (selected by default). In blocking mode, writing a message is suspended while the RTDX channel is busy, that is, when data is being written in either direction. The code waits at the RTDX_write call site while the channel is busy. Any interrupt of the higher priority will temporary divert the program execution from this site, but it will eventually come back and wait until the channel stops writing.
When blocking mode is not enabled (when the check box is cleared), writing a message is abandoned if the RTDX channel is busy, and the code proceeds with the current iteration.
Enables the RTDX channel when you start the channel from MATLAB. With this selected, you do not need to use the enable function in 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.
![]() | To Memory | Trig Fcn IQN | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |