Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
university:tools:m2k:scopy:siggen [16 May 2018 15:12] – Updated general description Adrian Suciuuniversity:tools:m2k:scopy:siggen [02 Jul 2021 10:52] (current) – Added noise description Adrian Suciu
Line 1: Line 1:
 ====== Scopy Signal Generator ====== ====== Scopy Signal Generator ======
 +===== Video =====
 +{{youtube>zWX7VnKDYq4}}
  
 ===== General Description ===== ===== General Description =====
Line 39: Line 41:
  
 CSV file format supports raw CSVs such as [[https://gist.github.com/adisuciu/7aa30bc9e545db23a17e86d23ae4f53c]], as well as Scopy formatted CSVs such as [[https://gist.github.com/adisuciu/5abffa8233707c7b95585e80fbb1dde9]]. This means it is possible to acquire a signal in the oscilloscope and play it back in the signal generator. CSV file format supports raw CSVs such as [[https://gist.github.com/adisuciu/7aa30bc9e545db23a17e86d23ae4f53c]], as well as Scopy formatted CSVs such as [[https://gist.github.com/adisuciu/5abffa8233707c7b95585e80fbb1dde9]]. This means it is possible to acquire a signal in the oscilloscope and play it back in the signal generator.
 +
 +<hidden> This in not entirely true. The scope sample rate is 100 MSPS (or factors of ten less) and the signal generator sample rate is 75MSPS (or factors of 10 less) so scope samples do not inherently match up with generator samples. Scope samples would need to be re-sampled by a factor of 3 to 4 to have the signal frequency played back properly. </hidden>
 +
 MAT file format only supports arrays of type real (no complex waveforms) MAT file format only supports arrays of type real (no complex waveforms)
  
Line 54: Line 59:
   * Impulse   * Impulse
  
- +The noise is only calculated once on the host, and simply added to the waveform buffer. This means that for cyclic waveforms the noise will be the same on each period.
- +
- +
  
 ===== Use cases ===== ===== Use cases =====
  
-==== Controlling DC Output and AC Waveforms ==== +Create loopback between CH1 and CH2 of the oscilloscope and the signal generator
-<hidden> +
-{{ university:tools:m2k:scopy:scopy_2018-05-15_17-51-45.png?1000 }} +
- +
-Signal Generator 1 is turned on and off by clicking on the orange circle and Signal Generator 2 is turned on and off by clicking on the purple circle.  A channel that is on is indicated by a filled-in circle and a channel that is off is indicated by an empty circle.  Scope signal generator waveform colors correspond to the circle colors. +
- +
-The signal generator initializes with both function generators on with the menu for Channel 1 displayed to the right, set up to output a DC level, as shown above.  The DC output level is set by using the "+" and "-" controls or by direct numerical entry.  AC waveforms are selected by clicking on the "Waveform" label, then clicking on "Sine" under the "Waveform type" label, which produces a list of available waveforms.  The waveform initializes as a sine wave; note that the output voltage is displayed for all waveforms.  See the illustration below, which shows the signal generator configured to output a 1 KHz sine wave with an amplitude of 2 V.  Note that the menu for Channel 1 is displayed to the right and contains controls to set the waveform amplitude, frequency, DC offset, and phase.  The phase control is useful to set up a fixed phase difference between the two outputs.{{ university:tools:m2k:scopy:siggen_3.png?1000 }} +
- +
-The following illustration shows the list of available waveforms.{{ university:tools:m2k:scopy:siggen_4.png?1000 }}+
  
 +==== Run a single channel ====
 +<hidden>
 +{{ :university:tools:m2k:scopy:scopy_2018-05-16_17-25-33.png?600 |}}
 +  - Disable channel 2
 +  - Select sine wave with 5V amplitude and 10kHz
 +  - Run the signal generator
 +  - Monitor oscilloscope
 +</hidden>
 +==== Run both channels ====
  
 +<hidden>
 +{{ :university:tools:m2k:scopy:scopy_2018-05-16_17-30-13.png?600 |}}
 +  - Continue from previous testcase 
 +  - Enable channel 2 and select triangle wave with 5V amplitude and 20kHz
 +  - Add gaussian noise with 1V amplitude
 +  - Monitor oscilloscope
 +</hidden> 
 +==== Generate square waveform ====
 +<hidden>
 +{{ :university:tools:m2k:scopy:scopy_2018-05-16_17-33-14.png?600 |}}
 +  - Select square wave with 25% dutycycle
 +  - Decrease noise amplitude to 200mV
 +  - Monitor oscilloscope
 +</hidden>
 +==== Generate trapezoidal waveform ====
 +<hidden>
 +{{ :university:tools:m2k:scopy:scopy_2018-05-16_17-34-52.png?600 |}}
 +  - Select trapezoidal waveform with 1ms rise/up/fall/low times
 +  - Monitor oscilloscope
 +</hidden>
 +==== Generate waveform from wav file ====
 +<hidden>
 +{{ :university:tools:m2k:scopy:scopy_2018-05-16_17-36-05.png?600 |}}
 +  - Select buffer mode and select a wavefile. One can usually find a suitable wavefile in C:\Windows\Media
 +  - Signal generator automatically selects appropriate sample rate
 +  - Monitor oscilloscope (if possible connect a speaker to the channel that is outputted)
 +</hidden>
 +==== Generate stairstep waveform ====
 +<hidden>
 +{{ :university:tools:m2k:scopy:scopy_2018-05-16_17-38-32.png?600 |}}
 +  - Select the stairstep csv file provided above [[https://gist.github.com/adisuciu/7aa30bc9e545db23a17e86d23ae4f53c]]
 +  - Remove noise, disable CH1 and increase amplitude to 5V
 +  - Monitor oscilloscope
 +</hidden>
 +==== Generate waveform from math function ====
 +<hidden>
 +{{ :university:tools:m2k:scopy:mathgenerator.png?600 |}}
 +  - Select Math mode and input a function such as  2*(cos(6000*pi*t)*sin(2000*pi*t))
 +  - Set sample rate to 75MSPS (this is the sample rate of the generated signal)
 +  - Set record run length to 1ms. 
 +  - Run the signal
 +  - Monitor oscilloscope
  
 +<note>Sample rate & record length parameters: Since t goes from 0 to infinity, we need to specify how long will t be generated for the specified function - in this case it will go from 0 to 1ms with 75 MSPS granularity(13.3333 ns). These settings will generate (1 * 10^-3) * (75 * 10 ^9) points = 75000 points. 
 +</note>
 +</hidden>
 **Return to [[university:tools:m2k:scopy|Scopy Main Page]]** **Return to [[university:tools:m2k:scopy|Scopy Main Page]]**
university/tools/m2k/scopy/siggen.1526476327.txt.gz · Last modified: 16 May 2018 15:12 by Adrian Suciu