analogdevicesinc / scopy

A software oscilloscope and signal analysis toolset
http://wiki.analog.com/scopy
GNU General Public License v3.0
396 stars 164 forks source link

Oscilloscope: Shifting the phase on Signal Generator does not implement on the Oscilloscope real-time #934

Closed HRosete closed 4 years ago

HRosete commented 4 years ago

Environment:

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Attach M2K to your laptop using a micro-USB to USB cable.
  2. Open Scopy. Make sure to disconnect all connections on M2K.
  3. Unzip Book1-csv.zip (see below) and save the Book1 CSV file.
  4. Go to Signal Generator. Set these settings to Channel 1: Triangle waveform, 4Vpp amplitude, 1MHz frequency, 2V offset, 180 degrees phase.
  5. Select Channel 2 and got to Buffer.
  6. Click 'Load File' and navigate to Book1.csv. Click 'Enter.'
  7. In Channel 2 still, set these settings to Scaling (below 'Load File'): Amplitude = 5V, SampleRate = = 2.027 Msps, Offset = 0V, Phase = 0 samples.
  8. Go to the Oscilloscope.
  9. Set time base (Horizontal) to 1us, position to 0s, volts/div to 1V/div, and position to 0V.
  10. Run Signal Generator and Oscilloscope.
  11. Detach the Signal Generator by dragging the instrument away from the pane.
  12. Change Channel 1's phase by clicking "+" and "-" and observe the waveforms on the Oscilloscope.
  13. Do the same thing to Channel 2, change the phase. Observe.

Expected behavior The waveform seen on the oscilloscope must reflect the changes applied in real-time from a running signal generator.

Screenshots at Phase shift: 90 degrees; Waveform on Oscilloscope corresponds to the Signal Generator's image

at Phase shift: 180 degrees; Waveforms on Oscilloscope and Signal Generators do not match with regards to Phase image

at Phase shift: 225 degrees; Waveforms on Oscilloscope and Signal Generators do not match with regards to Phase image

Additional context scopy_osc.zip Book1-csv.zip

adisuciu commented 4 years ago

Well you are setting 1M frequency for the triangle and 2.027 for the second. So the signals will never be in phase because their frequencies are not multiples of one another - they are sliding one on top of the other. If you chose 1M frequency for triangle and same frequency for the stairstep, their phase would match the settings.

-Adrian

HRosete commented 4 years ago

Thank you for the clarification, Adrian.

HRosete commented 4 years ago

Closing this issue.