主要内容

Inspect and Measure Transitions Using the Logic Analyzer

在本教程中,您探讨了关键功能逻辑分析仪, such as choosing and configuring signals to visualize, stepping through a simulation, and measuring transitions.

Open a万博1manbetxModel

To follow along with this tutorial, open theSigma-Delta A/D Conversion (fixed-point version)模型 (dspsdadc_fixpt).

Open the Logic Analyzer

来自Simulin万博1manbetxk®toolstrip, on the模拟tab, in the Review Results gallery, click the Logic Analyzer button

逻辑分析仪opens with the selected signals shown in the channel display.

Configure Global Settings and Visual Layout

  1. ClickSettings。Set the高度to 20 and theSpacingto 10, and then click好的

  2. From the逻辑分析仪toolstrip, clickAdd Divider。A divider named分隔线is added to the bottom of your channels. You can use dividers to separate signals.

  3. Double-click分隔线和重命名分隔线as模拟输入Calculation。Drag the divider to the top of the channels pane.

  4. Add another divider and name it错误计算

  5. From the逻辑分析仪toolstrip, click添加组。A group namedGroup1is added to the bottom of your channels. You can use groups to group signals in a collapsible tree structure. Double-clickGroup1和重命名it as数字的Approximation Calculation

  6. You can visualize the same signal in multiple places. Right-click the模拟输入(Delayed)signal and select复制。Paste this signal under the错误计算divider. Repeat the process for theCIC Digitized Approximation信号。如屏幕截图所示,组织分隔线和信号,然后崩溃数字的Approximation Calculation团体。

Set Stepping Options

  1. From the逻辑分析仪toolstrip, click步进选项

  2. Select theEnable stepping back选项。Specify the保存的最大返回步骤数as2和theInterval between stored back stepsas100脚步。运行仿真时,每100个步骤一次拍摄一次模型的快照。仅保存最后一个快照。

  3. Set向后移动to100脚步

  4. Select thePause simulation when time reaches选项。指定模拟以暂停0.2seconds of model time has elapsed, and then click好的

Run Model

  1. To run the model, clickRunon the逻辑分析仪toolstrip. The model runs for 0.2 seconds of model time and then pauses.

  2. Click将数据适合时间范围。

Configure Individual Wave Settings

  1. Select all waves under your模拟输入Calculationdivider. Then on theWavestab, select a newWave Colorfor the selected waves.

  2. Under the错误计算divider, select the模拟输入(Delayed)CIC Digitized Approximationwaves. On theWavestab, modify the格式to数字的。的selected waves are now displayed as digital transitions.

Inspect and Measure Transitions

  1. On the逻辑分析仪toolstrip, click和then drag-and-drop start and end points to zoom in time.

  2. For waves displayed as digital, you can use theNext Transition先前的过渡buttons. To move the active cursor to the next transition, clickNext Transition

  3. ClickLockto lock the active cursor in place.

  4. ClickAdd Cursor要向轴添加另一个光标。光标显示其当前位置,以及所有周围光标的差异。

  5. Right-click the second cursor you added and selectDelete Cursor

  6. Press the space bar to zoom out.

  7. Add another cursor and line it up with a low point of the模拟输入wave in your模拟输入Calculationdivision. Use the value displayed in the wave value pane to fine-tune the cursor position in time.

  8. 添加另一个光标,并将其与相应的低点对齐模拟输入(Delayed)wave in your模拟输入Calculationdivision.

Step Through Simulation

  1. To move the simulation forward 100 steps, clickStep Forward。的time axis adjusts so that you can see the most recent data.

  2. 要向后移动100个步骤,请单击退后。的退后button becomes disabled because you specified saving only two back step.

Save Logic Analyzer Settings

When you save your model, the logic analyzer settings are also saved for that model.

See Also

|