User`s guide

2 Automa tion Interface
Managing Custom Data Types with the Data Type Manager
Using custom data types, called typedefs (using the C keyword typedef), is
one of the complications you encounter when yo u u se hardware-in-the-loop
(HIL) to run a function in your project from MATLAB. Because MATLAB
does not r ecognize custom type denitions you use in your projects, it cannot
interpret data that you dene in your project code with the
typedef keyword,
or use as arguments in your function prototype (declaration).
To allow you to use functions that include custom type denitions in function
calls, Embedded IDE Link CC offers the Data Type Manager (DTM), a tool
for dening custom type d enitions to MATLAB. Using options in the D TM,
you dene one o r more custom data types for a project and use them in the
project. Or you dene your custom data types and save them to use in many
projects. This second feature is particularly useful when you use th e same
custom data types in many projects. Rather than redening your custom
types for each new project or function, you reload the types from an earlier
project t o use them again.
As programmers , usually you use typedefs for one or more of a few reasons:
Make your code more a ccessible by provid ing more inform a tion about the
variable(s)
Create a Boolean data type that C does not provide
Dene structures in your programs
Dene nonstandard data types
The DTM lets you dene all of these things in the M ATLAB context so your
C function that uses typedefs works with your MATLAB command line
functions. For reference information about the DTM, go to
datatypemanager.
Entering
datatypemanager(cc)
2-58