13.07.2015 Views

Simulation Interface Toolkit (SIT) Tutorial

Simulation Interface Toolkit (SIT) Tutorial

Simulation Interface Toolkit (SIT) Tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MEEN 364J. MlcakLast Update: 8/27/2006c. Label each control and indicator with a unique and descriptive name.10. Select Tools >> <strong>SIT</strong> Connection Manager:a. Select Load Model and verify that the Select Host dialog box has amachine name as “localhost” on port 6011. Click OK.b. Select the Simulink model and click OK.c. Link LabVIEW controls and indicators with Simulink blocks. Any blockthat must be varied in Simulink must be paired with a control, and everyNI Sink in Simulink must be paired with a LabVIEW indicator.i. Match a LabVIEW control with a Simulink gain or constant valueand click “Add to Connections”ii. Match a LabVIEW indicator with NI Sinks from Simulink andclick “Add to Connections”iii. Repeat for all desired connections between the LabVIEW andSimulink models.d. Click OK.11. If acquired will not be saved (logged), skip this step. For each data point that willbe logged:a. Double click the indicator on the front panel. This will take you to theindicator’s location in the Block diagram.b. Select Functions >> Output >> Write LVM and drag the Write LVMblock to a location under the indicator’s terminal block in the Blockdiagram.c. In the dialog box, select a file name where the data will be logged andsave it as a “.txt” file.d. Select options as shown in Figure 8.e. Click OK to close the dialog box.f. Use the wiring tool to connect the Signals port of the Write LVM block tothe wire that enters the indicator’s terminal block.g. Repeat steps a-f for all values that require logging.12. Save the LabVIEW VI in the project folder. A unique file name such asRUN_ME.vi will help separate this VI from the many others that were generatedin the build process.13. In LabVIEW, go to File>>Open:a. In your project folder, double-click the filename_nidll_rtw folderb. Open the filename_daq_driver.vic. Under “AI Channels” type in the analog input channels that any cables areconnected to on the terminal block.d. Under the “AO Channels” type in the analog output channels that anycables are connected to on the terminal block.e. Save the filename_daq_driver.vi and close it.14. If the PXI box is not already on, turn it on and allow it to boot.15. Run the VI created that has the user interface (RUN_ME.vi):a. In the dialog box type the following:i. Machine Name/IP: Type in the IP address listed on the PXI boxii. Port: 6011b. Check the “RT Target?” box12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!