Download LabVIEW Simulation Interface Toolkit User Guide
Transcript
Tutorial: Creating a User Interface for a Simulink Model ......................9 Building a New Simulink Model......................................................9 SIT Server .................................................................................10 Setting the Simulation Parameters....................................................10 Creating the User Interface...............................................................11 LabVIEW and Simulink Data Types ........................................11 Specifying the Model .......................................................................12 Creating Connections .......................................................................14 Modifying Connections.............................................................16 Interacting with the Simulink Model................................................16 Understanding the Block Diagram of the Host VI ..................................18 Initializing the Simulation ................................................................18 Changing Parameter Values Using LabVIEW Controls ..................19 Updating the Indicator Values..........................................................21 Tutorial: Converting a Simulink Model into a Model DLL ....................21 Tutorial: Communicating with the Model DLL ......................................23 Understanding Model VIs, Driver VIs, and a Model DLL......................25 Model Interface VIs..........................................................................26 Exchanging Data with the Model DLL ............................................26 Creating a LabVIEW VI to Call the Model DLL.............................27 Creating a Real-Time Model-Based Controller ...............................28 Running Simulations without the Simulation Interface Toolkit Server ................................................................................29 Simple Model Interface VIs .............................................................30 Modifying Parameters in the Model DLL Using a Driver VI ..........30 Designing a Batch Simulation .................................................................32 Setting the Initial Conditions for the Batch Simulation ...................32 Understanding the Block Diagram of the Batch Simulation VI.......34 Initializing the Batch Simulation...............................................34 Setting the Parameter Values ....................................................34 Updating the Output Indicator...................................................35 Where to Go from Here ...........................................................................36 System Requirements To use the Simulation Interface Toolkit, you must be a properly licensed user of and have the following software installed on the host computer. • The MathWorks MATLAB 6.0 or later • The MathWorks Simulink 4.0 or later • The MathWorks Real-Time Workshop 4.0 or later • Microsoft Visual C++ 5.0 or later • National Instruments LabVIEW 7.0 or later, Full or Professional Development Systems LabVIEW Simulation Interface Toolkit User Guide 2 ni.com