Using Cross Triggering

介绍

当使用测试和测量设备时,了解“触发”(何时以及为什么获取数据)很重要。本指南将触发作为一个概念,然后探索在波形应用程序上下文中多种仪器和设备之间交叉触发的方法。

Note:尽管此处显示的交叉触发示例主要使用模拟输入和输出,但可以将相同的概念应用于数字I/O,或者同时使用模拟和数字。


在ventory


在讨论任何示例之前,重要的是要了解什么是触发因素以及为什么触发器会有所帮助。以下各节将将触发器定义为一种采集工具,并描述触发器对信号分析更有效的行为。

1. What is a Trigger?

什么是扳机?如何设置?

Click Here to Learn the Answer
  1. Trigger: A trigger is an event that occurs with respect to a signal, that defines the window of time where an instrument captures data. A trigger can be defined in a variety of ways, but, as an example, a trigger could be the rising edge of an incoming signal, informing the instrument that you want to view the period of time around that edge, both before and after, to check the noise in the signal.
  2. Trigger Systems:触发​​系统可与示波器,逻辑分析仪或其他有关捕获电压水平随时间推移捕获电压的仪器的配合。扳机告诉仪器,它需要与捕获以及如何为用户显示它有关的数据。这是通过预定义的默认设置,用户定义的参数或用户定义的事件来完成的,以便触发器在一段时间内采集过程收集的电压数据中“查找”。这些触发因素本质上可能很简单,也可以根据应用程序非常复杂。
  3. 触发类型: There are many different types of triggers, all having their own strengths, depending on application, and influence what kind of settings or events the trigger is set to detect. The most common type of trigger is anEdge Trigger(通常与波形范围工具一起使用),并且将成为此触发器介绍的重点。边缘触发点由(1)某些电压级别定义,并且(2)如果该级别发生在上升边缘,跌落边缘或任何一个上的输入波形中。波形具有这些触发器的默认设置,这些触发器也可以由用户调整。例如,触发点可以设置为“在上升边缘的500mV”。
  4. 触发模式:有几种不同的模式可以在下方操作,这些模式确定如果未检测到触发器,示波器是否会显示波形。该教程涵盖了“正常”和“自动”模式。在普通的mode, the acquisition tool only collects voltage data over some time period (also called a sweep) if the input signal satisfies the trigger definition. Otherwise, the acquisition tool will either display a blank screen or remain static displaying the last acquisition. Inautomode, the acquisition tool sweeps with or without a trigger and uses a timer to sweep if there is no input signal.
  5. Trigger Holdoff:Trigger Holdoff是一个可调的时间段,在该时间段中,采集仪器无法生成触发器。这对复杂的波形可能非常有帮助,这些波形可能具有多个点,这些点可以满足所需的采集数据集中的触发条件,从而使触发器可以根据需要正确显示波形。

2.如何使用触发器?

设置后,触发器对传入数据有什么作用?这如何帮助用户?

Click Here to Learn the Answer
触发器的作用像比较器。使用默认设置或用户定义的电压级别和斜率(升边边缘,跌落边缘或任何一个),当触发系统的输入匹配这些设置时,触发系统将脉冲发送到其输出。该脉冲由采集仪器和另一个称为基于时间的插装器的子系统监测。

When the acquisition instrument sees this pulse from the trigger system, it begins to digitize, process, store, and measure this data. Before this waveform data can be displayed on the screen, the time-based interpolator figures out what address in the waveform buffer matches the defined trigger point and tells the acquisition instrument to display this data at time t=0.0 seconds.

通过在指定的触发点上反复显示输入信号的相似部分,触发器有助于将动态波形显示为静态图像。否则,波形只会以难以解释的方式横穿显示屏,并且无法进行测量。

Triggers can also be helpful for capturing data around or locating an infrequent event. Some examples include digital pulses that are: missing, irregular in width, or not reaching valid logic high or low levels.

3.什么是交叉触发?

What makes a trigger a “cross”-trigger?

Click Here to Learn the Answer
在一般意义上,交叉触发描述ystems where multiple instruments - often different devices - share trigger events. This can mean that either both instruments capture the signal containing the trigger event, or that when one of the instruments detects the trigger event, it generates a signal to trigger the other instrument.

Since benchtop oscilloscopes traditionally only contain one instrument, cross triggering typically refers to sharing the same trigger between multiple devices. Because Digilent's Test and Measurement devices contain many different instruments, this guide covers both the multiple-device case and cross triggering between multiple virtual instruments within the same device.


4. Examples of Cross Triggering Systems

Two examples of systems using cross triggering are presented here:


4.1 Cross Triggering between Instruments

This example demonstrates how using cross triggering makes it easier to change trigger sources across multiple instruments on a single device. A loopback circuit will be created that will connect the device's analog output to its analog inputs. We will experiment with several different trigger configurations, shared by both the device's范围波根仪器,进行输入波形的单发捕获。

Note:You will see several photos of hardware in use throughout this guide. Whether or not your device shows up, rest assured, the concepts presented here are applicable to any WaveForms-compatible Digilent Test and Measurement device.


4.1.1 Hardware Setup

将Digilent测试和测量设备连接到主机计算机。

Connect the analog input channel 1 positive pin (1+, orange cable) to the waveform generator output channel 1 pin (W1, yellow cable). Then connect the analog input channel 1 negative pin (1-, orange and white cable) to ground (down arrow, black cable). Lastly, connect the external trigger 1 pin (TRIG 1, grey cable) to the digital input/output pin 0 (DIO 0, pink cable).

这些连接实现的电路是一个简单的回环,使测试和测量设备的波形生成器可以为自己的示波器提供刺激,并使用其数字I/O生成外部触发器。请参阅右侧的框图,以了解触​​发和数据流过系统的视觉表示。


4.1.2 Software Setup

简化了以下软件设置,以专注于触发器的应用。有关以下仪器的更详细帮助,请参阅下面链接的“使用”指南。

Launch WaveForms, then open the following instruments:

  1. Open a new波根仪器,然后对其配置进行以下更改:
    • 设置ChannelSynchronizationto独立的
    • 设置Triggersource to手动的
    • 设置等待时间了没有任何
    • 设置Run时间了1 ms
    • 设置Repeat计算infinite
    • Leave all other settings as their defaults
  2. Open a new范围仪器,然后对其配置进行以下更改:
    • 设置扳机模式toRepeatedNormal
    • 设置扳机资源to波根C1
    • 确保时间位置is0 s
    • 设置Time根据to1 ms/div
    • 确保频道1的Offsetis0 V
    • 确保频道1的范围is500 mV/div
    • Disable the unused channels by取消检查他们的盒子
  3. Open a newStaticIOinstrument, then make the following change to its configuration:
    • Configure DIO 0 to be a button that outputs 0 when released, and 1 when pressed

Note:在order to show each of the opened instruments on the screen at once, click on the Docking Windows button ()在窗户的右上角。要稍后返回到默认的选项卡视图,请单击选项卡窗口按钮() adjacent to the Docking Windows button.


4.1.3操作多仪器交叉触发示例

现在设置了工作区和硬件,可以开始对结果系统进行实验。

Click the波根范围仪器'Run() buttons. The instruments' states will go fromReadytoArmed,这意味着每个人现在都在等待触发器。

Click the手动的Trigger波形应用程序右下角的按钮(图像右侧的红色标记为红色)以触发波根instrument to output a signal once. The signal plays back so quickly that the波根的国家过渡ArmedtoRunning回到Armed可能不会被看到。的范围's状态将从ArmedtoTrig'd回到Armed,捕获的事件将显示在范围'splot.

Next, try modifying the波根触发器等待时间字段。任何价值都将起作用。再次单击手动触发按钮。的范围再捕获。尽管发生了变化,但捕获的信号将放置在图中的同一点。修改波根触发的等待时间也影响了范围trigger: both instruments wait for that amount of time after the Manual Trigger to capture/generate the signal.

Next, change the波根触发器资源字段到Trigger 1. In the StaticIO instrument, click the button corresponding to DIO 0 (marked in red in the image to the right). Observe that this button has the same behavior as the Manual Trigger.

在conclusion, note that through each of these changes to the trigger configuration, the范围trigger did not need to be reconfigured at all!

有关每种仪器中可用的触发配置选项的更多信息,请参见各自的“使用…”指南(上面链接)或通过WaveForms Reference Manual


4.2设备之间的交叉触发

This example demonstrates a simple approach to comparing data captured using two devices at once. A circuit will be created between two Digilent Test and Measurement devices that share a single trigger. Each device's波根instrument will stimulate the other device's范围instrument, with each of these four instruments sharing a single trigger. This example demonstrates how multiple devices can be used to create a single system with an increased channel count.


4.2.1 Hardware Setup

Connect two Digilent Test and Measurement devices to the computer. Two Analog Discovery 2s were used in creating this document, but any WaveForms compatible device with analog inputs and outputs will work. If the devices require external power, plug them in and turn them on.

Make the following connections between the two devices' pins:

  • 将每个设备的模拟输入通道一个正销(1+,橙色电缆)连接到另一个设备的波形发电机通道一个引脚(W1,黄色电缆)。
  • 将每个设备的模拟输入通道连接一个负引脚(1-,橙色和白色电缆)上的任何一个设备上的地面销(箭头,黑色)
  • 将接地销从每个设备连接到另一台设备(向下箭头,黑色)的接地销。
  • 将每个设备的外部触发器1引脚(T1或Trig 1,灰色电缆)和数字输出通道0引脚(0或Dio 0,粉红色电缆)将所有四个引脚连接在一起。

See the block diagram to the right for a visual representation of these connections.

Note:连接是对称的,因此无论哪种设备被视为“#1”,哪个被视为“#2”都无关紧要。


4.2.2软件设置

1. Open two instances of WaveForms.

2. Use each WaveForms instance's device manager to connect one device to each instance.

Note:在order to show each of the opened instruments on the screen at once, click on the Docking Windows button ()在窗户的右上角。要稍后返回到默认的选项卡视图,请单击选项卡窗口按钮() adjacent to the Docking Windows button.

3. In one WaveForms instance, henceforth referred to as the “primaryinstance”, open the following instruments, and configure them as described:

  • Open a new范围instrument and apply the following changes to its configuration:
    • 设置Time根据to500 us/div
    • 设置扳机模式toRepeatedNormal
    • 设置扳机资源toTrigger 1
    • 设置扳机健康)状况 Rising
    • Disable the unused channels by取消检查他们的盒子
  • Open a new波根instrument and apply the following changes to its configuration:
    • 设置ChannelSynchronizationto独立的
    • 设置频道1'sTrigger来源Trigger 1
    • 设置频道1's等待Time to没有任何
    • 设置频道1'sRunTime to2ms
    • 设置频道1的简单波Frequencyto1khz
    • 设置频道1的简单波TypetoSine
  • Open a newStaticIOinstrument and apply the following changes to its configuration:
    • Configure DIO 0 to be a button that outputs “0” when released and “1” when pressed.
  • Open a newScript乐器。

4. In the other WaveForms instance, henceforth referred to as the “secondaryinstance”, open the following instruments, and configure them as described:

  • Open a new范围instrument and apply the following changes to its configuration:
    • 设置Time根据to500 us/div
    • 设置扳机模式toRepeatedNormal
    • 设置扳机资源toTrigger 1
    • 设置扳机健康)状况toRising
    • Disable the unused channels by取消检查他们的盒子
  • Open a new波根instrument and apply the following changes to its configuration:
    • 设置ChannelSynchronizationto独立的
    • 将频道1的触发器设置为Trigger 1
    • 设置频道1等待Time to没有任何
    • 设置频道1RunTime to2 ms
    • 设置通道1简单波Frequencyto1千赫
    • 设置通道1简单波TypetoSquare
  • Open a newScript乐器。

5. Copy the code to the right into theprimaryinstance'sScript乐器。

{//创建一个参考通道以包含导入的收购varr=范围.Ref1.范围.价值varo=范围.Ref1.Offset.价值范围.Ref1.克隆(范围.Channel1)范围.Ref1.范围.价值=R范围。Ref1.Offset.价值=o//打开次要实例导出的文件varf=文件(“ 1. bin”)//等待另一个实例完成保存数据为了(vari=0;i<1000&&!f.exist();i++);//从文件中读取数据并将其保存到参考频道中varrg=f.readDouble()f.删除文件()范围.Ref1.data=rg}

6. Copy the code to the right into thesecondaryinstance'sScript乐器。

{// Create a binary file and write the channel 1 acquisition into itvarf=文件(“ 1. bin”)f.写入(范围.Channel1.alldata)}

4.2.3 Operating the Multi-Device Cross Trigger Example

现在设置了工作区和硬件,可以开始对结果系统进行实验。

这个多设备系统连接波根范围仪器of the two devices together, so that all are triggered by the same external trigger, sourced from theprimarydevice's digital input/output channel 0, which is driven by theStaticIObutton.


To capture data, first, click theRunbutton in each范围波根乐器。然后,单击primaryinstance'sStaticIODIO 0 button to trigger all four instruments. Each device will play its wave for two milliseconds, which will then be captured by the other device's范围. The results will look like the images to the right.


To view data captured by each device in the same plot, click theRunbutton in thesecondaryinstance'sScriptinstrument to export its captured data to a file. Then, click the Run button in theprimaryinstance'sScript仪器将该数据导入其范围as a Reference Channel. The result will look like the image to the right.


Using multi-device systems like this allows a user to greatly extend the number of analog signals that can be captured at once. For the Analog Discovery 2, each additional device adds another two analog input and output channels to the overall system, and digital I/O could easily be added as well. While the two captures are not perfectly aligned (each device runs on its own oscillator), the overall system may be good enough for use in some applications.

的WaveForms application was not designed to support more than one device at a time. However, WaveForms SDK is available for users that want to develop their own applications, and can readily support a large number of devices.


下一步

尤其是在使用多个设备时,设备的校准(或缺乏)可能会影响比较获得数据的能力。有关校准测试和测量设备的更多信息,请参阅Calibrating a Digilent Test and Measurement Device指导。

有关如何使用Digilent测试和测量设备的更多指南,请返回设备的资源中心,从Test and Measurementpage of this wiki.

有关波形的更多信息,请访问WaveForms Reference Manual.

要获得技术支持,请访问Test and MeasurementDigilent论坛的部分。