User`s guide

vi Contents
11
xPC Target and Fortran
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2
Simulink Demos Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
Steps to Incorporate Fortran in Simulink for xPC Target . . . . 11-3
Step-by-Step Example of Fortran and xPC Target . . . . . . . 11-5
Creating an xPC Target Atmosphere Model for Fortran . . . . . 11-5
Compiling Fortran Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7
Creating a C-MEX Wrapper S-Function . . . . . . . . . . . . . . . . . . 11-9
Compiling and Linking the Wrapper S-Function . . . . . . . . . . . 11-9
Validating the Fortran Code and Wrapper S-Function . . . . . 11-10
Preparing the Model for the xPC Target Application Build . 11-11
Building and Running the xPC Target Application . . . . . . . . 11-13
12
Troubleshooting
General Troubleshooting Hints and Tips . . . . . . . . . . . . . . . 12-2
Installation, Configuration, and Test Troubleshooting . . 12-7
Advanced Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . 12-14
13
Target PC Command-Line Interface Reference
Target PC Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2
Target Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Target Object Property Commands . . . . . . . . . . . . . . . . . . . . . . 13-3
Scope Object Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5
Scope Object Property Commands . . . . . . . . . . . . . . . . . . . . . . 13-8
Aliasing with Variable Commands . . . . . . . . . . . . . . . . . . . . . 13-10