Before creating your Microsoft® .NET Framework custom client
application, set up the development environment. In addition to installing
the products listed in the system requirements at
do the following setup.
To build a custom application that calls the Simulink® Real-Time™ API for the .NET Framework, use a third-party development environment that can interact with .NET, such as Microsoft Visual Studio®.
To build an application (.
that calls functions from the
Real-Time API libraries, use a
third-party compiler that generates code for Win64 computers. You
can write client applications that call these functions in another
high-level language, such as C#, C++, or C.
Create a Windows® application.
To run the application on a 64-bit computer, copy
the folder where you build the executable application.
Add a reference for
your project by including the following in your code.
You can then access the types available from the Simulink Real-Time environment, for example, when creating a console or graphic display application.
Compile your Microsoft .NET Framework client application as a 64-bit application.
You can connect a target computer to
only one development computer at a time. Before starting your .NET application, be sure
to disconnect the target computer
from the development computer (
xPCTargetPC.Disconnect). You can use
slrtpingtarget from the Command Window to check whether the development
and target computers are
connected. When execution is finished, this function disconnects from the
If your development computer has additional network resources, you can connect additional target computers to the same development computer.
When your .NET application starts, first connect the development computer to the
target computer (
xPCTargetPC.Connect), and then test the link between
the development and target
Optionally, you can use the design-time capability of the Microsoft
Visual Studio environment
xPCTargetPC nonvisual component. To make these
capabilities available, carry out the following steps.
xPCFramework.dll to the Visual
xPCTargetPC object to the application
form by dragging an
xPCTargetPC control from the Toolbox
window to the design surface.
To explore and customize the
xPCTargetPC control in the design surface.
Studio Properties window
opens. In the Properties window, the
makes available its data and appearance properties.