6
2. Building a Model
This guide assumes that the user has installed Raptor™ with a compatible versions of Matlab and
Simulink Coder. For details about compatible versions of Matlab and Raptor™ see section 1.2.2
2.1 Getting Started
Creating a New Model
With Matlab open, enter ‘
raptor_create_touch_display_project('
example_project
');
’ into the
command window. Simulink should open a model like the one shown in figure 2.1.1.a.
Figure 2.1.1.a – A Template Touchscreen Display Project
Performing a Model Update (
ctrl+d
)
The user may validate a model without executing a full build by performing a Model Update.
This will validate parameters, connections, data types and block-specific constraints to let the user know
if a build will fail, and what can be done to prevent it.
Building a Raptor™ Touchscreen Display Model
In Simulink, a build can be triggered with
ctrl+b
. This will begin the task of translating blocks
placed in the model into C code and compiling them into either a PC simulator or device binary. By
default the model is configured to generate both. The simulator is useful for debugging, or doing
developing without any display hardware present. Build configuration parameters can be set in the
Target Definition block.