Documentation

模型编辑环境

Simu万博1manbetxlink®model editing environment consists of two main tools: the Simulink Editor and the Library Browser. You find the blocks for your model in the Library Browser and build the model by adding and connecting the blocks in the Simulink Editor.

万博1manbetx编辑

Simu万博1manbetxlink编辑器是用于构建模型的直观工具。除了提供用于在矢量图形编辑器中使用图表的标准方法外,编辑器还提供可帮助您添加和连接块的快捷方式。Simu万博1manbetxlink编辑器还使您可以访问技术操作所需的工具,例如导入数据,模拟模型和分析模型性能。

该图显示了使用示例模型的Simulink编万博1manbetx辑器VDP打开。

Simu万博1manbetxlink编辑器具有命令菜单和一个快捷键,用于执行频繁操作或开放工具。当您悬停在工具栏按钮上时,工具提示会出现。命令也出现在context menus。当您右键单击编辑器的模型元素或空白区域时,将出现上下文菜单。例如,右键单击一个块,菜单显示了与块上工作相关的命令,例如剪贴板和对齐操作。一些命令仅在上下文菜单上出现。

Palette

The palette along the left side of the editor provides more shortcuts. The palette shortcuts have to do with the model appearance and how you navigate the model rather than how you build and operate it. For example, the palette includes a shortcut for adding annotations and other visuals, like boxed-in areas for labeling the model. It also provides a zoom button for zooming on a particular part of the model.

The隐藏/显示探险家栏button displays a bar that shows where you are in the model hierarchy as you navigate. The隐藏/显示模型浏览器button displays a hierarchical view of the model that you can use to navigate. SeeExplore the Model Hierarchy Using the Model Browser

Additional Model Views

右角中的控件打开了模型的其他视图。一个这样的视图就是接口视图,它可以帮助您跟踪模型接口。单击控件以查看这些视图。

交互式模型构建

When you build a model in the Simulink Editor, you use common techniques for working with graphics objects. Some of these actions include:

  • 使用点击,单击和拖动的选择

  • 通过拖动使用手柄和移动对象调整对象的大小

  • Clipboard operations, that is, cut, copy, and paste

  • 撤消/重做(最多101个操作)

    Note

    After you undo or redo block parameter changes, a visual cue appears that shows the current values of the affected parameters. Some parameter changes are not affected by the Undo or Redo commands. After you undo or redo changes to block parameters, use the cue to see the parameters affected.

    A small subset of parameters do not support Undo. Changing these parameters clears the Undo history, whether you make the change in the Property Inspector or in the block dialog box.

您使用熟悉的方法来缩放和滚动编辑区域,例如View>Zoommenu. If you are using a supported touch display platform, you can pinch to zoom and swipe to scroll. The supported touch display devices include Microsoft®Windows®platforms with aWindows 7的经认证或Windows 8认证的触摸显示和Macintosh带有An的平台AppleMagic Trackpad.

编辑器支持Simuli万博1manbetxnk唯一的滚动滚动快捷方式。万博1manbetx捷径和其他交互式模型构建技术总结了Keyboard and Mouse Actions for Simulink Modeling。For a tutorial, seeBuild and Edit a Model in the Simulink Editor

模型Design Error Detection

Simu万博1manbetxlink编辑can provide you with visual cues for some model design issues. In the model editor, highlighted blocks alert you to issues while you edit. To see a description of the issue, hover over a highlighted block and click the error or warning symbol.

万博1manbetxSimulink可以检测到块错误和警告,例如:

  • andFromblock mismatches.

  • 重复的数据存储块。价值Duplicate data store names参数确定是否有视觉提示,以及提示是否是错误或警告。

TheErrors and Warnings默认情况下启用了选项。要关闭此选项,请取消选择Display>Errors & Warnings

Library Browser

使用库浏览器找到块和视觉效果(注释)以添加到模型中。使用左窗格中的树结构或右窗格中的双击sublibraries来浏览库。sublibraries,块,文本和图像注释可以出现在右窗格中。悬停在任何项目上以查看描述。

When you find the item you are looking for, you can drag it into your model, or you can select it and use the context menu to add it.

Tip

The Recently Used Blocks structure at the bottom of the tree contains the blocks and libraries from the supplied libraries that you used most recently.

您可以使用搜索控件搜索块和注释。要使用正则表达式,整个单词搜索或对案例敏感的搜索,请使用Search for subsystems, blocks, and annotations按钮箭头。对于注释,您可以在注释或其描述的任何部分中搜索任何文本。

默认情况下,库内容以字母顺序显示。子系统首先出现,然后是阻止,然后注释。如果您希望按照库的开发人员设置的顺序查看库的内容,请右键单击右窗格并选择Sort in library model order。此设置从会话到会话保持生效。

To return to the alphabetical order, right-click and selectSort in alphabetical order。Depending on how the library designer set up the library, some items might not appear in alphabetical order. For example, in the万博1manbetxlibrary, the Additional Math & Discrete library appears as the last item regardless of the sorting option you choose.

You can create your own libraries and, optionally, have them appear in the Library Browser. See创建自定义库

设置属性和参数

在构建模型时,您可以在模型元素上设置参数和属性。例如,您可以为影响块功能的块设置参数和属性。您还可以在状态流上设置属性®图表,信号线,视觉元素(例如注释)和模型上。

根据您的工作流程和目标,使用以下方式设置参数和属性

  • The Property Inspector, which stays open in the editor as you work and updates based on the current selection

  • A dialog box that is associated with an element, such as a specific block

  • 模型数据编辑器保持打开状态并显示有关信号,状态和算法块PRAAMETER(对于实例,增益和过滤系数)的信息

When you selectView>Property Inspector, the interface appears in the Simulink Editor on the right. You can drag it from the default location and dock it in another location in the editor. The figure shows a block selected with the Property Inspector displayed.

The Property Inspector is useful when you are setting parameters and properties as you work, because it is always open and available for setting values for the current selection. Values take effect as soon as you set them. This workflow simplifies your interaction with the interface.

您可以使用在该项目上的项目打开选定模型元素的对话框图表菜单,例如Propertiesand, for blocks,块参数。您也可以使用上下文菜单。双击块通常打开一个块对话框。(使用菜单命令之一子系统and模型blocks.) For more information on setting block properties and parameters, see块参数and Properties in Simulink

The Property Inspector and the dialog boxes operate on a single selection. The main difference is that the Property Inspector updates with each selection and the dialog box shows the settings only for the element you opened it from. For this reason, the dialog box is useful if:

  • 你正在通过模型层次结构和广域网t to see or set an element’s parameters or properties as you navigate the model.

  • 您想比较类似元素的参数或属性。

  • The settings are advanced and appear only in the dialog box.

使用模型数据编辑器(View>模型数据编辑器), you can configure multiple signals, states, and algorithmic parameters at once. You can set only certain parameters and properties such as data types, initial values, and physical units. Open the Property Inspector to work with one model element at a time and perform batch operations with the Model Data Editor.

有关设置块属性和参数的更多信息,请参见指定信号属性。To learn to use the Model Data Editor, seeConfigure Data Properties by Using the Model Data Editor

Related Examples

More About

这个话题有帮助吗?