From 70c0e998296fe14211afe11a741eaab108799b5f Mon Sep 17 00:00:00 2001 From: AlexandraTrifan Date: Fri, 20 Dec 2024 14:44:06 +0200 Subject: [PATCH] docs: add initial migration of test cases for m2k and swiot Signed-off-by: AlexandraTrifan --- docs/tests/plugins/index.rst | 8 + docs/tests/plugins/m2k/digital_io_tests.rst | 122 +++ .../plugins/m2k/logic_analyzer_tests.rst | 578 ++++++++++++ .../plugins/m2k/network_analyzer_tests.rst | 408 +++++++++ docs/tests/plugins/m2k/oscilloscope_tests.rst | 829 ++++++++++++++++++ docs/tests/plugins/m2k/power_supply_tests.rst | 156 ++++ docs/tests/plugins/swiot1l/swiot1l_tests.rst | 671 ++++++++++++++ 7 files changed, 2772 insertions(+) create mode 100644 docs/tests/plugins/m2k/digital_io_tests.rst create mode 100644 docs/tests/plugins/m2k/logic_analyzer_tests.rst create mode 100644 docs/tests/plugins/m2k/network_analyzer_tests.rst create mode 100644 docs/tests/plugins/m2k/oscilloscope_tests.rst create mode 100644 docs/tests/plugins/m2k/power_supply_tests.rst create mode 100644 docs/tests/plugins/swiot1l/swiot1l_tests.rst diff --git a/docs/tests/plugins/index.rst b/docs/tests/plugins/index.rst index ffd245d65..70b116f8b 100644 --- a/docs/tests/plugins/index.rst +++ b/docs/tests/plugins/index.rst @@ -10,7 +10,15 @@ Contents :includehidden: :maxdepth: 3 + swiot1l/swiot1l_tests + m2k/digital_io_tests + m2k/logic_analyzer_tests + m2k/power_supply_tests + m2k/oscilloscope_tests + m2k/network_analyzer_tests + .. add the path to each plugin test case here example dac/dac_tests + diff --git a/docs/tests/plugins/m2k/digital_io_tests.rst b/docs/tests/plugins/m2k/digital_io_tests.rst new file mode 100644 index 000000000..224bcb685 --- /dev/null +++ b/docs/tests/plugins/m2k/digital_io_tests.rst @@ -0,0 +1,122 @@ +.. _digital_io_tests: + +Digital IO - Test Suite +======================== + +.. note:: + + User guide: :ref:`Digital IO user guide` + +The Digital IO tests are a set of tests that are run to verify the +Digital IO instrument of the ADALM2000 plugin in Scopy. + +The following apply for all the test cases in this suite. +If the test case has special requirements, they will be listed in the test case section. + +Setup environment: +------------------ + +.. _adalm2000_device_digital_setup: + +**Adalm2000.Device:** + - Open Scopy. + - Connect the ADALM2000 device to the system. + - Connect the ADALM2000 device in Scopy using the USB/network backend. + - Connect loopback cables between DIO 0-7 and DIO 8-15 using the pinout diagram. + +Depends on: + - Test TST.EMU.CONNECT + - Test TST.PREFS.RESET + +Prerequisites: + - Scopy v2.0.0 or later with ADALM2000 plugin installed on the system. + - Tests listed as dependencies are successfully completed. + - Reset .ini files to default using the Preferences "Reset" button. + +Test 1 - Check individual digital pin state +---------------------------------------------------- + +.. _TST.DIO.INDIVIDUAL: + +**UID:** + TST.DIO.INDIVIDUAL + +**Description:** + This test verifies that the individual digital pins are working correctly. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the DigitalIO instrument. + 2. Set DIO 0-7 and DIO 8-15 as individual pins using the combo box. + 3. Set DIO Channel 0 as **output**. + 4. Set DIO Channel 7 as **input**. + 5. Change the logic state of DIO 0 (0/1) multiple times and monitor DIO 7 state. + - **Expected Result**: + - When DIO 0 is set to logic 1, DIO 7 will be automatically set to logic 1 + (the corresponding led will be turned on). + - When DIO 0 is set to logic 0, DIO 7 will be automatically set to logic 0 + (the corresponding led will be turned off). + 6. Connect DIO 0 to a the analog pin **1+** and DIO 7 to the positive power + supply **V+** using the pinout diagram attached in resources. + 7. Set DIO 0 to logic 0 and open the :ref:`Voltmeter` instrument. + Start the instrument and monitor the voltage value on Channel 1. + + - **Expected Result**: + - The voltage displayed on the voltmeter is between -0.050V and 0.4V. + 8. Set DIO 0 to logic 1 and monitor the voltage value on Channel 1. Start the instrument. + - **Expected Result**: + - The voltage displayed on the voltmeter is between 2.9V and 3.4V. + 9. Open the `Power Supply instrument` and set the positive + power supply to a voltage level between 0V and 0.8V. + Monitor the DIO 7 logic state. + + - **Expected Result**: + - DIO 7 indicates logic 0 level. + 10. Open the `Power Supply instrument` and set the positive + power supply to a voltage level between 2V and 3.3V. + Monitor the DIO 7 logic state. + + - **Expected Result**: + - DIO 7 indicates logic 1 level. + 11. Repeat steps 6 to 11 using DIO 8 as **output** (for step 3) and + DIO 1 as **input** for (step 4). + + - **Expected Result**: + - All the expected results in step 6 to 11 are met. + +Test 2 - Checking grouped digital pin states +---------------------------------------------------- + +.. _TST.DIO.GROUP: + +**UID:** + TST.DIO.GROUP + +**Description:** + This test verifies that the grouped digital pins DIO 0-7 and DIO 8-15 + are working correctly. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the DigitalIO instrument. + 2. Set DIO 0-7 and DIO 8-15 as Group pins using the combo box. + 3. Set DIO 0-7 as **output** and DIO 8-15 as **input**. + 4. Set DIO 0-7 to value 0. + - **Expected Result**: + - DIO 8-15 value indicates the same value as DIO 0-7 group. + 5. Set DIO 0-7 to value 128. + - **Expected Result**: + - DIO 8-15 value indicates the same value as DIO 0-7 group. + 6. Set DIO 0-7 as **input** and DIO 8-15 as **output**. + 7. Set DIO 8-15 to value 0. + - **Expected Result**: + - DIO 0-7 value indicates the same value as DIO 8-15 group. + 8. Set DIO 8-15 to value 128. + - **Expected Result**: + - DIO 0-7 value indicates the same value as DIO 8-15 group. diff --git a/docs/tests/plugins/m2k/logic_analyzer_tests.rst b/docs/tests/plugins/m2k/logic_analyzer_tests.rst new file mode 100644 index 000000000..49b4dd7d9 --- /dev/null +++ b/docs/tests/plugins/m2k/logic_analyzer_tests.rst @@ -0,0 +1,578 @@ +.. _logic_analyzer_tests: + +Logic Analyzer - Test Suite +=========================== + +.. note:: + + User guide: :ref:`Logic Analyzer user guide` + +The Logic Analyzer tests are a set of tests that are run to verify the +Logic Analyzer instrument of the ADALM2000 plugin in Scopy. + +The following apply for all the test cases in this suite. +If the test case has special requirements, they will be listed in the test case section. + +Setup environment: +------------------ + +.. _adalm2000_device_setup: + +**Adalm2000.Device:** + - Open Scopy. + - Connect the ADALM2000 device to the system. + - Connect the ADALM2000 device in Scopy using the USB/network backend. + - Connect **W1** to **1+** and **GND** to **1-** using the pinout diagram. + +Depends on: + - Test TST.EMU.CONNECT + - Test TST.PREFS.RESET + +Prerequisites: + - Scopy v2.0.0 or later with ADALM2000 plugin installed on the system. + - Tests listed as dependencies are successfully completed. + - Reset .ini files to default using the Preferences "Reset" button. + +Test 1 - Channel Trigger Function +--------------------------------------------- + +.. _TST.LOGIC.CHN_TRIGGER: + +**UID:** TST.LOGIC.CHN_TRIGGER + +**Description:** This test verifies the basic trigger functionality on individual +digital channels - rising edge, falling edge, high, low, any edge. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Enable DIO 0 and DIO 1 on the Logic Analyzer. + 3. Set the following parameters: + - Sample rate to 50ksps. + - Sample delay of -142 samples. + 4. Open the `Pattern Generator` instrument and enable DIO 1. + Set the following parameters: + + - Pattern: clock. + - Frequency: 100Hz. + - Phase: 0 degrees. + - Duty Cycle: 50%. + 5. Open the `Digital IO` instrument and set DIO 0 as output. + 6. In the Logic Analyzer set DIO0’s trigger to **rising edge** configuration. + 7. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 8. In the Digital IO, change DIO0’s output from 0 to 1. + - **Expected Result**: + - The logic analyzer initiates a capture. + 9. Stop the Logic Analyzer and set DIO0’s trigger to **rising edge** configuration. + 10. Run the Logic Analyzer instrument. + 11. In the Digital IO, change DIO0’s output from 1 to 0. + - **Expected Result**: + - The logic analyzer initiates a capture. + 12. Stop the Logic Analyzer and set DIO0’s trigger to **any edge** configuration. + 13. Run the Logic Analyzer instrument. + 14. In the Digital IO, change DIO0’s output from 0 to 1 or 1 to 0. + - **Expected Result**: + - The logic analyzer initiates a capture. + 15. Stop the Logic Analyzer and set DIO0’s trigger to **low** configuration. + 16. Run the Logic Analyzer instrument. + 17. In the Digital IO, set DIO0’s output to 0. + - **Expected Result**: + - The logic analyzer continuously captures the signal. + 18. Stop the Logic Analyzer and set DIO0’s trigger to **high** configuration. + 19. Run the Logic Analyzer instrument. + 20. In the Digital IO, set DIO0’s output to 1. + - **Expected Result**: + - The logic analyzer continuously captures the signal. + +Test 2 - External Channel Trigger Function +--------------------------------------------- + +.. _TST.LOGIC.EXT_CHN_TRIGGER: + +**UID:** TST.LOGIC.EXT_CHN_TRIGGER + +**Description:** This test verifies the external trigger functionality. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Enable DIO 0 and DIO 1 on the Logic Analyzer. + 3. Set the following parameters: + - Sample rate to 50ksps. + - Sample delay of -142 samples. + 4. Open the `Pattern Generator` instrument and enable DIO 1. + Set the following parameters: + + - Pattern: clock. + - Frequency: 100Hz. + - Phase: 0 degrees. + - Duty Cycle: 50%. + 5. Open the `Digital IO` instrument and set DIO 0 as output. + 6. Open the Logic Analyzer trigger menu and turn on the External trigger. + Select the source as **External Trigger In**. + + - **Expected Result**: + - Triggers set on every DIO channels are automatically turned off. + 7. Connect Trigger in 1 to DIO0 using a loopback cable. + 8. In the Logic Analyzer Trigger settings menu set the External Trigger In condition + to **rising edge**. + 9. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 10. In the Digital IO, change DIO0’s output from 0 to 1. + - **Expected Result**: + - The logic analyzer initiates a capture. + 11. Stop all instruments and set the External Trigger In condition to **falling edge**. + 12. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 13. In the Digital IO, change DIO0’s output from 1 to 0. + - **Expected Result**: + - The logic analyzer initiates a capture. + 14. Stop all instruments and set the External Trigger In condition to **any edge**. + 15. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 16. In the Digital IO, change DIO0’s output from 0 to 1 or 1 to 0. + - **Expected Result**: + - The logic analyzer initiates a capture. + 17. Stop all instruments and set the External Trigger In condition to **low**. + 18. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 19. In the Digital IO, set DIO0’s output to 0. + - **Expected Result**: + - The logic analyzer continuously captures the signal. + 20. Stop all instruments and set the External Trigger In condition to **high**. + 21. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 22. In the Digital IO, set DIO0’s output to 1. + - **Expected Result**: + - The logic analyzer continuously captures the signal. + +Test 3 - Oscilloscope Source External Trigger +--------------------------------------------- + +.. _TST.LOGIC.OSC_EXT_TRIGGER: + +**UID:** TST.LOGIC.OSC_EXT_TRIGGER + +**Description:** This test verifies the external trigger functionality using the +Oscilloscope as the source. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Enable DIO 0 and DIO 1 on the Logic Analyzer. + 3. Set the following parameters: + - Sample rate to 50ksps. + - Sample delay of -142 samples. + 4. Open the Logic Analyzer trigger menu and turn on the External trigger. + Select the source as **Oscilloscope**. + 5. Open the `Signal Generator` instrument and generate a sinewave + with the following parameters: + + - Peak-to-peak: 2V. + - Frequency: 200Hz. + 6. Open the `Oscilloscope` instrument and set the trigger to **normal** + and condition to **rising edge**. + 7. Run the Signal Generator, Oscilloscope and Logic Analyzer instrument and verify if the + Logic Analyzer is triggered at the same time with the Oscilloscope. + + - **Expected Result**: + - The Oscilloscope is triggered when the two blue Trigger cursors are intersected + on the rising edge of the signal. + - If you drag the horizontal cursor in the Oscilloscope window above or + below the signal, it should be in Waiting state, and Logic analyzer will + be Waiting too. + 8. Open the Oscilloscope trigger menu and set the trigger condition to **falling edge**. + 9. Verify that the Logic Analyzer is triggered at the same time with the Oscilloscope. + - **Expected Result**: + - If you drag the horizontal cursor in the Oscilloscope window above or + below the signal, it should be in Waiting state, and Logic analyzer will + be Waiting too. + 10. Open the Oscilloscope trigger menu and set the trigger condition to **low**. + 11. Verify that the Logic Analyzer is triggered at the same time with the Oscilloscope. + - **Expected Result**: + - If you drag the horizontal cursor in the Oscilloscope window above or + below the signal, it should be in Waiting state, and Logic analyzer will + be Waiting too. + 12. Open the Oscilloscope trigger menu and set the trigger condition to **high**. + 13. Verify that the Logic Analyzer is triggered at the same time with the Oscilloscope. + - **Expected Result**: + - If you drag the horizontal cursor in the Oscilloscope window above or + below the signal, it should be in Waiting state, and Logic analyzer will + be Waiting too. + +Test 4 - Trigger Modes +--------------------------------------------- + +.. _TST.LOGIC.TRIGGER_MODES: + +**UID:** TST.LOGIC.TRIGGER_MODES + +**Description:** This test verifies the trigger modes (and/or) of the Logic Analyzer. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Enable DIO 0, DIO 1 and DIO 2 on the Logic Analyzer. + 3. Set the following parameters: + - Sample rate to 50ksps. + - Sample delay of -142 samples. + 4. Open the `Pattern Generator` instrument and enable DIO 2. + Set the following parameters: + + - Pattern: clock. + - Frequency: 5KHz. + 5. Open the `Digital IO` instrument and set DIO 0 and DIO 1 as output. + 6. In the Logic Analyzer trigger settings set DIO 0 and DIO 1 trigger conditions + to **HIGH** and disable the External trigger. + 7. In the Logic Analyzer trigger configuration, set the trigger logic to **OR**. + 8. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 9. In the Digital IO instrument set DIO0’s output to 0 and DIO1’s output to 0. + - **Expected Result**: + - The logic analyzer does not start capturing. + 10. In the Digital IO instrument set DIO0 or DIO1’s output to 1. + - **Expected Result**: + - The logic analyzer starts capturing signal when either of the DIO0 OR DIO1 is HIGH. + 11. Stop all instruments and set the trigger logic to **AND**. + 12. Run the Digital IO, Pattern Generator and Logic Analyzer instrument. + 13. In the Digital IO instrument set DIO0’s output to 0 and DIO1’s output to 1. + - **Expected Result**: + - The logic analyzer does not start capturing. + 14. In the Digital IO instrument set DIO0 and DIO1’s output to 1. + - **Expected Result**: + - The logic analyzer starts capturing signal only when DIO0 AND DIO1 are HIGH. + +Test 5 - Clock signal measurement accuracy +--------------------------------------------- + +.. _TST.LOGIC.CLOCK_SIGNAL: + +**UID:** TST.LOGIC.CLOCK_SIGNAL + +**Description:** This test verifies the accuracy of the clock signal measurement. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Enable DIO 0 on the Logic Analyzer. + 3. Set the following parameters: + - Sample rate to 50ksps. + - Enable the cursor. + 4. Open the `Pattern Generator` instrument and enable DIO 0. + Set the following parameters: + + - Pattern: clock. + - Frequency: 100Hz. + - Phase: 0 degrees. + - Duty Cycle: 50%. + 5. Run a single capture of the Logic Analyzer and move the cursor handles to the + consecutive rising edges or consecutive falling edges of the signal. + + - **Expected Result**: + - The data measured by the cursor is close to ∆t: 10ms and 1/∆t: 100Hz. + 6. In the Cursors settings menu enable **Cursors lock** and measure the next + set of edges. + + - **Expected Result**: + - The data measured by the cursor is close to ∆t: 10ms and 1/∆t: 100Hz. + 7. Set the Logic Analyzer sample rate to 100Msps and position to 0s. + 8. Set the Pattern Generator DIO 0 parameters to: + - Pattern: clock. + - Frequency: 2.5MHz. + 9. Run a single capture of the Logic Analyzer and move the cursor handles to the + consecutive rising edges or consecutive falling edges of the signal. + + - **Expected Result**: + - The data measured by the cursor is close to ∆t: 400ns and 1/∆t: 2.5MHz. + 10. In the Cursors settings menu enable **Cursors lock** and measure the next + set of edges. + + - **Expected Result**: + - The data measured by the cursor is close to ∆t: 400ns and 1/∆t: 2.5MHz. + 11. Set the Logic Analyzer sample rate to 20ksps. + 12. Set the Pattern Generator DIO 0 parameters to: + - Pattern: clock. + - Frequency: 100Hz. + - Duty Cycle: 70%. + 13. Run a single capture of the Logic Analyzer and move the cursor handles to the + rising and falling edge of the upper limit. + + - **Expected Result**: + - The data measured by the cursor is close to ∆t: 7ms. + 14. Move the cursors to the falling and rising edge of the lower limit. + - **Expected Result**: + - The data measured by the cursor is close to ∆t: 3ms. + + +Test 6 - Parallel Decoder +--------------------------------------------- + +.. _TST.LOGIC.PARALLEL_DECODER: + +**UID:** TST.LOGIC.PARALLEL_DECODER + +**Description:** This test verifies the parallel decoder functionality. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Add a parallel decoder from the main settings menu and set the following parameters: + - Clock line to DIO8. + - Data lines 0-7 to DIO0 to DIO7. + 3. Open the Pattern Generator instrument and group DIO0 to DIO7 as number pattern. + Enable DIO8 and set it to Clock with 500Hz frequency. + Set the number value to 50 (it is read as decimal). + 4. Run the Pattern Generator and Logic Analyzer instrument. + 5. Verify the Logic Analyze decoded value. + - **Expected Result**: + - The reading is in hex format. For reference, 50 decimal = 32 hex. + 6. In the Pattern Generator set the number value to 250. + 7. Verify the Logic Analyzer decoded value. + - **Expected Result**: + - The reading is in hex format. For reference, 250 decimal = FA. + +Test 7 - SPI decoder +--------------------------------------------- + +.. _TST.LOGIC.SPI_DECODER: + +**UID:** TST.LOGIC.SPI_DECODER + +**Description:** This test verifies the SPI decoder functionality. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Add an SPI decoder from the main settings menu and set the following parameters: + - Clock line to DIO0. + - MISO line to DIO1. + - MOSI line to DIO2. + - CS# line to DIO3. + 3. Set DIO2’s trigger to falling edge. + 4. Open the Pattern Generator instrument and group DIO0 to DIO2 as SPI. + Set the following parameters: + + - Frequency: 5kHz. + - Bytes per frame: 2. + - Interframe space: 4. + - Data: insert 4 bytes in hex form e.g: AB CD EF 15. + 5. Run the Pattern Generator and Logic Analyzer instrument. + 6. Verify the Logic Analyzer plot for the decoder output: + - **Expected Result**: + - The MISO data has 2 bytes per frame and the decoded data is + AB CD EF 15. + + +Test 8 - UART decoder +--------------------------------------------- + +.. _TST.LOGIC.UART_DECODER: + +**UID:** TST.LOGIC.UART_DECODER + +**Description:** This test verifies the UART decoder functionality. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument and set time base to 1 ms. + 2. Add a UART decoder from the main settings menu and set the following parameters: + - TX line to DIO0. + - RX line to DIO1. + - Baud rate to 9600. + - Data bits to 8. + - Data format to ASCII. + - Partity type to none. + - Stop bits to 1. + - Bit order to lsb-first. + 3. Set DIO0's trigger to falling edge. + 4. Open the Pattern Generator instrument and group DIO0 as UART. + Set the following parameters: + + - Baud rate: 9600. + - Stop bit to 1. + - Parity to none. + - Data to send: M2K. + 5. Connect DIO0 to DIO1 using a loopback cable. + 6. Run the Pattern Generator and Logic Analyzer instrument. + 7. Verify the Logic Analyzer plot for the decoder output: + - **Expected Result**: + - The RX decoded data is "M2K". + 8. In the Pattern Generator change the baud rate to 115200. + 9. Verify the Logic Analyzer plot for the decoder output: + - **Expected Result**: + - The RX decoded data is not "M2K". + 10. In the Logic Analyzer change the baud rate to 115200: + - **Expected Result**: + - The RX decoded data is "M2K". + +Test 9 - PWM Decoder +--------------------------------------------- + +.. _TST.LOGIC.PWM_DECODER: + +**UID:** TST.LOGIC.PWM_DECODER + +**Description:** This test verifies the PWM decoder functionality. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Add a PWM decoder from the main settings menu and set the following parameters: + - Data line to DIO0. + - Polarity to active-high. + 3. In the Pattern Generator instrument, set DIO0 to Clock with 100 Hz frequency + and set the duty cycle to 5%, 30%, 50%, 75% and 95% verifying the Logic Analyzer + decoded data in between changes: + + - **Expected Result**: + - The data follows the duty cycle set in the pattern generator. + +Test 10 - Channel visual representation +--------------------------------------------- + +.. _TST.LOGIC.CHN_VISUAL: + +**UID:** TST.LOGIC.CHN_VISUAL + +**Description:** This test verifies changing the channel name, +trace height and plot color. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer instrument. + 2. Enable DIO0 and open the channel settings by double clicking + the channel handle. + 3. Change the channel name to "D0" and verify the channel handle: + - **Expected Result**: + - The channel handle displays "D0". + 4. Change the trace height to 50: + - **Expected Result**: + - The trace height on the plot is doubled. + 5. Change the color to **transparent** and verify the channel on plot: + - **Expected Result**: + - The channel is no longer seen on the plot. + +Test 11 - Export Functionality +--------------------------------------------- + +.. _TST.LOGIC.EXPORT: + +**UID:** TST.LOGIC.EXPORT + +**Description:** This test verifies the data export functionality +of the Logic Analyzer. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Pattern Generator and set two consecutive channels with similar + configurations: + + - DIO0 and DIO1: Pattern: Clock, Frequency: 100Hz, Phase: 0 and Duty Cycle: 50%. + - DIO2 and DIO3: Pattern: Clock, Frequency: 300Hz, Phase: 0 and Duty Cycle: 50%. + - DIO4 and DIO5: Pattern: Clock, Frequency: 500Hz, Phase: 0 and Duty Cycle: 50%. + - DIO6 and DIO7: Pattern: Clock, Frequency: 150Hz, Phase: 0 and Duty Cycle: 80%. + - DIO8 and DIO9: Pattern: Clock, Frequency: 200Hz, Phase: 0 and Duty Cycle: 20%. + - Group DIO10 to DIO15: Pattern: Number Pattern and Data: 50. + 2. Run the Logic Analyzer and Pattern Generator. + 3. In the Logic Analyzer General Settings menu set the Export All to **On** and + click the Export button. + 4. Select the file name, location and choose .csv format. + - **Expected Result**: + - The file is created in the specified location. + 5. Open the file and verify the data: + - **Expected Result**: + - The exported data is in .csv format and correspods to the data on the plot. + +Test 12 - Print Plot +--------------------------------------------- + +.. _TST.LOGIC.PRINT_PLOT: + +**UID:** TST.LOGIC.PRINT_PLOT + +**Description:** This test verifies the print plot functionality +of the Logic Analyzer. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Logic Analyzer and set the time base to 5 ms. + 2. Open the Pattern Generator and set two consecutive channels with similar + configurations: + + - DIO0 and DIO1: Pattern: Clock, Frequency: 100Hz, Phase: 0 and Duty Cycle: 50%. + 3. Run the Logic Analyzer and Pattern Generator. + 4. Press the Print Plot button and choose a location for the exported file: + - **Expected Result**: + - The file is created in the specified location. + 5. Open the .pdf exported file and visually compare it to the application plot. + +Test 13 - Decoder Table +--------------------------------------------- + +.. _TST.LOGIC.DECODER_TABLE: + +**UID:** TST.LOGIC.DECODER_TABLE + +**Description:** This test verifies the decoder table functionality of the Logic Analyzer. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Pattern Generator and set the following parameters: + - DIO 0: UART, Baud rate: 9600, Data to Send: 123. + 2. Open the Logic Analyzer, enable DIO 0 and add a UART decoder with the + following parameters: + + - RX on channel 0. + - Baud rate: 9600. + - Data format: ASCII. + 3. In the General Settings set the sample rate to 1Msps and nb of samples to 10k samples. + 4. Run the Pattern Generator and Logic Analyzer. + 5. In the Logic Analyzer open the Decoder Table using the right side Decode menu. + Set the following parameters: + + - Group by: RX data. + - Group size: 3. + - Filter out all except for RX data. + 6. Check the decoder table: + - **Expected Result**: + - Each table row has RX data and time annotations. + - The RX data corresponds to the data sent by the Pattern Generator. + 7. Write "^3$" in the Regex search box and press Enter. + - **Expected Result**: + - Only the RX data equal to "3" is displayed in the table. + 8. Double click on the first RX data row of the decoder table: + - **Expected Result**: + - The plot is zoomed in and centered on the corresponding data. \ No newline at end of file diff --git a/docs/tests/plugins/m2k/network_analyzer_tests.rst b/docs/tests/plugins/m2k/network_analyzer_tests.rst new file mode 100644 index 000000000..752aa0369 --- /dev/null +++ b/docs/tests/plugins/m2k/network_analyzer_tests.rst @@ -0,0 +1,408 @@ +.. _network_analyzer_tests: + +Network Analyzer - Test Suite +============================= + +.. note:: + + User guide: :ref:`Network Analyzer user guide` + +Setup environment: +------------------ + +.. _adalm2000_device_na_setup: + +**Adalm2000.Device:** + - Open Scopy. + - Connect the ADALM2000 device to the system. + - Connect the ADALM2000 device in Scopy using the USB/network backend. + +Depends on: + - Test TST.EMU.CONNECT + - Test TST.PREFS.RESET + +Prerequisites: + - Scopy v2.0.0 or later with ADALM2000 plugin installed on the system. + - Tests listed as dependencies are successfully completed. + - Reset .ini files to default using the Preferences "Reset" button. + +Test 1 - Low Pass Filter CH1 340Hz +--------------------------------------- + +.. _TST.NA.LOWPASS_CH1_340HZ: + +**UID:** TST.NA.LOWPASS_CH1_340HZ + +**Description:** This test verifies the functionality of the Network Analyzer +using a Low Pass Filter. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - Using a breadboard, create the following connections: + - Connect the resistor and capacitor in series + (resistor on the left side, capacitor on the right side). + - Connect the right capacitor terminal to **2-**, **1-** and **GND**. + - Connect the left resistor terminal to **1+** and **W1**. + - Probe the intersection node between the resistor and capacitor + with **2+**. + - OS: ANY + +**Resources**: + - Resistor: R = 470 Ohms + - Capacitor: C = 1uF + +**Steps:** + 1. In the Network Analyzer settings menu set the following: + - Reference: Channel 1, 1V Amplitude, 0V Offset + - Sweep: Logarithmic, Start: 10Hz, Stop: 500kHz, Sample Count: 100 + - Display: Min. Magnitude: -90dB, Max. Magnitude: 10dB, Min. Phase: -150°, + Max. Phase: 60° + 2. Run the Network Analyzer. Check the frequency response in the Bode plot. + - **Expected result:** On the Magnitude Plot, after a flat section (passband), + response, the trace drops at around 340Hz (cutoff frequency). + 3. Enable the “Cursor” and move it to find the -3dB point on the trace. + - **Expected result:** The magnitude indicates -3dB at approximately + 340 Hz. The phase corresponding to the same frequency is also displayed. + 4. Disable the cursor by clicking the box again. + - **Expected result:** The cursor controls disappear from the interface. + 5. Open the General Settings and change the plot type to **Nyquist**: + - **Expected result:** The Magnitude and Phase plot are replaced by + a Polar plot. + 6. Change the plot type to **Nichols**. + - **Expected result:** The polar plot is replaced by a single plot + with the magnitude on the Y Axis and phase on the X Axis. + 7. Change the plot type to **Bode** and switch to **Linear** sweep type. + - **Expected result:** The plot frequency scale changes to a linear one. + The signal drops abruptly until it reaches -3dB at around 340Hz, then + the trace flattens. + +**Result:** PASS/FAIL + +Test 2 - Low Pass Filter CH2 340Hz +--------------------------------------- + +.. _TST.NA.LOWPASS_CH2_340HZ: + +**UID:** TST.NA.LOWPASS_CH2_340HZ + +**Description:** This test verifies the functionality of the Network Analyzer +using a Low Pass Filter. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - Using a breadboard, create the following connections: + - Connect the resistor and capacitor in series + (resistor on the left side, capacitor on the right side). + - Connect the right capacitor terminal to **2-**, **1-** and **GND**. + - Connect the left resistor terminal to **2+** and **W1**. + - Probe the intersection node between the resistor and capacitor + with **1+**. + - OS: ANY + +**Resources**: + - Resistor: R = 470 Ohms + - Capacitor: C = 1uF + +**Steps:** + 1. In the Network Analyzer settings menu set the following: + - Reference: Channel 2, 1V Amplitude, 0V Offset + - Sweep: Logarithmic, Start: 10Hz, Stop: 500kHz, Sample Count: 100 + - Display: Min. Magnitude: -90dB, Max. Magnitude: 10dB, Min. Phase: -150°, + Max. Phase: 60° + 2. Run the Network Analyzer. Check the frequency response in the Bode plot. + - **Expected result:** On the Magnitude Plot, after a flat section (passband), + response, the trace drops at around 340Hz (cutoff frequency). + 3. Enable the “Cursor” and move it to find the -3dB point on the trace. + - **Expected result:** The magnitude indicates -3dB at approximately + 340 Hz. The phase corresponding to the same frequency is also displayed. + 4. Disable the cursor by clicking the box again. + - **Expected result:** The cursor controls disappear from the interface. + 5. Open the General Settings and change the plot type to **Nyquist**: + - **Expected result:** The Magnitude and Phase plot are replaced by + a Polar plot. + 6. Change the plot type to **Nichols**. + - **Expected result:** The polar plot is replaced by a single plot + with the magnitude on the Y Axis and phase on the X Axis. + 7. Change the plot type to **Bode** and switch to **Linear** sweep type. + - **Expected result:** The plot frequency scale changes to a linear one. + The signal drops abruptly until it reaches -3dB at around 340Hz, then + the trace flattens. + +**Result**: PASS/FAIL + +Test 3 - Low Pass Filter CH1 1.59MHz +----------------------------------------- + +.. _TST.NA.LOWPASS_CH1_1_59MHZ: + +**UID:** TST.NA.LOWPASS_CH1_1_59MHZ + +**Description:** This test verifies the functionality of the Network Analyzer +using a Low Pass Filter. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - Using a breadboard, create the following connections: + - Connect the resistor and capacitor in series + (resistor on the left side, capacitor on the right side). + - Connect the right capacitor terminal to **2-**, **1-** and **GND**. + - Connect the left resistor terminal to **1+** and **W1**. + - Probe the intersection node between the resistor and capacitor + with **2+**. + - OS: ANY + +**Resources**: + - Resistor: R = 1 kOhms + - Capacitor: C = 100 pF + +**Steps:** + 1. In the Network Analyzer settings menu set the following: + - Reference: Channel 1, 1V Amplitude, 0V Offset + - Sweep: Logarithmic, Start: 50Hz, Stop: 30MHz, Sample Count: 100 + - Display: Min. Magnitude: -45dB, Max. Magnitude: 10dB, Min. Phase: -100°, + Max. Phase: 20° + 2. Run the Network Analyzer. Check the frequency response in the Bode plot. + - **Expected result:** On the Magnitude Plot, after a flat section (passband), + response, the trace drops at around 1.5 MHz (cutoff frequency). + 3. Enable the “Cursor” and move it to find the -3dB point on the trace. + - **Expected result:** The magnitude indicates -3dB at approximately + 1.5MHz. The phase corresponding to the same frequency is also displayed. + 4. Disable the cursor by clicking the box again. + - **Expected result:** The cursor controls disappear from the interface. + 5. Switch to **Linear** sweep type. + - **Expected result:** The plot frequency scale changes to a linear one. + The signal gradually drops and reaches -3dB at around 1.59MHz. + +**Result:** PASS/FAIL + +Test 4 - High Pass Filter CH1 340Hz +---------------------------------------- + +.. _TST.NA.HIGHPASS_CH1_340HZ: + +**UID:** TST.NA.HIGHPASS_CH1_340HZ + +**Description:** This test verifies the functionality of the Network Analyzer +using a High Pass Filter. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - Using a breadboard, create the following connections: + - Connect the capacitor and resistor in series + (capacitor on the left side, resistor on the right side). + - Connect the right resistor terminal to **2-**, **1-** and **GND**. + - Connect the left capacitor terminal to **1+** and **W1**. + - Probe the intersection node between the resistor and capacitor + with **2+**. + - OS: ANY + +**Resources**: + - Resistor: R = 470 Ohms + - Capacitor: C = 1uF + +**Steps:** + 1. In the Network Analyzer settings menu set the following: + - Reference: Channel 1, 1V Amplitude, 0V Offset + - Sweep: Logarithmic, Start: 1Hz, Stop: 1MHz, Sample Count: 100 + - Display: Min. Magnitude: -90dB, Max. Magnitude: 10dB, Min. Phase: -180°, + Max. Phase: 180° + 2. Run the Network Analyzer. Check the frequency response in the Bode plot. + - **Expected result:** On the Magnitude Plot, the first section is an + increasing ramp until the magnitude reaches -3dB at around 340Hz + which is the cutoff frequency. After the cutoff frequency, the + magnitude plot flattens, indicating the high pass allows the frequencies + to pass without attenuation. + 3. Enable the “Cursor” and move it to find the -3dB point on the trace. + - **Expected result:** The magnitude indicates -3dB at approximately + 340 Hz. The phase corresponding to the same frequency is also displayed. + 4. Disable the cursor by clicking the box again. + - **Expected result:** The cursor controls disappear from the interface. + +**Result:** PASS/FAIL + +Test 5 - Band Pass Filter CH1 +---------------------------------- + +.. _TST.NA.BANDPASS_CH1: + +**UID:** TST.NA.BANDPASS_CH1 + +**Description:** This test verifies the functionality of the Network Analyzer +using a Band Pass Filter with a low cutoff frequency of 1.59kHz and a high cutoff +frequency of 15.9kHz. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - Using a breadboard, create the following connections: + - Connect **C1** and **R1** in series + (capacitor on the left side, resistor on the right side). + - Connect the right R1 terminal to **2+** and the left + terminal of **C2**. + - Connect the left C1 terminal to **1+** and **W1**. + - Connect the intersection node between R1 and C1 + to the left terminal of **R2**. + - Connect the right terminal of **R2**, **2-**, **1-** and + the right terminal of **C2** to **GND**. + - OS: ANY + +**Resources**: + - Resistor: R1 = 100 Ohms + - Resistor: R2 = 100 Ohms + - Capacitor: C1 = 1uF + - Capacitor: C2 = 0.1uF + +**Steps:** + 1. In the Network Analyzer settings menu set the following: + - Reference: Channel 1, 1V Amplitude, 0V Offset + - Sweep: Logarithmic, Start: 50Hz, Stop: 5MHz, Sample Count: 100 + - Display: Min. Magnitude: -90dB, Max. Magnitude: 10dB, Min. Phase: -180°, + Max. Phase: 180° + 2. Run the Network Analyzer. Check the frequency response in the Bode plot. + - **Expected result:** On the Magnitude Plot, the first section is an + increasing ramp until the magnitude reaches -3dB at around 1.59kHz + which is the lower cutoff frequency. The trace section after the lower + cutoff frequency is a the passband. The trace drops from -3dB at around + 15.9kHz which is the higher cutoff frequency. + 3. Enable the “Cursor” and move it to find the -3dB points on the trace. + - **Expected result:** The magnitude indicates -3dB at approximately + 1.59 kHz and 15.9 kHz. + 4. Disable the cursor by clicking the box again. + - **Expected result:** The cursor controls disappear from the interface. + +**Result:** PASS/FAIL + +Test 6 - Band Stop Filter CH1 +---------------------------------- + +.. _TST.NA.BANDSTOP_CH1: + +**UID:** TST.NA.BANDSTOP_CH1 + +**Description:** This test verifies the functionality of the Network Analyzer +using a Band Stop notch Filter with a notch frequency of 795Hz. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - Using a breadboard, create the following connections: + - Connect **C1** and **C2** in series. + - Connect **C1** and **R1** in series + (capacitor on the left side, resistor on the right side). + - Connect **R2** and **R3** in series. + - Connect **C3** in series with **R1** on the left and + the intersection between **R2** and **R3** on the right. + - Connect the right terminal of **R3** to the right terminal + of **C2** and to **2+**. + - At the intersection between **R1** and **C3**, connect + **1-**, **2-** and **GND**. + - Connect the left terminal of **C1** to the left terminal + of **R2** and to **1+** and **W1**. + - OS: ANY + +**Resources**: + - Resistor: R1 = 100 Ohms + - Resistor: R2 = 200 Ohms + - Resistor: R3 = 200 Ohms + - Capacitor: C1 = 1uF + - Capacitor: C2 = 1uF + - Capacitor: C3 = 2uF + +**Steps:** + 1. In the Network Analyzer settings menu set the following: + - Reference: Channel 1, 1V Amplitude, 0V Offset + - Sweep: Logarithmic, Start: 20Hz, Stop: 10MHz, Sample Count: 100 + - Display: Min. Magnitude: -50dB, Max. Magnitude: 5dB, Min. Phase: -180°, + Max. Phase: 180° + 2. Run the Network Analyzer. Check the frequency response in the Bode plot. + - **Expected result:** On the Magnitude Plot, the trace is around -3dB + on the entire spectrum, except at around 795Hz where the trace drops + and then rises again to -3dB. + 3. Enable the “Cursor” and move it to find the low point on the trace. + - **Expected result:** The magnitude drops at around 795Hz. + 4. Disable the cursor by clicking the box again. + - **Expected result:** The cursor controls disappear from the interface. + +**Result:** PASS/FAIL + + +Test 7 - Print Plot +------------------- + +.. _TST.NA.PRINT_PLOT: + +**UID**: TST.NA.PRINT_PLOT + +**Description:** Check the print plot feature of the Network Analyzer +by exporting the low pass filter plot screenshot to a PDF file. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - :ref:`Low pass filter setup` + - OS: ANY + +**Steps:** + 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 + location. + 3. Open the exported file and verify it: + - **Expected result:** The plot is correctly saved in the PDF file. + +**Result**: PASS/FAIL + +Test 8 - Buffer Previewer +---------------------------- + +.. _TST.NA.BUFFER_PREVIEWER: + +**UID**: TST.NA.BUFFER_PREVIEWER + +**Description:** Check the buffer previewer feature of the Network Analyzer +by viewing the acquired data in the Oscilloscope and analyzing measurements. + +**Preconditions**: + - :ref:`Adalm2000.Device` + - Connect **1+** to **W1** and **2+** to **2-** using loopback cables. + - OS: ANY + +**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 + - Display: Min. Magnitude: -50dB, Max. Magnitude: 5dB, Min. Phase: -180°, + Max. Phase: 180° + 2. Run a Single capture in the Network Analyzer. + 3. In the Sweep settings menu, enable the Buffer Previewer. + - **Expected result:** A time domain plot appears above the Bode plot. + 4. Slide the blue handle at the leftmost end of the plot. + - **Expected result:** + - A sinewave is displayed on the time plot. + - Below the time plot the Sample Count is 1/10, Current Frequency is 20Hz. + 5. In the Sweep settings menu click the **ViewInOsc** button. + - **Expected result:** + - The Oscilloscope instrument is opened. + - The data is displayed as reference waveform in the Oscilloscope. + - The measurements show a frequency of 20Hz. + 6. Slide the blue handle at the rightmost end of the plot. + - **Expected result:** + - A sinewave is displayed on the time plot. + - Below the time plot the Sample Count is 10/10, Current Frequency is 1MHz. + 7. In the Sweep settings menu click the **ViewInOsc** button. + - **Expected result:** + - The Oscilloscope instrument is opened. + - The data is displayed as reference waveform in the Oscilloscope. + - The measurements show a frequency of 1MHz. + +**Result**: PASS/FAIL + +Test 9 - Gain Mode +----------------------- + +Test 10 - DC Filtering +--------------------------- + +Test 11 - Reference Export/Import +-------------------------------------- + +Test 12 - Reference Snapshot +---------------------------------- diff --git a/docs/tests/plugins/m2k/oscilloscope_tests.rst b/docs/tests/plugins/m2k/oscilloscope_tests.rst new file mode 100644 index 000000000..8c5cc0840 --- /dev/null +++ b/docs/tests/plugins/m2k/oscilloscope_tests.rst @@ -0,0 +1,829 @@ +.. _oscilloscope_tests: + +Oscilloscope - Test Suite +========================= + +.. note:: + + User guide: :ref:`Oscilloscope user guide` + +The following test cases are designed to verify the functionality of +the Oscilloscope plugin. + +Setup environment: +------------------ + +.. _adalm2000_osc_setup_ch1: + +**Adalm2000.Osc.CH1:** + - Open Scopy. + - Connect the ADALM2000 device to the system. + - Connect the ADALM2000 device in Scopy using the USB/network backend. + - Open the Oscilloscope instrument and use only the CH1 settings and menus. + +Depends on: + - Test TST.EMU.CONNECT + - Test TST.PREFS.RESET + +Prerequisites: + - Scopy v2.0.0 or later with ADALM2000 plugin installed on the system. + - Tests listed as dependencies are successfully completed. + - Reset .ini files to default using the Preferences "Reset" button. + - Connect **W1** to **1+** and **GND** to **1-** on the ADALM2000 device + using loopback cables. + - Connect **W2** to **2+** and **GND** to **2-** on the ADALM2000 device + using loopback cables. + +Test 1 - Time base and Volts/div Knobs +-------------------------------------- + +.. _TST.OSC.TIME_VOLTS_1: + +**UID:** TST.OSC.TIME_VOLTS_1 + +**Description:** Check the increment/decrement operation of the time base and +volts/div knobs. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the channel settings and set the knob to large increment + (NO orange dot in the center). + 2. Set the Time Base to 2us and the Volts/Div to 2 Volts. + 3. Use the - button 4 times and the + button 2 times on each knob: + - **Expected result:** + - The Time Base value changes to 1us, 500ns, 200ns, 100ns after the - button. + - The Time Base value changes to 200ns and 500ns after the + button. + - The Volts/Div value changes to 1V, 500, 200, 100 mV after the - button. + - The Volts/Div value changes to 200mV and 500mV after the + button. + 4. Set the knob to small increment (orange dot in the center). + Set the Time Base to 2us and the Volts/Div to 2 Volts. + 5. Use the + and - button once on each knob: + - **Expected result:** + - The Time Base value changes to 3us and back to 2us. + - The Volts/Div value changes to 3V and back to 2V. + +**Result**: PASS/FAIL + +Test 2 - Position Knob +----------------------- + +.. _TST.OSC.POSITION_1: + +**UID:** TST.OSC.POSITION_1 + +**Description:** Check the increment/decrement operation of the position knob +which depends on the value of the Time Base. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the channel settings and set the Position knob to large increment + (NO orange dot in the center). + 2. Set the Time Base to 2us and the horizontal position to 0. + 3. Use the + button 2 times and the - button 2 times on the horizontal Position knob: + - **Expected result:** + - The position changes to 200ns and 400ns after the + + and back to 200ns and 0 after the - button. + - The plot handle position also changes accordingly. + 4. Set the Time Base to 1us and the horizontal position to 0. + - **Expected result:** + - The position changes to 100ns and 200ns after the + button and + back to 100ns and 0 after the - button. + - The plot handle position also changes accordingly. + 5. Set the Position knob to small increment (orange dot in the center). + Set the Time Base to 2us and the horizontal position to 0. + 6. Use the + button 2 times and the - button 2 times on the horizontal Position knob: + - **Expected result:** + - The position changes to 20ns and 40ns after the + button and + back to 20ns and 0 after the - button. + - The plot handle position also changes accordingly. + +**Result**: PASS/FAIL + +Test 3 - Constant Signal Check +------------------------------- + +.. _TST.OSC.CONSTANT_SIGNAL_1: + +**UID:** TST.OSC.CONSTANT_SIGNAL_1 + +**Description:** Check the constant signal from the signal generator on the +oscilloscope using Channel 1. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator instrument and set the following config on CH1: + - Constant signal, 3.3V + 2. In the Oscilloscope Trigger Settings, set the mode to **Auto**. + 3. In the Oscilloscope Measure Settings enable **Display All**. + 4. Run both instruments. + 5. Monitor the Oscilloscope RMS measurement: + - **Expected result:** + - The RMS reading is within 3.2V to 3.4V. + 6. Change the value to 0V in the Signal Generator and monitor it on the Oscilloscope: + - **Expected result:** + - The reading is within 4.9V to 5.1V. + +**Result**: PASS/FAIL + +Test 4 - Sine Wave Signal Check +------------------------------- + +.. _TST.OSC.SINE_WAVE_SIGNAL_1: + +**UID:** TST.OSC.SINE_WAVE_SIGNAL_1 + +**Description:** Check the sine wave signal from the signal generator on the oscilloscope +using Channel 1. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator instrument and set the following config on CH1: + - Sine wave, 2Vpp, 200Hz, 0V Offset, 0deg Phase + 2. In the Oscilloscope Trigger Settings, set the mode to **Auto** and + the following configuration in the general settings: + + - Horizontal: Time Base: 500us/div, Position: 0ms + - Vertical: Volts/Div: 500mV/div, Position: 0V + 3. Run both instruments. + 4. Monitor the Oscilloscope measurements and plot: + - **Expected result:** + - The plot displays 1.5 periods. + - The measurements display: Period: 5ms, Frequency: 200 Hz, + Peak-peak: 1.9Vpp to 2.1Vpp, RMS: 0.6Vrms to 0.8Vrms. + 5. Change the Signal Generator amplitude to 5V and the frequency to 500Hz: + - **Expected result:** + - The plot displays 4 periods. + - The measurements display: Period: 2ms, Frequency: 500 Hz, + Peak-peak: 4.9Vpp to 5.1Vpp, RMS: 1.74Vrms to 1.78Vrms. + +**Result**: PASS/FAIL + +Test 5 - Square Wave Signal Check +--------------------------------- + +.. _TST.OSC.SQUARE_WAVE_SIGNAL_1: + +**UID:** TST.OSC.SQUARE_WAVE_SIGNAL_1 + +**Description:** Check the square wave signal from the signal generator on +the oscilloscope using Channel 1. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config on CH1: + - Square wave, 5Vpp, 500Hz, 0V Offset, 0deg Phase + 2. In the Oscilloscope Trigger Settings, set the mode to **Auto** and + the following configuration in the general settings: + + - Horizontal: Time Base: 500us/div, Position: 0ms + - Vertical: Volts/Div: 1V/div, Position: 0V + 3. Run both instruments. + 4. Monitor the Oscilloscope measurements and plot: + - **Expected result:** + - The plot displays 4 square waves. + - The measurements display: Period: 2ms, Frequency: 500 Hz, + Amplitude: 4.9Vpp to 5.1Vpp, RMS: 2.4Vrms to 2.6Vrms. + 5. Change the Signal Generator amplitude to 8V and the frequency to 2 kHz. + Change the Oscilloscope Time Base to 200us/div: + + - **Expected result:** + - The plot displays 6 square waves. + - The measurements display: Period: 500us, Frequency: 2 kHz, + Amplitude: 7.9Vpp to 8.1Vpp, RMS: 3.9Vrms to 4.1Vrms. + +**Result**: PASS/FAIL + +Test 6 - Triangle Wave Signal Check +----------------------------------- + +.. _TST.OSC.TRIANGLE_WAVE_SIGNAL_1: + +**UID:** TST.OSC.TRIANGLE_WAVE_SIGNAL_1 + +**Description:** Check the triangle wave signal from the signal generator on +the oscilloscope using Channel 1. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config on CH1: + - Triangle wave, 4Vpp, 2kHz, 0V Offset, 0deg Phase + 2. In the Oscilloscope Trigger Settings, set the mode to **Auto** and + the following configuration in the general settings: + + - Horizontal: Time Base: 200us/div, Position: 0ms + - Vertical: Volts/Div: 1V/div, Position: 0V + 3. Run both instruments. + 4. Monitor the Oscilloscope measurements and plot: + - **Expected result:** + - The plot displays 6 triangle waves. + - The measurements display: Period: 500us, Frequency: 2 kHz, + Peak-peak: 3.9Vpp to 4.1Vpp, RMS: 1.0Vrms to 1.2Vrms. + 5. Change the Signal Generator amplitude to 5V and the frequency to 20kHz. + Change the Oscilloscope Time Base to 5us/dev. + + - **Expected result:** + - The plot displays 6 triangle waves. + - The measurements display: Period: 50us, Frequency: 20 kHz, + Peak-peak: 4.9Vpp to 5.1Vpp, RMS: 1.3Vrms to 1.5Vrms. + +**Result**: PASS/FAIL + +Test 7 - Rising/Falling Ramp Sawtooth Wave +------------------------------------------ + +.. _TST.OSC.RAMP_SAWTOOTH_WAVE_SIGNAL_1: + +**UID:** TST.OSC.RAMP_SAWTOOTH_WAVE_SIGNAL_1 + +**Description:** Check the rising and falling ramp sawtooth wave signal from +the signal generator on the oscilloscope using Channel 1. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config on CH1: + - Rising Ramp Sawtooth, 8Vpp, 20kHz, 0V Offset, 0deg Phase. + 2. In the Oscilloscope Trigger Settings, set the mode to **Auto** and + the following configuration in the general settings: + + - Horizontal: Time Base: 10us/div, Position: 0ms + - Vertical: Volts/Div: 2V/div, Position: 0V + 3. Run both instruments. + 4. Monitor the Oscilloscope measurements and plot: + - **Expected result:** + - The plot displays 3 sawtooth waves. + - The measurements display: Period: 50us, Frequency: 20 kHz, + Peak-peak: 7.9Vpp to 8.1Vpp, RMS: 2.2Vrms to 2.4Vrms. + 5. Change the Signal Generator configuration to Falling Ramp Sawtooth: + - **Expected result:** + - The plot displays 3 sawtooth waves. + - The measurements display: Period: 50us, Frequency: 20 kHz, + Peak-peak: 7.9Vpp to 8.1Vpp, RMS: 2.2Vrms to 2.4Vrms. + +**Result**: PASS/FAIL + +Test 8 - Cursor Reading Check +------------------------------ + +.. _TST.OSC.CURSOR_READING_1: + +**UID:** TST.OSC.CURSOR_READING_1 + +**Description:** Check the cursor reading value on the oscilloscope using +Channel 1. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config on CH1: + - Sine wave, 2Vpp, 200Hz, 0V Offset, 0deg Phase + 2. In the Oscilloscope Trigger Settings, set the mode to **Auto** and + the following configuration in the general settings: + + - Horizontal: Time Base: 1ms/div, Position: 0ms + - Vertical: Volts/Div: 500mV/div, Position: 0V + - Enable **Cursors** and disable **Measure**. + 3. Run both instruments. + 4. Adjust the horizontal cursors to measure the period (place cursor + T2 on the positive-going zero crossing point and T1 on the adjacent + positive-going zero crossing point): + + - **Expected result:** + - The frequency 1/ΔT is around 200Hz. + 5. Adjust the vertical cursors to measure the peak-peak amplitude: + place cursor V1 on the crest and V2 on the bottom of the sine wave: + + - **Expected result:** + - The peak-peak amplitude is around 2V. + 6. In the Cursors Settings menu turn off the Horizontal cursors: + - **Expected result:** + - The horizontal cursors disappear from the plot as well as from the readouts. + 7. In the Cursors Settings menu turn off the Vertical cursors: + - **Expected result:** + - The vertical cursors disappear from the plot as well as from the readouts. + +**Result**: PASS/FAIL + +Test 9 - Trigger Function Check +------------------------------- + +.. _TST.OSC.TRIGGER_FUNCTION_1: + +**UID:** TST.OSC.TRIGGER_FUNCTION_1 + +**Description:** Check the trigger function on the oscilloscope using Channel 1 +with different trigger configurations. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config on CH1: + - Triangle wave, 5Vpp, 200Hz + 2. In the Oscilloscope set the following: + - Time Base to 1ms/div, Position to 0ms + - Volts/Div to 1V/div, Position to 0V + 3. Open the Oscilloscope Trigger Settings and set the following configuration: + - Trigger mode: Auto + - Internal: ON + - Source: channel 1 + - Level: 0, Hysteresis: 50mV + - Condition: Rising Edge + 4. Run both instruments. + 5. Check the Oscilloscope plot: + - **Expected result:** + - The plot time handle is centered at the rising edge of the triangle wave. + - The signal is static (not moving around at each triggered sample). + 6. Change the Trigger Condition to Falling Edge: + - **Expected result:** + - The plot time handle is centered at the falling edge of the triangle wave. + - The signal is static (not moving around at each triggered sample). + 7. 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. + 8. Set the Hysteresis value to 1.25V and Level to -1.2V: + - **Expected result:** + - The signal on the plot is triggered and stable. + - The plot level is in the triggered range of ~1.3V to +2.5V. + 9. Set the Hysteresis value to 2.5V and Level to -2.5V: + - **Expected result:** + - The signal on the plot is not triggered and unstable. + - The plot level is outside the triggered range of 0V to +2.5V. + 10. Set the Hysteresis value to 2.5V and Level to 0.1V: + - **Expected result:** + - The signal on the plot is triggered and stable. + - The plot level is in the triggered range of 0V to +2.5V. + 11. Set the Hysteresis value to 2.5V and Level to 3V: + - **Expected result:** + - The signal on the plot is not triggered and unstable. + - The plot level is outside the triggered range of 0V to +2.5V. + +**Result**: PASS/FAIL + +Test 10 - Math Channel Operations +--------------------------------- + +.. _TST.OSC.MATH_CHANNEL: + +**UID:** TST.OSC.MATH_CHANNEL + +**Description:** Check the math channel operations on the oscilloscope using Channel 1. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 5Vpp, 500Hz + - Channel 2: Square wave, 2Vpp, 500Hz + 2. In the Oscilloscope set the following: + - Time Base to 500us/div, Position to 0ms + - Volts/Div to 1V/div, Position to 0V + - Trigger mode: Auto + 3. Run both instrument. + 4. Add a Math Channel (using the + button beside Channel 2) with the following function: + - *sqrt(t0*t0)* + - **Expected result:** + - The plot contains a new Channel having all the samples from Channel 1. + 5. Add a new Math Channel with the following function: + - *2\*(t1+t1)* + - **Expected result:** + - The plot contains a new Channel having the amplitude of + Channel 2 increased 4 times. + 6. Change the Signal Generator configuration to: + - Channel 1: Square wave, 5Vpp, 200Hz + - Channel 2: Sine wave, 3Vpp, 200Hz + 7. Add a new Math channel with the following function and verify the measurements: + - *t0+t1* + - **Expected result:** + - The plot contains a new Channel having the sum of Channel 1 and Channel 2. + - Math channel measurement: Vpp: 8V, Period: 5ms, Frequency: 200Hz. + +**Result**: PASS/FAIL + +Test 11 - FFT Function +----------------------- + +.. _TST.OSC.FFT_FUNCTION: + +**UID:** TST.OSC.FFT_FUNCTION + +**Description:** Check the FFT function on the oscilloscope. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Square wave, 5Vpp, 1kHz + 2. In the Oscilloscope set the following: + - Channel1 Horizontal: Time Base: 5ms/div, Position: 0ms + - Channel1 Vertical: Volts/Div: 1V/div, Position: 0V + 3. TBD + +**Result**: PASS/FAIL + +Test 12 - XY Function +---------------------- + +.. _TST.OSC.XY_FUNCTION: + +**UID:** TST.OSC.XY_FUNCTION + +**Description:** Check the XY function on the oscilloscope. +The plot displays the current vs voltage characteristics of a PN junction diode. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Resources**: + - link to breadboard connections diagram + - link to plot result screenshot + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Triangle wave, 6Vpp, 100Hz, 0V Offset + 2. In the Oscilloscope set the following: + - General Settings: XY (View): ON + - Channel 1 on the X Axis and Channel 2 on the Y Axis. + 3. Run both instruments. + - **Expected result:** + - The Plot shows a waveform similar to: + - TBD + +**Result**: PASS/FAIL + +Test 13 - Export feature +------------------------ + +.. _TST.OSC.EXPORT_FEATURE: + +**UID:** TST.OSC.EXPORT_FEATURE + +**Description:** Check the data export feature on the oscilloscope. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps**: + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 2Vpp, 200Hz + - Channel 2: Square wave, 5Vpp, 500Hz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 1ms/div, Position: 0ms + - Channel 1 Vertical: Volts/Div: 1V/div, Position: 0V + 3. Run both instruments. + 4. In the Oscilloscope, open the General Settings Menu: + - Turn off "Export All". + - From the dropdown list only choose Channel 1. + 5. Click **Export** and choose a name, the CSV format and location to save the file. + - **Expected result:** + - The file is saved successfully at the specified location. + 6. Open the file and verify the data. + - **Expected result:** + - The first 7 lines of the CSV contain metadata such as: timestamp, + device name, number of samples, sample rate, instrument name. + - The file contains 3 columns: sample number, time, voltage. + - The data matches with that samples displayed on the plot. + 7. In the Export menu, turn on "Export All". + 8. Click **Export** and choose a name, the CSV format and location to save the file. + - **Expected result:** + - The file is saved successfully at the specified location. + 9. Open the file and verify the data. + - **Expected result:** + - The first 7 lines of the CSV contain metadata such as: timestamp, + device name, number of samples, sample rate, instrument name. + - The file contains 4 columns: sample number, time, voltage1, voltage2. + - The data matches with that samples displayed on the plot. + +**Result**: PASS/FAIL + +Test 14 - Software AC coupling +----------------------------------------- + +.. _TST.OSC.SOFTWARE_AC_COUPLING: + +**UID:** TST.OSC.SOFTWARE_AC_COUPLING + +**Description:** Check the software AC coupling feature on the oscilloscope. +The Signal Generator will output a sine wave with a 3V DC offset and +the Oscilloscope should be able to center the trace at 0V. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 2Vpp, 1kHz, 3V Offset + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 200us/div, Position: 0ms + - Channel 1 Vertical: Volts/Div: 1V/div, Position: 0V + 3. Run both instruments. + 4. In the Oscilloscope Channel 1 Settings turn on Software AC Coupling. + - **Expected result:** + - The trace moves towards 0V until it is centered at level 0V. + - The measurement Mean is around 0V. + 5. Turn off Software AC Coupling. + - **Expected result:** + - The trace moves back to the original position. + - The measurement Mean is around 0V. + +**Result**: PASS/FAIL + +Test 15 - Probe Attenuation +--------------------------- + +.. _TST.OSC.PROBE_ATTENUATION: + +**UID:** TST.OSC.PROBE_ATTENUATION + +**Description:** Check the probe attenuation feature on the oscilloscope. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 2Vpp, 1kHz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 200us/div, Position: 0ms + - Channel 1 Vertical: Volts/Div: 1V/div, Position: 0V + 3. Enable the Measurement feature and turn on Display All. + 4. Run both instruments. + 5. In the Channel 1 settings of the Oscilloscope set Probe Attenuation to 0.1. + - **Expected result:** + - The measurement Vpp is 200mV. + - The Volts/Div is 100mV. + 6. Change the Probe Attenuation to 100. + - **Expected result:** + - The measurement Vpp is 200V. + - The Volts/Div is 100V. + 7. Change the Probe Attenuation to 1. + - **Expected result:** + - The measurement Vpp is 2V. + - The Volts/Div is 1V. + +**Result**: PASS/FAIL + +Test 16 - External Trigger +-------------------------- + +.. _TST.OSC.EXTERNAL_TRIGGER: + +**UID:** TST.OSC.EXTERNAL_TRIGGER + +**Description:** Check the external trigger feature on the oscilloscope +using the TI pin and the digital DIO1 pin of the ADALM2000 device. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - Disconnect 1+ and 1- from any loopback cables. + - Connect 2+ to W2 and 2- to GND using loopback cables. + - Connect TI to DIO0 using loopback cables. + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 2: Sine wave, 5Vpp, 5kHz + 2. Open the Pattern Generator and set the following config: + - DIO0: Clock, 5kHz + 3. In the Oscilloscope set the Channel 2 TimeBase to 500us. + 4. In the Oscilloscope Trigger settings set the following: + - Mode: normal + - Internal: OFF + - Digital: ON + - Source: External Trigger In + - Condition: Rising Edge + 5. Run all instruments: + - **Expected result:** + - The 5Vpp sinewave is displayed on Channel 2 of the Osc plot. + 6. Stop the Pattern Generator: + - **Expected result:** + - The plot stops updating and the status displays "Waiting". + 7. Stop the Pattern Generator. + 8. Open the Logic Analyzer and set a Rising Edge trigger on DIO1. + 9. In the Oscilloscope Trigger settings set the following: + - Mode: normal + - Internal: OFF + - Digital: ON + - Source: Logic Analyzer + - **Expected result:** + - The plot is not trigger and the status displays "Waiting". + 10. Open the DigitalIO, detach the instrument and run it. + 11. Manually toggle DIO1 from output to input and viceversa: + - **Expected result:** + - The Osc plot is triggered when toggling the digital pin. + +**Result**: PASS/FAIL + +Test 17 - Autoset +----------------- + +.. _TST.OSC.AUTOSET: + +**UID:** TST.OSC.AUTOSET + +**Description:** Check the Autoset feature on the oscilloscope. +A sinewave is fed by the Signal Generator, captured with the Oscilloscope +using a configuration that displays too many periods on the plot. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 5Vpp, 20kHz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 200us/div, Position: -200us + - Channel 1 Vertical: Volts/Div: 500mV/div, Position: 2.5V + - In the Trigger Settings set the analog level to 5V. + - In the Trigger Settings set the trigger mode to Auto. + 3. Open the Channel 1 settings menu and click Autoset while running both instruments: + - **Expected result:** + - The plot displays less periods of the sinewave. + - The vertical Volts/div are adjusted to 1V. + - The horizontal Time Base is adjusted to 50us/div. + - The horizontal and vertical positions are at 0. + - The trigger level is at 0V. + +**Result**: PASS/FAIL + +Test 18 - Print Plot +--------------------- + +.. _TST.OSC.PRINT_PLOT: + +**UID:** TST.OSC.PRINT_PLOT + +**Description:** Check the Print feature on the oscilloscope. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 5Vpp, 20kHz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 200us/div, Position: 0us + - Channel 1 Vertical: Volts/Div: 500mV/div, Position: 0V + 3. Run both instruments. + 4. Click the Print button and choose a name and location for the PDF file: + - **Expected result:** + - The file is saved successfully at the specified location. + 5. Open the file and verify the data. + - **Expected result:** + - The file contains a screenshot of the instrument with inverted colors. + +**Result**: PASS/FAIL + +Test 19 - Curve style +---------------------- + +.. _TST.OSC.CURVE_STYLE: + +**UID:** TST.OSC.CURVE_STYLE + +**Description:** Check the curve style feature on the oscilloscope +and plot the signal using lines, dots, sticks or steps. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 5Vpp, 5kHz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 10us/div, Position: 0us + - Channel 1 Vertical: Volts/Div: 1V/div, Position: 0V + 3. Run both instruments. + 4. Open the Channel 1 settings menu and set the curve style to Dots: + - **Expected result:** + - The plot is displayed using dots (when zoomed in to samples). + 5. Set the curve style to Sticks: + - **Expected result:** + - The plot is displayed using lines (the sinewave looks "full"). + 6. Set the curve style to Smooth: + - **Expected result:** + - The plot is displayed using a smoother lines. + +**Result**: PASS/FAIL + +Test 20 - Gating +------------------------- + +.. _TST.OSC.GATING: + +**UID:** TST.OSC.GATING + +**Description:** Check the Gating feature on the oscilloscope. +Apply the measurements on a gated portion of the acquired signal. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Sine wave, 5Vpp, 10kHz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 10us/div, Position: 0us + - Channel 1 Vertical: Volts/Div: 1V/div, Position: 0V + 3. Enable Measurements, turon on Display All. + 4. Enable Gating and set the sliders to two consecutive zero-crossing points + of the sine wave: + + - **Expected result:** + - The measurement Vpp is half the set amplitude: 2.5V. + 5. Move the sliders to the left and right ends of the plot: + - **Expected result:** + - The measurement Vpp is the set amplitude: 5V. + +**Result**: PASS/FAIL + +Test 21 - Histogram +-------------------- + +.. _TST.OSC.HISTOGRAM: + +**UID:** TST.OSC.HISTOGRAM + +**Description:** Check the Histogram feature on the oscilloscope. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +**Steps:** + 1. Open the Signal Generator and set the following config: + - Channel 1: Square wave, 5Vpp, 10kHz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 10us/div, Position: 0ms + - Channel 1 Vertical: Volts/Div: 1V/div, Position: 0V + 3. Run both instruments. + 4. In the Oscilloscope General settings menu enable the Histogram: + - **Expected result:** + - A histogram is displayed above the time plot. + 5. Change the Signal Generator to output a Square wave: + - **Expected result:** + - The histogram shows the min and max of the square wave. + +**Result**: PASS/FAIL + +Test 22 - ADC Digital Filters +------------------------------- + +.. _TST.OSC.ADC_DIGITAL_FILTERS: + +**UID:** TST.OSC.ADC_DIGITAL_FILTERS + +**Description:** Check the ADC digital Filter calibration. + +**Preconditions:** + - :ref:`Adalm2000.Osc.CH1:` + - OS: ANY + +****Resources:**** + - `ADC Digital Filters documentation`` + +**Steps:** + 1. Open the Signal Generator and set the following config on CH1: + - Square wave, 2Vpp, 1kHz + 2. In the Oscilloscope set the following: + - Channel 1 Horizontal: Time Base: 200ms/div, Position: 0ms + - Channel 1 Vertical: Volts/Div: 500mV/div, Position: 0V + 3. TBD + +**Result**: PASS/FAIL diff --git a/docs/tests/plugins/m2k/power_supply_tests.rst b/docs/tests/plugins/m2k/power_supply_tests.rst new file mode 100644 index 000000000..539bfe587 --- /dev/null +++ b/docs/tests/plugins/m2k/power_supply_tests.rst @@ -0,0 +1,156 @@ +.. _power_supply_tests: + +Power Supply - Test Suite +========================= + +.. note:: + + User guide :ref:`Power Supply user guide` + +The Power Supply tests are a set of tests that are run to verify the Power Supply +instrument of the ADALM2000 plugin in Scopy. + +The following apply for all the test cases in this suite. +If the test case has special requirements, they will be listed in the test case section. + +Setup environment: +------------------ + +.. _adalm2000_ps_setup: + +**Adalm2000.Device:** + - Open Scopy. + - Connect the ADALM2000 device to the system. + - Connect the ADALM2000 device in Scopy using the USB/network backend. + +Depends on: + - Test TST.EMU.CONNECT + - Test TST.PREFS.RESET + +Prerequisites: + - Scopy v2.0.0 or later with ADALM2000 plugin installed on the system. + - Tests listed as dependencies are successfully completed. + - Reset .ini files to default using the Preferences "Reset" button. + - Connect **V+** to **1+** and **V-** to **2+** on the ADALM2000 device + using loopback cables. + +Test 1 - Check positive voltage output +-------------------------------------- + +.. _TST.PS.POSITIVE: + +**UID:** TST.PS.POSITIVE + +**Description:** This test verifies that the positive voltage output +is working correctly. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Power Supply instrument. + 2. Set Tracking ratio control to Independent Controls. + 3. Set the positive value to 3.3V and click enable. + 4. Monitor the power supply output with voltmeter. + - **Expected Result**: + - The voltmeter reads values between 3.25V and 3.35V. + 5. Change the power supply output value to 1.8V. + - **Expected Result**: + - The voltmeter reads values between 1.75V and 1.85V. + 6. Change the power supply output value to 5V. + - **Expected Result**: + - The voltmeter reads values between 4.95V and 5.05V. + +**Result**: PASS/FAIL + +Test 2 - Check negative voltage output +-------------------------------------- + +.. _TST.PS.NEGATIVE: + +**UID:** TST.PS.NEGATIVE + +**Description:** This test verifies that the negative voltage output +is working correctly. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Power Supply instrument. + 2. Set Tracking ratio control to Independent Controls. + 3. Set the negative value to -3.3V and click enable. + 4. Monitor the power supply output with voltmeter. + - **Expected Result**: + - The voltmeter reads values between -3.25V and -3.35V. + 5. Change the power supply output value to -1.8V. + - **Expected Result**: + - The voltmeter reads values between -1.75V and -1.85V. + 6. Change the power supply output value to -5V. + - **Expected Result**: + - The voltmeter reads values between -4.95V and -5.05V. + +**Result**: PASS/FAIL + +Test 3 - Check fine tuning +--------------------------- + +.. _TST.PS.FINE_TUNING: + +**UID:** TST.PS.FINE_TUNING + +**Description:** This test verifies that the fine tuning of the power supply +is working correctly. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Power Supply instrument. + 2. Set Tracking ratio control to Independent Controls. + 3. Set the knob to ±1V interval. No orange dot on the center. + 4. Set value to 3V. Then use +/- sign to change value with ±1V interval. + - **Expected Result**: + - The value changes accordingly. Set Value ± 1V = the new value. + 5. Set the knob to ±100mV interval. Orange dot seen on the center. + 6. Set value to 300mV. Then use +/- sign to change value with ±100mV interval. + - **Expected Result**: + - The value changes accordingly. Set Value ± 100mV = the new value. + +**Result**: PASS/FAIL + +Test 4 - Check Tracking mode +----------------------------- + +.. _TST.PS.TRACKING: + +**UID:** TST.PS.TRACKING + +**Description:** This test verifies that the Tracking mode of the power supply +is working correctly. + +**Preconditions:** + - :ref:`Adalm2000.Device` + - OS: ANY + +**Steps:** + 1. Open the Power Supply instrument. + 2. Set Tracking ratio control to Tracking. + 3. Set the positive output to 5V. Set tracking ratio to 50%. + - Expected Result: + - The negative output value is automatically set to -2.5V. + 4. Set the tracking ratio to 100%: + - Expected Result: + - The negative output value is automatically set to -5V. + 5. Set the tracking ratio to 0%: + - Expected Result: + - The negative output value is automatically set to 0mV. + 6. Set Tracking ratio control to Independent. + 7. Set the positive output to 5V and verify the negative output: + - Expected Result: + - The negative output value does not change. + +**Result**: PASS/FAIL diff --git a/docs/tests/plugins/swiot1l/swiot1l_tests.rst b/docs/tests/plugins/swiot1l/swiot1l_tests.rst new file mode 100644 index 000000000..c0edeeaa2 --- /dev/null +++ b/docs/tests/plugins/swiot1l/swiot1l_tests.rst @@ -0,0 +1,671 @@ +.. _swiot1l_tests: + +SWIOT Plugin - Test Suite +========================= + +.. note:: + + User guide :ref:`AD-SWIOT1L-SL user guide` + +The SWIOT plugin tests are a set of tests that are used to verify the functionality of the SWIOT plugin. +The tests are designed to be run in a specific order to ensure that the plugin is functioning correctly. +The tests are divided into two main categories: **CONFIG** AND **RUNTIME**. + +The following apply for all the test cases in this suite. +If the test case has special requirements, they will be listed in the test case section. + +Setup environment +------------------ + +.. _swiot1l_emu_config: + +**SWIOT.Emu.Config:** + - Open Scopy. + - Start the IIO-EMU process. + - Connect to the **swiot_config** device. + +Depends on: + - Test TST.EMU.CONNECT + - Test TST.PREFS.RESET + +.. _swiot1l_emu_runtime: + +**SWIOT.Emu.Runtime:** + - Open Scopy. + - Start the IIO-EMU process. + - Connect to the **swiot_runtime** device. + +Depends on: + - Test TST.EMU.CONNECT + - Test TST.PREFS.RESET + +.. _swiot1l_device: + +**SWIOT.Device:** + - Open Scopy. + - Connect to AD-SWIOT1L-SL using the static ip:169.254.97.40 + - Connect **CH_1 GND** to **CH_2 GND** using loopback cables. + - Connect **CH_1** to **CH_2** using loopback cables. + - Connect **CH_3 GND** to **CH_4 GND** using loopback cables. + - Connect **CH_3** to **CH_4** using loopback cables. + +Depends on: + - Test TST.PREFS.RESET + +.. _swiot1l_device_runtime: + +**SWIOT.Device.Runtime:** + - Open Scopy. + - Connect to AD-SWIOT1L-SL using the static ip:169.254.97.40 + - Connect **CH_1 GND** to **CH_2 GND** using loopback cables. + - Connect **CH_1** to **CH_2** using loopback cables. + - Connect **CH_3 GND** to **CH_4 GND** using loopback cables. + - Connect **CH_3** to **CH_4** using loopback cables. + - Configure SWIOT in the following way: + - Channel 1: device **ad74413r** and function **voltage_out** + - Channel 2: device **ad74413r** and function **voltage_in** + - Channel 3: device **max14906** and function **input** + - Channel 4: device **max14906** and function **output** + - Click **Apply** to enter Runtime mode. + +Depends on: + - Test TST.PREFS.RESET + +Prerequisites: + - Scopy v2.0.0 or later with SWIOT plugin installed on the system. + - Tests listed as dependencies are successfully completed. + - Reset .ini files to default using the Preferences "Reset" button. + +Test 1 - SWIOT compatibility +----------------------------- + +.. _TST.SWIOT.COMPAT: + +**UID**: TST.SWIOT.COMPAT + +**Description**: This test verifies that the SWIOT plugin is compatible +with the selected device and that the plugin is able to correctly parse it. + +**Preconditions:** + - :ref:`SWIOT.Emu.Config` + - OS: ANY + +**Steps:** + 1. Open the SWIOT plugin - Config Instrument. + - **Expected Result**: + - The plugin is able to connect to the device. + - The Config instrument shows 4 disabled channels. + +**Result**: PASS/FAIL + + +Test 2 - Mode switching +----------------------------- + +.. _TST.SWIOT.MODES: + +**UID**: TST.SWIOT.MODES + +**Description**: This test verifies that the SWIOT plugin is able +to switch between Config and Runtime modes. + +**Preconditions:** + - :ref:`SWIOT.Device` + - OS: ALL + +**Steps:** + 1. Open the Config instrument. + 2. Click the **Apply** button. + - **Expected Result**: + - The device disconnects for a moment and then reconnects + automatically. + - Upon reconnection, the Config instrument is replaced + by 3 instruments: AD74413R, MAX14906, and Faults. + 3. Open the AD74413R instrument. + 4. Click the **Config** button. + - **Expected Result**: + - The device disconnects for a moment and then reconnects + automatically. + - The AD74413R, MAX14906 and Faults instruments are replaced + by the Config instrument. + 5. Open the Config instrument. + 6. Click the **Apply** button. + - **Expected Result**: + - The device disconnects for a moment and then reconnects + automatically. + - Upon reconnection, the Config instrument is replaced + by 3 instruments: AD74413R, MAX14906, and Faults. + 7. Open the MAX14906 instrument. + 8. Click the **Config** button. + - **Expected Result**: + - The device disconnects for a moment and then reconnects + automatically. + - The AD74413R, MAX14906 and Faults instruments are replaced + by the Config instrument. + 9. Open the Config instrument. + 10. Click the **Apply** button. + - **Expected Result**: + - The device disconnects for a moment and then reconnects + automatically. + - Upon reconnection, the Config instrument is replaced + by 3 instruments: AD74413R, MAX14906, and Faults. + 11. Open the Faults instrument. + 12. Click the **Config** button. + - **Expected Result**: + - The device disconnects for a moment and then reconnects automatically. + - The AD74413R, MAX14906 and Faults instruments are replaced + by the Config instrument. + +**Result**: PASS/FAIL + +Test 3 - SWIOT config mode +-------------------------- + +.. _TST.SWIOT.CONFIG: + +**UID**: TST.SWIOT.CONFIG + +**Description:** This test verifies that the SWIOT plugin +is able to configure the device correctly. + +**Preconditions:** + - :ref:`SWIOT.Device` + - OS: ANY + +**Steps:** + 1. Open the Config instrument. + 2. Enable all 4 channels: + - **Expected Result**: + - Their respective dropdowns for device and function are + accessible and not greyed out anymore. + 3. Configure SWIOT in the following way: + - Channel 1: device **ad74413r** and function **voltage_out** + - Channel 2: device **ad74413r** and function **voltage_in** + - Channel 3: device **max14906** and function **input** + - Channel 4: device **max14906** and function **output** + 4. Click the **Apply** button. + - **Expected Result**: + - The device disconnects for a moment and then reconnects + automatically. + - Upon reconnection, the Config instrument is replaced + by 3 instruments: AD74413R, MAX14906, and Faults. + 5. Open the AD74413R instrument and check the channels configured + as AD74413R channels: + + - **Expected Result**: + - There are 6 channels available in the channel manager: + 4 diagnostic channels, **voltage_out 1** and **voltage_in 2**. + 6. Open the MAX14906 instrument and check the channels configured: + - **Expected result:** There are 2 channels available in the + channel manager **voltage 2** as INPUT and **voltage 3** as + OUTPUT. + +**Result**: PASS/FAIL + +Test 4 - AD74413R plot operations +---------------------------------- + +.. _TST.AD74413R.PLOT: + +**UID**: TST.AD74413R.PLOT + +**Description:** This test verifies that the AD74413R instrument +plot changes such as labels and timestamp are correctly modified. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the AD74413R instrument. + 2. In the General settings menu, enable Plot Labels and + set the Timespan to 4s. + + - **Expected Result**: + - The labels are displayed on the right side of the plot. + - The X axis of the plot shows a 4s timespan, + using the -4 to 0 range. + 3. Enable channel **voltage_out 1** and run a **Single** capture: + - **Expected Result**: + - The voltage_out 1 data is displayed on the plot + from the right to the left side. + 4. Click the **Measure** button to enable measurements: + - **Expected Result**: + - The measurements are displayed above the plot + and the instant value for the first channel is + around 0A. + +**Result**: PASS/FAIL + +Test 5 - AD74413R channel operations +------------------------------------- + +.. _TST.AD74413R.CHANNEL: + +**UID**: TST.AD74413R.CHANNEL + +**Description:** This test verifies that AD74413R +channels can correctly output and acquire accurate data as +displayed on the plot and measured by the instrument. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the AD74413R instrument. + 2. In the General settings menu, enable Plot Labels and + set the Timespan to 2s. + 3. Enable **voltage_out 1 ** and **voltage_in 2** channels. + 4. Open the channel settings menu for the **voltage_out 1** channel + and set the **sampling_frequency** to 1200. + + - **Expected result:** + - A green animation appears while underlining the field value. + - On the top right on the plot the status message + displays: a number of samples at **1.2ksps**. + 5. Set YMin to -1A and YMax to 10A. + - **Expected result:** + - The plot Y axis is scaled between -5A and 5A. + 6. Open the channel settings menu for the **voltage_in 2** channel + and set YMin to 0V and YMax to 20V. + 7. Go back to the first channel menu and set the **RAW** output + value to **8192**: + + - **Expected result:** + - The value is automatically changed to 8191. + - Below the field the value 10.9V is displayed. + 8. Run a Single capture and check the measurements: + - **Expected result:** + - The instant value of **voltage_in 2** shows 10V. + 9. Run a Continuous capture and check the measurements: + - **Expected result:** + - The instant value of **voltage_in 2** shows 10V. + 10. While running change the RAW value to **4096**: + - **Expected result:** + - Below the field the value 5.5V is displayed. + - The signal on the plot for **voltage_in 2** is + dropping from the previous value to 5.5V. + - The same value is displayed in the instant value + measurement. + 11. While running change the RAW value to **-1**: + - **Expected result:** + - The value is automatically set to 0V. + - Below the field the value 0V is displayed. + - The signal on the plot for **voltage_in 2** is + dropping to 0V. + - The same value is displayed in the instant value + measurement. + +**Result**: PASS/FAIL + +Test 6 - AD74413R diagnostic channels +-------------------------------------- + +.. _TST.AD74413R.DIAG: + +**UID**: TST.AD74413R.DIAG + +**Description:** This test verifies that the AD74413R +diagnostic channels can be correctly configured and +displayed on the instrument. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the AD74413R instrument. + 2. In the General settings menu, enable Plot Labels and + set the Timespan to 2s. + 3. Enable **voltage_out 1 **, **voltage_in 2** and + **diagnostic 5** channels. + 4. Open the channel settings for **diagnostic 5** and set + the **diag_function** to **sensel_b**. + 5. Open the channel settings for **voltage_out 1** + and set the **RAW** output value to **8192**. + 6. Run a Continuous capture and check the measurements. + - **Expected result:** + - The instant value of **diagnostic 5** shows around 10V, + the same as **voltage_in 2**. + 7. While running change the RAW value to **4096**: + - **Expected result:** + - Both the **diagnostic 5** and **voltage_in 2** signals + are dropping from the previous value to 5.5V. + 8. While running change the RAW value to **2000**: + - **Expected result:** + - Both the **diagnostic 5** and **voltage_in 2** signals + are dropping from the previous value to around 2.7V. + +**Result:** PASS/FAIL + +Test 7 - AD74413R sampling frequency +------------------------------------- + +.. _TST.AD74413R.SAMPLING: + +**UID**: TST.AD74413R.SAMPLING + +**Description:** This test verifies that the AD74413R +instrument can correctly compute the acquisition rate based on +the number of enabled channels. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the AD74413R instrument. + 2. Enable all the channels. Set the sampling frequency + for each channel to 4800. + + - **Expected result:** + - The status message on the top right of the plot + displays a number of samples at **800 sps**. + 3. Disable the last two diagnostic channels: + - **Expected result:** + - The status message on the top right of the plot + displays a number of samples at **1.2 ksps**. + +**Result:** PASS/FAIL + +Test 8 - AD74413R tutorial & docs +---------------------------------- + +.. _TST.AD74413R.TUTORIAL: + +**UID**: TST.AD74413R.TUTORIAL + +**Description:** This test verifies that the AD74413R +instrument tutorial can be correctly started, followed +and the documentation is accessible. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the AD74413R instrument. + 2. Click the top left info button. + - **Expected result:** + - A pop up with 2 options (Tutorial and Documentation) + is displayed. + 3. Click the **Documentation** button. + - **Expected result:** + - The AD74413R documentation is opened in a browser. + 4. Click the info button. + 5. Click the **Tutorial** button. + - **Expected result:** + - The AD74413R tutorial starts, guiding the user + through the instrument's features and providing + a button to Exit the tutorial. + 6. Click the **Continue** button. + - **Expected result:** + - The tutorial continues with the next step, always + greying out the background and highlighting only + the explained item. + 7. Click the **Exit** button. + - **Expected result:** + - The tutorial is closed and the user is returned + to the instrument. + +**Result:** PASS/FAIL + +Test 9 - MAX14906 plot operations +---------------------------------- + +.. _TST.MAX14906.PLOT: + +**UID**: TST.MAX14906.PLOT + +**Description:** This test verifies that the MAX14906 instrument +time span can be correctly modified. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the MAX14906 instrument. + 2. In the General settings menu, set the Timespan to 10s. + - **Expected result:** + - The X axis of the plots shows a 10s timespan, + using the 0 to 10 range. + 3. Set the Timespan to 1s. + - **Expected result:** + - The X axis of the plots shows a 1s timespan, + using the 0 to 1 range. + +**Result:** PASS/FAIL + +Test 10 - MAX14906 channel operations +------------------------------------- + +.. _TST.MAX14906.CHANNEL: + +**UID**: TST.MAX14906.CHANNEL + +**Description:** This test verifies that MAX14906 +channels can correctly output and acquire accurate data as +displayed on the plot and measured by the instrument. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the MAX14906 instrument. + 2. In the General settings menu, set the Timespan to 1s. + 3. Run a continuous capture. + 4. Set the **Output** for **voltage3** to ON. + - **Expected result:** + - The plot trace rises from 0 to 1 for + both channels. + 5. Set the **Output** for **voltage3** to OFF. + - **Expected result:** + - The plot trace drops from 1 to 0 for + both channels. + +**Result:** PASS/FAIL + +Test 11 - MAX14906 tutorial & docs +---------------------------------- + +.. _TST.MAX14906.TUTORIAL: + +**UID**: TST.MAX14906.TUTORIAL + +**Description:** This test verifies that the MAX14906 +instrument tutorial can be correctly started, followed +and the documentation is accessible. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the MAX14906 instrument. + 2. Click the top left info button. + - **Expected result:** + - A pop up with 2 options (Tutorial and Documentation) + is displayed. + 3. Click the **Documentation** button. + - **Expected result:** + - The MAX14906 documentation is opened in a browser. + 4. Click the info button. + 5. Click the **Tutorial** button. + - **Expected result:** + - The MAX14906 tutorial starts, guiding the user + through the instrument's features and providing + a button to Exit the tutorial. + 6. Click the **Continue** button. + - **Expected result:** + - The tutorial continues with the next step, always + greying out the background and highlighting only + the explained item. + 7. Click the **Exit** button. + - **Expected result:** + - The tutorial is closed and the user is returned + to the instrument. + +**Result:** PASS/FAIL + + +Test 12 - Faults Run Single +--------------------------- + +.. _TST.FAULTS.RUN_SINGLE: + +**UID**: TST.FAULTS.RUN_SINGLE + +**Description:** This test verifies that the Faults instrument +can poll faults values for both devices. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Run a continuous capture with all channels enabled + on the AD74413R instrument. + 2. Open the Faults instrument and run a **Single** capture. + - **Expected result:** + - Bit 10 is enabled on the AD74413R device. + 3. Click on Bit 10: + - **Expected result:** + - The section below the leds only displays the + fault explanation for the selected bit. + 4. Turn **Faults explanation** off: + - **Expected result:** + - The section below the leds is hidden. + +**Result:** PASS/FAIL + +Test 13 - Faults clear and reset +-------------------------------- + +.. _TST.FAULTS.CLEAR_RESET: + +**UID**: TST.FAULTS.CLEAR_RESET + +**Description:** This test verifies that the Faults instrument +can reset the polled values after a capture. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Run a continuous capture with all channels enabled + on the AD74413R instrument. + 2. Open the Faults instrument and run a **Single** + capture. + 3. Select Bit 10. + 4. Click the **Clear selection** button. + - **Expected result:** + - Bit 10 is not selected and the Faults explanation + display all the text greyed out. + 5. Run a **Reset stored** capture. + - **Expected result:** + - Both the leds for Bit 10 are turned off. + +**Result:** PASS/FAIL + +Test 14 - Faults Run continuous +-------------------------------- + +.. _TST.FAULTS.RUN_CONTINUOUS: + +**UID**: TST.FAULTS.RUN_CONTINUOUS + +**Description:** This test verifies that the Faults instrument +can poll faults values for both devices in continuous mode. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Run a continuous capture with all channels enabled + on the AD74413R instrument. + 2. Open the Faults instrument and run a **Continuous** capture. + - **Expected result:** + - Bit 10 is enabled on the AD74413R device. + 3. While running click the **Reset stored** button: + - **Expected result:** + - The **STORED** LED is turned off until the next + polled value turns it on again. + 4. Stop the Faults instrument. + +**Result:** PASS/FAIL + +Test 15 - Faults tutorial & docs +-------------------------------- + +.. _TST.FAULTS.TUTORIAL: + +**UID**: TST.FAULTS.TUTORIAL + +**Description:** This test verifies that the Faults +instrument tutorial can be correctly started, followed +and the documentation is accessible. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open the Faults instrument. + 2. Click the top left info button. + - **Expected result:** + - A pop up with 2 options (Tutorial and Documentation) + is displayed. + 3. Click the **Documentation** button. + - **Expected result:** + - The Faults documentation is opened in a browser. + 4. Click the info button. + 5. Click the **Tutorial** button. + - **Expected result:** + - The Faults tutorial starts, guiding the user + through the instrument's features and providing + a button to Exit the tutorial. + 6. Click the **Continue** button. + - **Expected result:** + - The tutorial continues with the next step, always + greying out the background and highlighting only + the explained item. + 7. Click the **Exit** button. + - **Expected result:** + - The tutorial is closed and the user is returned + to the instrument. + +**Result:** PASS/FAIL + + +Test 16 - SWIOT external supply +------------------------------- + +.. _TST.SWIOT.EXTERNAL_SUPPLY: + +**UID**: TST.SWIOT.EXTERNAL_SUPPLY + +**Description:** This test verifies that the SWIOT plugin +can correctly detect and notify the user that the external +power supply switch is turned off. + +**Preconditions:** + - :ref:`SWIOT.Device.Runtime` + - OS: ANY + +**Steps:** + 1. Open any instrument from the SWIOT plugin. + 2. Turn off the external power supply switch on the SWIOT device. + - **Expected result:** + - A status bar is displayed at the bottom of the instrument + with a warning message that the system is not running at + full capacity due to not being powered by the external supply. + 3. Turn on the external power supply switch on the SWIOT device. + - **Expected result:** + - The status bar is not displayed. + +**Result:** PASS/FAIL