Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Simulation Translator Dialog Box (Simulation Module)

LabVIEW 8.2 Simulation Module Help
September 2006

NI Part Number:
371894A-01

»View Product Info

Select Tools»Control Design and Simulation»Simulation Translator to launch this dialog box.

Use this dialog box to convert a model (.mdl) file, developed in The MathWorks, Inc. Simulink® simulation environment, into a LabVIEW VI that contains a simulation diagram.

This dialog box includes the following components:

  • Source File or Directory to Translate—Select the path to the .mdl file or directory of files you want to convert into LabVIEW block diagram code. If you select a directory, the Simulation Translator translates all .mdl files in that directory. Make sure you have permission to convert the .mdl file(s) if you are not the owner.
  • Include Subdirectories—If you enable this option and select a path to a directory in the Source File or Directory to Translate control, the Simulation Translator converts all .mdl files in the directory and all of its subdirectories. This option is enabled by default.
  • Output Directory—Select the directory in which to save all the LabVIEW VIs the Simulation Translator creates. If the Simulation Translator converts .mdl files from subdirectories, the Simulation Translator saves the resulting VIs in the same relative directory structure as the Source File or Directory to Translate directory.
  • Save CGD File(s)—Enable this option to save the Common Graph Description (CGD) file the Simulation Translator creates for each .mdl file it converts. The Simulation Translator parses and stores each system, subsystem, block, and line in the .cgd file, which the Simulation Translator then uses to generate a LabVIEW simulation subsystem for each subsystem in order. LabVIEW saves the .cgd file with the same filename as the model in the Source File or Directory to Translate directory. LabVIEW saves this file in the same directory in which it saves the generated VI.
  • Show Created VI(s)—Enable this option to open automatically the top-level VI for each converted .mdl file after the conversion is complete.
  • Show Errors—Enable this option to display information about any warnings or errors the Simulation Translator encountered during the conversion. The Simulation Translator does not convert other .mdl files until you close the error dialog box. Disable this option when you convert many .mdl files at once. This option is enabled by default.
  • Initialization scripts—List any .m files to execute prior to the conversion process. .m files initialize variables and can provide other information needed in the .mdl file. .m files can be executed only if The Mathworks, Inc. MATLAB® application software is installed. If you have the MATLAB application software installed, the Simulation Translator causes the MATLAB software to automatically execute any .m files included in the .mdl file.
  • Add—Click the Add button to add an m-script to the list of scripts to execute prior to conversion.
  • Delete—Click the Delete button to delete an m-script from the list of scripts to execute prior to conversion.
  • Currently Translating—Displays the path to the model file the Simulation Translator currently is converting.
  • Translate—Click the Translate button to convert the selected model(s) into LabVIEW code.

The Simulation Translator does not support some Simulink blocks.

Note  The Simulation Translator cannot convert diagrams developed in The MathWorks, Inc. Stateflow® application software or other Simulink blocksets.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit