Main Content

Logic Analyzer

随着时间的流逝,可视化,测量和分析过渡和状态

Description

Logic Analyzer是可视化和检查Simulink中信号和状态的工具金宝app®model. Using theLogic Analyzer,,,,you can:

  • Debug and analyze models

  • 跟踪和相关many signals simultaneously

  • Detect and analyze timing violations

  • Trace system execution

  • Detect signal changes using triggers

For keyboard shortcuts, clickMore

键盘快捷键

动作 Description Applicable When
Ctrl+X Cut Wave is selected
Ctrl+C Copy Wave is selected
Ctrl+V 粘贴 Wave is selected
删除 删除 Wave is selected
Ctrl+- Zoom out Always
Shift+Ctrl+ - Zoom out around active cursor Always
Ctrl++ 放大 Always
Shift+Ctrl ++ Zoom out around active cursor Always
Shift+Ctrl+C Move display to active cursor When cursor is not in the display range
空间 Zoom out full Always
Tab,,,,Right Arrow Next transition 选择数字格式波
转移+Tab,,,,Left Arrow 先前的过渡 选择数字格式波
Ctrl+A 选择所有波 Always
Up Arrow 选择上方选择的波 Wave is selected
Down Arrow 选择以下选择波 Wave is selected
Ctrl+Up Arrow 移动选定的海浪 Wave is selected
Ctrl+Down Arrow 移动选定的波浪 Wave is selected
逃脱 Unselect all signals Wave is selected
Page Up 向上滚动 Always
Page Down Scroll down Always

打开逻辑分析仪应用程序

在Simuli金宝appnk工具条模拟选项卡上,单击Logic Analyzer应用按钮。如果未显示按钮,请扩展评论结果应用程序库。您最新的数据可视化选择可以在Simulink会话中保存。金宝app

To visualize referenced models, you must open the Logic Analyzer from the referenced model. You should see the name of the referenced model in the Logic Analyzer toolbar.

Examples

expand all

Logic Analyzersupports several methods for selecting data to visualize.

  • Select a signal in your model. When you select a signal, an ellipsis appears above the signal line. Hover over the ellipsis to view options and then select theEnable Data Loggingoption.

  • Right-click a signal in your model to open an options dialog box. Select the日志选定的信号option.

  • 使用任何方法在模型中选择多个信号线。例如,使用转移+click to select multiple lines individually orCTRL+Ato select all lines at once. Then, on the信号选项卡,选择Log Signals按钮。

    Log signals button

要在逻辑分析仪中可视化数据,必须启用模型的信号记录。(默认情况下,登录时间。)要启用信号记录,请打开模型设置from the toolstrip, navigate to theData Import/Export窗格,然后选择信号记录

When you open theLogic Analyzer,,,,all signals marked for logging are listed. You can add and delete waves from yourLogic Analyzerwhile it is open. Adding and deleting signals does not disable logging, only removes the signal from the Logic Analyzer.

打开Logic Analyzerand select a wave by double-clicking the wave name. Then from theWave选项卡,设置特定于您选择的单个波的参数。在单个信号上制定的任何设置都取代了全局设置。要将单个波参数返回全局设置,请单击Reset

  1. 打开Logic Analyzerand select a wave by clicking the wave name.

  2. From theLogic Analyzertoolstrip, click。从Logic Analyzer

  3. To restore the wave, from theLogic Analyzertoolstrip, click

    一个命名的分隔线恢复的波浪是added to the bottom of your channels, with all deleted waves placed below it.

  1. 打开Logic Analyzerand select theTriggertab.

  2. To attach a signal to the trigger, select附加信号,然后选择要触发的信号。您可以将多达20个信号连接到扳机。每个信号只能有一个触发条件。

  3. 默认情况下,触发器在附加信号中寻找上升的边缘。您可以将扳机设置为寻找上升或下降的边缘,位序列或比较值。要更改触发条件,请选择设定条件

    如果您在触发器中添加多个信号,请使用Operatoroption:

    • AND- 匹配所有条件。

    • OR- match any condition.

  4. 要控制触发之前看到的多少样品,请设置Display Samplesoption. For example, if you set this option to500, 这Logic Analyzertries to give you 500 samples before the trigger. Depending on the simulation, theLogic Analyzer在触发器之前,可能显示出或不到500个样本。但是,如果在第500个样本之前找到触发器,则逻辑分析仪仍显示触发器。

  5. 使用触发模式使用显示模式

    • Once- TheLogic Analyzermarks only the first location matching the trigger conditions and stops showing updates to the Logic Analyzer. If you want to reset the trigger, select重新扳机。Relative to the current simulation time, theLogic Analyzershows the next matching trigger event.

    • Auto- TheLogic Analyzer标记与触发条件相匹配的每个位置。

  6. Before running the simulation, select启用触发器。蓝色光标显示为时间0。然后,运行模拟。当发现触发器时Logic Analyzermarks the location with a locked blue cursor.

Logic Analyzercan stream only a single instance of a multi-instance Model block. If the same model is opened across different windows, those models will share the same Logic Analyzer. This example shows how to select an instance of a multi-instance Model block for logging on theLogic Analyzer

打开多人模型model.

open_system('multipleModelInstances'

这model contains three instances of thereferencedModelmodel.

Double-click any of the Model blocks to open the model referenced by all three Model blocks.

open_system(“引用模型”

打开Logic Analyzer in the referenced model by double-clicking the logging symbol next to the MovingAverage block. You should see参考模型 - [多人模型]in the toolbar of the Logic Analyzer.

From the Logic Analyzer window, run the model. By running the simulation from a referenced version ofreferencedModel,S金宝appimulink运行顶部模型(多人模型)and referenced models (referencedModel)。这Logic Analyzerdisplays a single instance of a multi-instance Model block.

When you run a simulation, the logic analyzer runs the model listed in the Logic Analyzer toolbar. If this model is a referenced model, the toolbar also lists the top model and you will see results from running the top model. To view results from the referenced model in isolation, you must open the referenced model as a top model.

To switch between instances, from the Simulink Editor menu, on the Simulation tab open the Prepare gallery and selectNormal Mode Diagram>子系统和模型参考>Model Block Normal Mode Visibility。SelectModel Instance 3然后单击OK

Run the多人模型model again. TheLogic AnalyzerdisplaysModel Instance 3数据。

Logic Analyzerenables you to bit-expand fixed-point and integer waves.

  1. In theLogic Analyzer,,,,click the arrow next to a fixed-point or integer wave to view the bits.

    这least significant bit and the most significant bit are marked withlsbandmsbnext to the wave names.

  2. Click Settings, and then selectDisplay Least Significant bit firstto reverse the order of the displayed bits.

  1. 打开Programmable FIR Filtermodel (dspprogfirhdl)。

  2. 打开Logic Analyzerand select theTriggertab.

  3. 要在工具条中添加触发器,请选择附加信号并附加写启用写ensignal. An icon appears in front of the signal name to indicate it is attached to a trigger. The icon changes depending on the type of trigger.

  4. Select设定条件并更改触发条件的条件写en信号到Falling Edge。触发器将显示何时发送写入信号。

  5. Attach theWrite Done信号到the trigger. Keep the trigger condition for this signal as the default,Rising Edge。现在,触发器还将显示写入何时完成。

    If you open the设定条件下降,你看到一个Operatorfield. This field appears when multiple signals are attached to the trigger. Change the operator toORso that the trigger will show instances where a write was started or completed.

  6. 设置显示模式toAuto。在此设置中,Logic Analyzer标记满足触发条件的所有位置。

  7. Select启用触发器and run the simulation.

    每次满足触发条件时,Logic Analyzer用锁定的蓝色光标标记时间。在每个标记的位置,写en0andWrite Done1。If you examine each location marked by a trigger, you can verify that each time a write is sent, it is also completed.

相关示例

Limitations

Logging Settings

  • If you enable the configuration parameterLog Dataset data to file(金宝appSimulink),,,,you cannot stream logged data to theLogic Analyzer

  • 标记用于记录的信号Simulink.sdi.markSignalForStreaming(金宝appSimulink)或用仪表板范围(金宝appSimulink)do not appear on theLogic Analyzer

  • You cannot visualize数据存储存储器(金宝appSimulink)block signals in theLogic Analyzerif you set the日志数据存储数据parameter to on.

Input Signal Limitations

  • 信号s marked for logging for theLogic Analyzermust have fewer than 8000 samples per simulation step.

  • Logic Analyzerdoes not support frame-based processing.

  • 对于64位整数和大于53位的固定点数,如果数字大于双精度的最大值,则数字之间的过渡可能无法正确显示。

  • You may see performance degradation in theLogic Analyzerfor large matrices (greater than 500 elements) and buses with more than 1000 signals.

  • Logic Analyzer不支持状态流数据输金宝app出。

Graphical Settings

  • 在运行仿真时,您不能缩放,锅锅或修改触发器。

  • 要可视化恒定信号,在设置中,您必须设置FormattoDigital。Constants marked for logging are visualized as a continuous transition.

Mode Supported Notes and Limitations

Normal

Yes

Accelerator

Yes

你不能使用Logic Analyzer可视化信号Model(金宝appSimulink)blocks withSimulation mode设置Accelerator

Rapid Accelerator

Yes

数据在Logic Analyzer在模拟过程中。

If you simulate a model with the simulation mode set to rapid accelerator, after simulation the following signals cannot be visualized in theLogic Analyzer

  • Multi-instance model reference signals

  • Nonvirtual bus signals

Processor-in-the-loop (PIL)

No

Software-in-the-loop (SIL)

No

外部的

No

有关这些模式的更多信息,请参阅How Acceleration Modes Work(金宝appSimulink)

版本历史记录

在R2016b中引入

也可以看看

对象