Differences
This shows you the differences between two versions of the page.
| learn:instrumentation:tutorials:analog-discovery-studio-using-cross-triggers [2019/08/07 22:02] – [3. Examples of Cross Triggering Systems] Arthur Brown | learn:instrumentation:tutorials:analog-discovery-studio-using-cross-triggers [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Cross Triggering | + | ====== |
| - | ==== Introduction ==== | + | <WRAP round important |
| - | + | This guide has been replaced | |
| - | When using Test and Measurement devices, understanding " | + | </ |
| - | + | ||
| - | ---- | + | |
| - | ==== Prerequisites ==== | + | |
| - | + | ||
| - | * One or more Digilent Test & Measurement Devices with Analog I/O and/or Digital I/O | + | |
| - | * **Note**: //Users without a device may still find this guide informative// | + | |
| - | * A Computer with [[reference: | + | |
| - | * Basic familiarity with WaveForms' | + | |
| - | + | ||
| - | ---- | + | |
| - | ==== 1. What is a Trigger? ==== | + | |
| - | + | ||
| - | {{page>learn: | + | |
| - | + | ||
| - | ==== 2. What is Cross Triggering? ==== | + | |
| - | In the general sense, cross triggering describes systems where multiple instruments - often different devices - share trigger events. | + | |
| - | + | ||
| - | Since benchtop oscilloscopes traditionally only contain one instrument, cross triggering typically refers to sharing the same trigger between multiple devices. Because Digilent' | + | |
| - | + | ||
| - | ---- | + | |
| - | ==== 3. Examples of Cross Triggering Systems ==== | + | |
| - | === 3.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' | + | |
| - | + | ||
| - | {{ learn: | + | |
| - | + | ||
| - | ---- | + | |
| - | == 3.1.1 Hardware Setup == | + | |
| - | <WRAP group>< | + | |
| - | Connect the Digilent Test and Measurement device to the host computer. | + | |
| - | + | ||
| - | 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/ | + | |
| - | + | ||
| - | The circuit achieved by these connections is a simple loopback, allowing the test and measurement | + | |
| - | </ | + | |
| - | {{ learn:instrumentation:tutorials: | + | |
| - | </ | + | |
| - | ---- | + | |
| - | == 3.1.2 Software Setup == | + | |
| - | <WRAP group>< | + | |
| - | Launch WaveForms, then open the following instruments: | + | |
| - | - Open a new // | + | |
| - | * Set the Channel // | + | |
| - | * Set the //Trigger// source to // | + | |
| - | * Set the //Wait// time to //none// | + | |
| - | * Set the //Run// time to //1 ms// | + | |
| - | * Set the //Repeat// count to // | + | |
| - | * Leave all other settings as their defaults | + | |
| - | - Open a new // | + | |
| - | * Set the Trigger //Mode// to // | + | |
| - | * Set the Trigger //Source// to //Wavegen 1// | + | |
| - | * Ensure the Time // | + | |
| - | * Set the Time //Base// to //1 ms/div// | + | |
| - | * Ensure Channel 1's //Offset// is //0 V// | + | |
| - | * Ensure Channel 1's //Range// is //500 mV/div// | + | |
| - | * Disable Channel 2 by // | + | |
| - | - Open a new // | + | |
| - | * Configure DIO 0 to be a button that outputs 0 when released, and 1 when pressed | + | |
| - | </ | + | |
| - | {{ learn: | + | |
| - | </ | + | |
| - | + | ||
| - | **Note:** //In order to show each of the opened instruments on the screen at once, click on the Docking Windows button ({{learn: | + | |
| - | + | ||
| - | ---- | + | |
| - | == 3.1.3 Operating the Multi-Instrument Cross Trigger Example == | + | |
| - | //Now that the workspace and hardware are set up, experimentation with the resulting system can begin.// | + | |
| - | + | ||
| - | Click the //Wavegen// and //Scope// instruments' | + | |
| - | + | ||
| - | <WRAP group>< | + | |
| - | Click the //Manual Trigger// button in the bottom left-hand corner of the WaveForms application (marked in red in the image to the right) to trigger the //Wavegen// instrument to output a signal once. The signal plays back so quickly that the // | + | |
| - | + | ||
| - | Next, try modifying the //Wavegen// trigger' | + | |
| - | </ | + | |
| - | {{ learn: | + | |
| - | </ | + | |
| - | + | ||
| - | <WRAP group>< | + | |
| - | Next, change the //Wavegen// trigger' | + | |
| - | + | ||
| - | In conclusion, note that through each of these changes to the trigger configuration, | + | |
| - | + | ||
| - | Further information regarding the trigger configuration options available in each instrument can be found in their respective "Using the ..." guides (linked above), or through the [[reference: | + | |
| - | </ | + | |
| - | {{ learn: | + | |
| - | </ | + | |
| - | ---- | + | |
| - | === 3.2 Cross Triggering between Devices === | + | |
| - | //This example demonstrates a simple approach to comparing data captured using two devices at once. A circuit will be created between two Digilent | + | |
| - | + | ||
| - | {{ learn: | + | |
| - | + | ||
| - | ---- | + | |
| - | == 3.2.1 Hardware Setup == | + | |
| - | + | ||
| - | <WRAP group>< | + | |
| - | 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' | + | |
| - | * Connect each device' | + | |
| - | * Connect each device' | + | |
| - | * Connect a ground pin from each device to a ground pin from the other device (down arrow, black). | + | |
| - | * Connect each device' | + | |
| - | + | ||
| - | See the block diagram to the right for a visual representation of these connections. | + | |
| - | + | ||
| - | **Note:** //The connections are symmetrical, | + | |
| - | </ | + | |
| - | {{ : | + | |
| - | </ | + | |
| - | + | ||
| - | ---- | + | |
| - | == 3.2.2 Software Setup == | + | |
| - | 1. Open two instances of WaveForms. | + | |
| - | + | ||
| - | 2. Use each WaveForms instance' | + | |
| - | + | ||
| - | **Note:** //In order to show each of the opened instruments on the screen at once, click on the Docking Windows button ({{learn: | + | |
| - | + | ||
| - | <WRAP group>< | + | |
| - | 3. In one WaveForms instance, henceforth referred to as the " | + | |
| - | * Open a new // | + | |
| - | * Set the Time //Base// to //500 us/div// | + | |
| - | * Set the Trigger //Mode// to // | + | |
| - | * Set the Trigger //Source// to //External 1// | + | |
| - | * Set the Trigger // | + | |
| - | * Disable Channel 2 by // | + | |
| - | * Open a new // | + | |
| - | * Set the Channel // | + | |
| - | * Set Channel 1's //Trigger// Source to //External 1// | + | |
| - | * Set Channel 1's //Wait// Time to //none// | + | |
| - | * Set Channel 1's //Run// Time to //2ms// | + | |
| - | * Set Channel 1's Simple Wave // | + | |
| - | * Set Channel 1's Simple Wave //Type// to //Sine// | + | |
| - | * Open a new // | + | |
| - | * Configure DIO 0 to be a button that outputs " | + | |
| - | * Open a new // | + | |
| - | </ | + | |
| - | {{ : | + | |
| - | </ | + | |
| - | + | ||
| - | <WRAP group>< | + | |
| - | 4. In the other WaveForms instance, henceforth referred to as the " | + | |
| - | * Open a new // | + | |
| - | * Set the Time //Base// to //500 us/div// | + | |
| - | * Set the Trigger //Mode// to // | + | |
| - | * Set the Trigger //Source// to //External 1// | + | |
| - | * Set the Trigger // | + | |
| - | * Disable Channel 2 by // | + | |
| - | * Open a new // | + | |
| - | * Set the Channel // | + | |
| - | * Set Channel 1's Trigger to //External 1// | + | |
| - | * Set Channel 1 //Wait// Time to //none// | + | |
| - | * Set Channel 1 //Run// Time to //2 ms// | + | |
| - | * Set Channel 1 Simple Wave // | + | |
| - | * Set Channel 1 Simple Wave //Type// to // | + | |
| - | * Open a new // | + | |
| - | </ | + | |
| - | {{ : | + | |
| - | </ | + | |
| - | <WRAP group>< | + | |
| - | 5. Copy the code to the right into the **primary** instance' | + | |
| - | </ | + | |
| - | < | + | |
| - | // Create a reference channel to contain the imported acquisition | + | |
| - | var r = Scope.Ref1.Range.value | + | |
| - | var o = Scope.Ref1.Offset.value | + | |
| - | Scope.Ref1.Clone(Scope.Channel1) | + | |
| - | Scope.Ref1.Range.value = r | + | |
| - | Scope.Ref1.Offset.value = o | + | |
| - | // Open the file exported by the secondary instance | + | |
| - | var f = File(" | + | |
| - | // Wait for the other instance to finish saving data | + | |
| - | for(var i = 0; i < 1000 && !f.exist(); i++); | + | |
| - | // Read data from the file and save it into the reference channel | + | |
| - | var rg = f.readDouble() | + | |
| - | f.deleteFile() | + | |
| - | Scope.Ref1.data = rg | + | |
| - | }</ | + | |
| - | </ | + | |
| - | <WRAP group>< | + | |
| - | 6. Copy the code to the right into the **secondary** instance' | + | |
| - | </ | + | |
| - | < | + | |
| - | // Create a binary file and write the channel 1 acquisition into it | + | |
| - | var f = File(" | + | |
| - | f.writeDouble(Scope.Channel1.alldata) | + | |
| - | }</ | + | |
| - | </ | + | |
| - | + | ||
| - | ---- | + | |
| - | == 3.2.3 Operating the Multi-Device Cross Trigger Example == | + | |
| - | + | ||
| - | //Now that the workspaces and hardware are set up, experimentation with the resulting system can begin.// | + | |
| - | + | ||
| - | This multi-device system connects the //Wavegen// and //Scope// instruments of the two devices together, so that all are triggered by the same external trigger, sourced from the **primary** device' | + | |
| - | + | ||
| - | ---- | + | |
| - | <WRAP group>< | + | |
| - | To capture data, first, click the **Run** button in each //Scope// and //Wavegen// instrument. Then, click the **primary** instance' | + | |
| - | </ | + | |
| - | {{ : | + | |
| - | + | ||
| - | {{ : | + | |
| - | </ | + | |
| - | ---- | + | |
| - | <WRAP group>< | + | |
| - | To view data captured by each device in the same plot, click the **Run** button in the **secondary** instance' | + | |
| - | </ | + | |
| - | {{ : | + | |
| - | </ | + | |
| - | ---- | + | |
| - | + | ||
| - | 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 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, | + | |
| - | + | ||
| - | ---- | + | |
| - | ==== Next Steps ==== | + | |
| - | + | ||
| - | Especially when using multiple devices, the calibration (or lack thereof) of the devices may affect the ability to compare acquired data. For more information on calibrating your Test and Measurement device, see the [[learn: | + | |
| - | + | ||
| - | For more guides on how to use the Digilent Test & Measurement Device, return to the device' | + | |
| - | + | ||
| - | For more information on WaveForms, visit the [[reference: | + | |
| - | + | ||
| - | For technical support, please visit the [[https:// | + | |
| - | + | ||
| - | {{tag> | + | |
| + | {{tag> | ||

