MATLAB XPC TARGET 4 - DEVICE DRIVERS Guida Utente Pagina 84

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 111
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 83
7 Creating Custom Drivers Using the xPC Target™ D river Authoring Tool
You can iteratively change the configuration and resave the MAT-file a s often
as you like.
Reloading the Configuration
The xPC Target Driver Authoring Tool allows you to reload your configuration
session as a MAT-file.
1 In the xPC Target Driver Authoring Tool, click the Main tab.
2 Click Load settings.
The tool loads the
testdriver.mat file into the tool.
Creating the C File Template
To generate a template for the driver C source code file:
1 In the xPC Target Driver Authoring Tool, click the Main tab.
2 Select Generate C file template.
3 Click the Build button.
The tool creates the following files:
testdriver.c
testdriv er.h
sfcn_tes tdriver.c
sfcn_tes tdriver.tlc
4 With your favorite editor, open the testdriver .c file and edit i t. This is the
source C code for your driver. The S-function code in
sfcn_testdriver.c
will reference this C file.
Creating a C MEX File for the Driver
To create a C MEX file for the driver, yo u can use either the xPC Target
Driver A u tho ring Tool or the
mex function.
7-8
Vedere la pagina 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 110 111

Commenti su questo manuale

Nessun commento