Skip to content

Commit

Permalink
docTests: update test content where needed
Browse files Browse the repository at this point in the history
Signed-off-by: IonutMuthi <[email protected]>
  • Loading branch information
IonutMuthi committed Feb 17, 2025
1 parent a3a7c43 commit 4e47e77
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 50 deletions.
8 changes: 4 additions & 4 deletions docs/tests/plugins/m2k/network_analyzer_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ frequency of 15.9kHz.
- Resistor: R1 = 100 Ohms
- Resistor: R2 = 100 Ohms
- Capacitor: C1 = 1uF
- Capacitor: C2 = 0.1uF
- Capacitor: C2 = 0.1uF (Analog Devices part code 104)

**Steps:**
1. In the Network Analyzer settings menu set the following:
Expand Down Expand Up @@ -599,7 +599,7 @@ by exporting the low pass filter plot screenshot to a PDF file.
1. Setup the Network Analyzer as stated in the low pass filter test
linked above.
2. Click the Print plot button and choose a name and location for the file.
- **Expected result:** The file is saved as a PDF in the selected
- **Expected result:** The file is saved as a BMP in the selected
location.
- **Actual result:**

Expand All @@ -608,7 +608,7 @@ by exporting the low pass filter plot screenshot to a PDF file.
..
3. Open the exported file and verify it:
- **Expected result:** The plot is correctly saved in the PDF file.
- **Expected result:** The plot is correctly saved in the BMP file.
- **Actual result:**

..
Expand Down Expand Up @@ -650,7 +650,7 @@ by viewing the acquired data in the Oscilloscope and analyzing measurements.
**Steps:**
1. In the Network Analyzer set the following configuration:
- Reference: Channel 1, 1V Amplitude, 0V Offset
- Sweep: Linear, Start: 20Hz, Stop: 10MHz, Sample Count: 10
- Sweep: Linear, Start: 20Hz, Stop: 1MHz, Sample Count: 10
- Display: Min. Magnitude: -50dB, Max. Magnitude: 5dB, Min. Phase: -180°,
Max. Phase: 180°
2. Run a Single capture in the Network Analyzer.
Expand Down
8 changes: 5 additions & 3 deletions docs/tests/plugins/m2k/oscilloscope_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ oscilloscope using Channel 1.
Actual test result goes here.
..
6. Change the value to 0V in the Signal Generator and monitor it on the Oscilloscope:
6. Change the value to 5V in the Signal Generator and monitor it on the Oscilloscope:
- **Expected result:**
- The reading is within 4.9V to 5.1V.
- **Actual result:**
Expand Down Expand Up @@ -619,7 +619,8 @@ with different trigger configurations.
Actual test result goes here.
..
7. Set the Hysteresis value to 1.25V and Level to -1.7V:
7. Change the Trigger Condition to Rising Edge
8. Set the Hysteresis value to 1.25V and Level to -1.7V:
- **Expected result:**
- The signal on the plot is not triggered and unstable.
- The plot level is outside the triggered range of ~1.3V to +2.5V.
Expand Down Expand Up @@ -779,7 +780,8 @@ Test 11 - FFT Function
2. In the Oscilloscope set the following:
- Channel1 Horizontal: Time Base: 5ms/div, Position: 0ms
- Channel1 Vertical: Volts/Div: 1V/div, Position: 0V
3. Run the Oscilloscope and verify the plot:
3. From Oscilloscope settings set FFT to ON.
4. Run the Oscilloscope and verify the plot:
- **Expected result:** The resulting spectrum shows
a series of peaks at the fundamental frequency and its harmonics.
- **Actual result:**
Expand Down
53 changes: 20 additions & 33 deletions docs/tests/plugins/m2k/signal_generator_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Test 1: Channel 1 Operation
Actual test result goes here.
..
35. Repeat step 10.3 with varying duty cycle from 1% to 99%
35. Repeat step 34 with varying duty cycle from 1% to 99%
- **Expected Result:** Oscilloscope’s measurement should be Period: 200ns, Frequency: 5MHz, peak to peak value: 6.8V to 7.2V and Min/Max: ±5V and the varying ±Duty Cycle
- **Actual Result:**

Expand Down Expand Up @@ -559,7 +559,7 @@ Test 3: Channel 1 and Channel 2 Operation
Actual test result goes here.
..
12. Set signal generator channels 1 and 2 to either Sine or Triangle waveform type, they should be the same. For channel 1 set Amplitude: 5V, Frequency: 5kHz, offset: 0V and phase: 0°. Set signal generator’s channel 2 to Amplitude: 5V, Frequency: 5kHz, offset: 0V and phase: 360°. Set Oscilloscope’s both channel to Time Base: 200us, Volts/Div: 1V
12. Set signal generator channels 1 and 2 to either Sine or Triangle waveform type, they should be the same. For channel 1 set Amplitude: 5V, Frequency: 5kHz, offset: 0V and phase: 0°. Set signal generator’s channel 2 to Amplitude: 5V, Frequency: 5kHz, offset: 0V and phase: 0°. Set Oscilloscope’s both channel to Time Base: 200us, Volts/Div: 1V
13. Run Oscilloscope, add channel with an input function: f(t) = sin(t1) - sin(t0).
- **Expected Result:** The new plot’s value should be very close to 0V ranging around -0.2V to 0.2V
- **Actual Result:**
Expand Down Expand Up @@ -606,7 +606,7 @@ Test 4: Additional Features
Actual test result goes here.
..
4. Choose Uniform Noise Type in the dropdown menu and set it to 500mV
4. Unter Noise choose Uniform Noise Type in the dropdown menu and set it to 500mV
5. Set the Oscilloscope’s setting to Time Base: 100us, Volts/Div: 500mV/Div; Using the cursors measure the noise generated in the square waveform
- **Expected Result:** The measured voltage should be close to 500mV. Check the step resource picture for reference.
- **Actual Result:**
Expand All @@ -625,13 +625,6 @@ Test 4: Additional Features
7. Test Buffer
8. Download buffer test files (https://wiki.analog.com/_media/university/tools/m2k/scopy/test-cases/signal_generator_buffer_test.zip). Open Signal Generator Instrument and click the Buffer Tab
- **Expected Result:** Refer to the Step Resource Image for reference
- **Actual Result:**

..
Actual test result goes here.
..
9. Connect AWG ch1 to scope ch1+ and scope ch1- to gnd
10. Test .csv file
11. Load the .csv file from the downloaded .zip file
Expand All @@ -643,92 +636,86 @@ Test 4: Additional Features
..
12. Test .mat file
13. Load the .mat file from the downloaded .zip file. Set the frequency to 20kHz, and the time base of Oscilloscope to 10ms.
13. Press "Load file" button and make sure the field "File of type" in the dialog box is set to "MATLAB Files (\*.mat)".
14. Load the .mat file from the downloaded .zip file. Set the frequency to 20kHz, and the time base of Oscilloscope to 10ms.
- **Expected Result:** The signal generated should be a sine wave signal.
- **Actual Result:**

..
Actual test result goes here.
..
14. Test Math
15. Open Signal Generator Instrument and click the Math tab
- **Expected Result:** Refer to the Step Resource image for reference.
- **Actual Result:**

..
Actual test result goes here.
..
16. Connect AWG ch1 to scope ch1+ and scope ch1- to gnd
17. Generate Sine waves
18. In the Signal Generator Math Function tab, set frequency to 100Hz, and type in the function box 5*sin(t) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 2ms
15. Test Math
16. Open Signal Generator Instrument and click the Math tab
17. Connect AWG ch1 to scope ch1+ and scope ch1- to gnd
18. Generate Sine waves
19. In the Signal Generator Math Function tab, set frequency to 100Hz, and type in the function box 5*sin(t) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 2ms
- **Expected Result:** The generated sine wave signal should have the following parameters, peak to peak: 9.6Vpp to 10.4Vpp, frequency: 100Hz, and period: 10ms. Refer to the Step resource image for reference
- **Actual Result:**

..
Actual test result goes here.
..
19. In the Signal Generator Math Function tab, set frequency to 1kHz, and type in the function box 4*sin(10*t) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 20us
20. In the Signal Generator Math Function tab, set frequency to 1kHz, and type in the function box 4*sin(10*t) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 20us
- **Expected Result:** The generated sine wave signal should have the following parameters, peak to peak: 7.6Vpp to 8.4Vpp, frequency: 10kHz, and period: 100us. Refer to the Step resource image for reference
- **Actual Result:**

..
Actual test result goes here.
..
20. In the Signal Generator Math Function tab, set frequency to 100kHz, and type in the function box 3*sin(50*t) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 100ns
21. In the Signal Generator Math Function tab, set frequency to 100kHz, and type in the function box 3*sin(50*t) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 100ns
- **Expected Result:** The generated sine wave signal should have the following parameters, peak to peak: 5.6Vpp to 6.4Vpp, frequency: 5MHz, and period: 200ns. Refer to the Step resource image for reference
- **Actual Result:**

..
Actual test result goes here.
..
21. Generate Square waves
22. In the Signal Generator Math Function tab, set frequency to 500kHz, and type in the function box 4*sin(t) + 4*sin(3*t)/3 + 4*sin(5*t)/5 + 4*sin(7*t)/7 + 4*sin(9*t)/9 + 4*sin(11*t)/11 (you can copy and paste the text to Scopy) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 500ns
22. Generate Square waves
23. In the Signal Generator Math Function tab, set frequency to 500kHz, and type in the function box 4*sin(t) + 4*sin(3*t)/3 + 4*sin(5*t)/5 + 4*sin(7*t)/7 + 4*sin(9*t)/9 + 4*sin(11*t)/11 (you can copy and paste the text to Scopy) and click apply. In the Oscilloscope instrument set Volts/div: 1V/div, Trigger: Auto, Time base: 500ns
- **Expected Result:** The generated square wave signal should have the following parameters, peak to peak: 7Vpp to 7.4Vpp, frequency: 500kHz, and period: 2us. Refer to the Step resource image for reference
- **Actual Result:**

..
Actual test result goes here.
..
23. Waveform Phase – Seconds
24. Open Waveform tab. Set frequency to 500Hz. Set Phase to 90 degrees. Then change phase unit to seconds.
24. Waveform Phase – Seconds
25. Open Waveform tab. Set frequency to 500Hz. Set Phase to 90 degrees. Then change phase unit to seconds.
- **Expected Result:** The value of Phase should automatically change to 500us that is 90 degrees in seconds for a frequency of 500Hz.
- **Actual Result:**

..
Actual test result goes here.
..
25. Increase and decrease the value of phase.
26. Increase and decrease the value of phase.
- **Expected Result:** The display should follow accordingly.
- **Actual Result:**

..
Actual test result goes here.
..
26. Increase phase value to 1.5 ms. Then change again the unit to degrees.
27. Increase phase value to 1.5 ms. Then change again the unit to degrees.
- **Expected Result:** The value should now be 270 degrees.
- **Actual Result:**

..
Actual test result goes here.
..
27. Change frequency to 1 MHz. Then set phase to 1us. This corresponds to a full period of a 1MHz frequency.
28. Change frequency to 1 MHz. Then set phase to 1us. This corresponds to a full period of a 1MHz frequency.
- **Expected Result:** The interface should look like in steps resources picture.
- **Actual Result:**

..
Actual test result goes here.
..
28. Change phase unit to degrees.
29. Change phase unit to degrees.
- **Expected Result:** The value should be 360 degrees.
- **Actual Result:**

Expand Down
19 changes: 9 additions & 10 deletions docs/tests/plugins/m2k/spectrum_analyzer_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ Test 1: Channel 1 Operation
- Use :ref:`M2k.Usb <m2k-usb-spectrum-analyzer>` setup.

**Steps:**
1. Test Channel 1’s frequency accuracy
2. On channel 1’s setting, set Type to Sample, Window Function to Flat-top and Averaging to 1.
1. Open Spectrum Analyzer plugin.
2. On channel 1’s setting, set Type to Sample, Window Function to Flat-top and CH to 1.
3. Connect Scope ch1+ to W+ and Scope ch1- to GND
4. Test at 500Hz
5. On Spectrum Analyzer’s Sweep setting, Set Start Frequency at 0Hz and Stop frequency at 1kHz, set the Resolution BW to 244.14mHZ. On signal Generator, Set Amplitude: 10V, Frequency: 500Hz, Offset: 0V and Phase: 0 degrees
4. On Spectrum Analyzer’s Sweep setting, Set Start Frequency at 0Hz and Stop frequency at 1kHz, set the Resolution BW to 244.14mHZ. On signal Generator, Set Amplitude: 10V, Frequency: 500Hz, Offset: 0V and Phase: 0 degrees
- **Expected Result:** After setting the start and stop frequency, the center frequency and Span should follow.
- **Actual Result:**

Expand Down Expand Up @@ -266,8 +265,8 @@ Test 2: Channel 2 Operation
- Use :ref:`M2k.Usb <m2k-usb-spectrum-analyzer>` setup.

**Steps:**
1. Test Channel 2’s frequency accuracy
2. On Channel 2’s setting, set Type to Sample, Window Function to Flat-top and Averaging to 1.
1. Open Spectrum Analyzer plugin.
2. On Channel 2’s setting, set Type to Sample, Window Function to Flat-top and CH Thickness to 1.
3. Connect Scope ch2+ to W2+ and Scope ch2- to GND
4. Test at 500Hz
5. On Spectrum Analyzer’s Sweep setting, Set Start Frequency at 0Hz and Stop frequency at 1kHz, set the Resolution BW to 244.14mHZ. On signal Generator, Set Amplitude: 10V, Frequency: 500Hz, Offset: 0V and Phase: 0 degrees
Expand Down Expand Up @@ -486,9 +485,9 @@ Test 3: Channel 1 and 2 Operation

**Steps:**
1. Testing the marker function for channel 1 and 2
2. On channel 1 and 2’s setting, set Type to Sample, Window Function to Flat-top and Averaging to 1.
2. On channel 1 and 2’s setting, set Type to Sample, Window Function to Flat-top and CH Thickness to 1.
3. Connect Scope ch1+ to W1 and Scope ch1- to GND. Connect Scope ch2+ to W2 and Scope ch2- to GND
4. On Spectrum Analyzer’s Sweep setting, Set Start Frequency at 0Hz and Stop frequency at 1MHz, set the Resolution BW to 61.04Hz. On signal Generator, Set Channel 1’s Amplitude: 10V, Frequency: 250 kHz, Offset: 0V and Phase: 0 degrees. Amplitude: 10V, Frequency: 750 kHz, Offset: 0V and Phase: 0 degrees
4. On Spectrum Analyzer’s Sweep setting, Set Start Frequency at 0Hz and Stop frequency at 1MHz, set the Resolution BW to 61.04Hz. On signal Generator, Set Channel 1’s Amplitude: 10V, Frequency: 250 kHz, Offset: 0V and Phase: 0 degrees. Set Channel 2’s Amplitude: 10V, Frequency: 750 kHz, Offset: 0V and Phase: 0 degrees
5. Open the marker setting and select channel 1. Enable marker 1,2,3,4 or 5.
- **Expected Result:** The marker is enabled when the number box is filled with color. The initial position of the marker is on the center frequency of the window.
- **Actual Result:**
Expand All @@ -513,7 +512,7 @@ Test 3: Channel 1 and 2 Operation
Actual test result goes here.
..
8. Click the “Dn Ampl” button.
8. Click the “Down Ampl” button.
- **Expected Result:** The marker should detect the next lower amplitude signal compared from the previous point within the channel 1’s spectrum.
- **Actual Result:**

Expand Down Expand Up @@ -553,7 +552,7 @@ Test 3: Channel 1 and 2 Operation
Actual test result goes here.
..
13. Click the “Dn Ampl” button.
13. Click the “Down Ampl” button.
- **Expected Result:** The marker should detect the next lower amplitude signal compared from the previous point within the channel 2’s spectrum.
- **Actual Result:**

Expand Down

0 comments on commit 4e47e77

Please sign in to comment.