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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
university:tools:m2k:scopy:siggen [11 Aug 2017 15:46]
amiclaus add scopy main page link
university:tools:m2k:scopy:siggen [16 May 2018 16:39]
ASuciu [Generate waveform from math function]
Line 1: Line 1:
 ====== Scopy Signal Generator ====== ====== Scopy Signal Generator ======
-===== Introduction ​=====+===== General Description ​=====
-The signal generator is the fifth item from the top in the Scopy instrument menu list, displayed to the far left of the Scopy window, as illustrated below.{{ university:​tools:​m2k:​scopy:​siggen_1.png?400 }}+{{:university:​tools:​m2k:​scopy:​scopy_2018-05-16_14-57-31.png?600|}}
-The small white squares ​to the right of the instrument names control ​the run/stop functions of the instruments,​ allowing the user to run and stop an instrument without having to have that instrument in the current display.  ​Clicking on the Signal ​Generator name invokes the top level of the Scopy dual Signal Generator, which appears as in the following illustration.{{ university:​tools:​m2k:​scopy:​siggen_2.png?​1000 }}+The signal generator instrument can be used to generate analog output from the M2K with user configurable parameters. ​ It consists ​of 3 parts: 
 +  *Channel selector - enable/​disable channels as well as each channel'​s ​control ​panel. 
 +  *Signal ​Plot - visual representation ​of the signals 
 +  *Control Panel - change signal paramteres
-===== Controlling DC Output and AC Waveforms =====+{{:​university:​tools:​m2k:​scopy:​scopy_2018-05-16_15-25-53.png|}}
-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 channel that is off is indicated by an empty circle. ​ Scope signal ​generator waveform colors correspond to the circle colors.+Four types of signals can be generated. 
 +  * Constant ​DC signal at user selectable amplitude 
 +  * Waveform - AC signal with various customizable parameters 
 +  * Buffer - signal ​is imported from a file 
 +  * Math - signal ​is defined by a mathematical equation
-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 }}+Constant ​signal ​only has one parameter which inputs ​the amplitude of the signal 
 +Waveform ​signal ​type can be one of the following 
 +  * Sine 
 +  * Square 
 +  * Triangle 
 +  * Trapezoidal 
 +  * Rising sawtooth 
 +  * Falling sawtooth
-The following illustration shows the list of available waveforms.{{ university:​tools:​m2k:​scopy:​siggen_4.png?​1000 }}+All signals have amplitude, offset, phase and frequency parameters. Selecting Square wave will also unlock ​the duty cycle parameterSelecting trapezoidal waveform will disable the frequency, as this parameter will be computed from the other 4 values in the Timing category (Rise time, High time, Fall time, Low Time)
-===== Monitoring the Signal Generator Output on the Oscilloscope =====+{{:​university:​tools:​m2k:​scopy:​scopy_2018-05-16_15-29-24.png|}}
-The oscilloscope has two balanced inputs and the signal ​generator has two unbalanced outputs, so we can connect the positive sides of the oscilloscope inputs to the signal generator outputs and the negative sides of the oscilloscope inputs to ground.  ​A four-pin single-row header is useful to make these connections,​ and the wire connections are as follows:+Buffer ​signal ​type takes a file as an input. 
 +The supported file types for buffered signals are: 
 +  * .bin 32 bit binary float format 
 +  * .wav Waveform Audio File Format (16 bit integers) 
 +  * .csv - Comma separated values  
 +  * .mat - MATLAB Mat format
-  * Yellow-to-Orange (Signal Generator 1 Output to Oscilloscope 1 Positive Input) +CSV file format supports raw CSVs such as [[​adisuciu/​7aa30bc9e545db23a17e86d23ae4f53c]],​ as well as Scopy formatted CSVs such as [[https://​​adisuciu/​5abffa8233707c7b95585e80fbb1dde9]]. This means it is possible ​to acquire a signal in the oscilloscope and play it back in the signal generator. 
-  * Black (Adjacent to Yellow)-to-Orange/White (Ground to Oscilloscope 1 Negative Input) +MAT file format only supports arrays of type real (no complex waveforms)
-  * Yellow/White-to-Blue (Signal Generator 2 Output to Oscilloscope 2 Positive Input) +
-  * Black (Adjacent to Yellow/​White)-to-Blue/​White (Ground to Oscilloscope 2 Negative Input)+
-The oscilloscope is invoked by clicking on the "​Oscilloscope"​ name in the instrument menu.  The oscilloscope initializes with both channels turned on and neither menu selected. ​ We will be looking at the 1 KHz sine wave with 2 V amplitude from Channel 1 of the signal generator set up in the section above, so Channel 2 of the oscilloscope and signal generator can be turned off.  To monitor the signal generated from Channel 1 of the signal generator, click the "​Run"​ button and set the Time Base to 500 μs/div and the vertical scale to 1 volt/div on the oscilloscope Channel 1 menu.  See the illustration below. 
 +Math signal type allows generation of a signal that is defined as a math equation. .
-It is often a good idea to add a small amount of hysteresis to the trigger This can be done by clicking ​+{{:​university:​tools:​m2k:​scopy:​scopy_2018-05-16_15-25-02.png|}}
-Further details ​of oscilloscope operation are given on the "​Oscilloscope"​ page.+On top of all the signals noise can be addedBy selecting None, no noise is added to the signal. The rest of the noise types are: 
 +  * Uniform 
 +  * Gaussian 
 +  * Laplacian 
 +  * Impulse
-requires the waveform, amplitude, and frequency to be selected. Click on the Channel 1 menu and set the Waveform for "​Sine,"​ Amplitude for 2 Volts, and Frequency for 1 kHz, then press "​Run"​ as shown in the following illustration. ​ Entries may be made by entering numbers directly and hitting "​Enter"​ or by clicking on the "​+"​ and "​-"​ controls, and the units can be directly selected under the numbers.{{ university:​tools:​m2k:​scopy:​scope_3.png?​1000 }} 
-Select the menu for Channel 2 and repeat the above procedure. ​ Each channel of the signal generator is now configured to generate a 1 KHz sine wave with amplitude of 2 V, and is connected to the input of a channel of the oscilloscope. 
-===== Setting the Horizontal and Vertical Scales ===== 
-Open the dual channel oscilloscope by clicking on the "​Oscilloscope"​ name in the instrument menu.  The oscilloscope initializes with both channels active so Channel 2 should be turned off in order to view Channel 1 only.  Set the Time Base for 500 μs/Div and the Vertical Scale for 1 V/Div and click "​Run"​ as shown in the following illustration.{{ university:​tools:​m2k:​scopy:​scope_4.png?​1000 }} 
-===== Oscilloscope Triggering ===== 
-Basic oscilloscope trigger settings are made by clicking on the "​Trigger"​ menu, which appears as shown in the illustration below. ​ For this example, we have set the trigger position at t 0 seconds, placing the position at the far left of the timescale; we have configured the oscilloscope to automatically trigger on the rising edge of the Channel 1 input signal at a level of 0 volts.{{ university:​tools:​m2k:​scopy:​scope_5.png?​1000 }}+===== Use cases =====
-Advanced triggering options are available by clicking on "​Advanced"​ in the Trigger menu.  Trigger holdoff san be set between ​0 seconds ​and 1 second, and prevents retriggering during the set interval following a trigger event. ​ Hysteresis is also provided to improve triggering performance on noisy trigger signals. ​ Hysteresis is initially enabled by selecting "​on"​ under the "Noise Reject"​ heading. ​ The hysteresis window size about the trigger level is then set for each channel using the "​HystA"​ and "​HystB"​ controls; HystA sets the window size for Channel 1 and HystB sets the window size for Channel 2.  Trigger holdoff is set to 0 seconds and a hysteresis window size of 50 mV about the trigger level of 0 V is set for Channel 1, and set to 0 V for Channel 2, in the illustration below.{{ university:​tools:​m2k:​scopy:​scope_6.png?​1000 }}+Create loopback ​between ​CH1 and CH2 of the oscilloscope ​and the signal generator
-===== Making Signal Measurements Using Cursors ===== +==== Run a single channel ​==== 
- +<​hidden>​ 
-Measurement cursors are available for the timebase and vertical scale, and are accessed by clicking on the "​Cursors"​ control located in the lower right section of the Scopy display. ​ The cursor menu is accessed by clicking on the menu icon next to the "​Cursors"​ label. ​ The cursor menu appears to the right in the Scopy display, and allows each cursor pair to be individually turned on and off.  The timebase cursors indicate absolute time relative to the horizontal position control as well as Δt and frequency calculated as 1/​Δt. ​ The vertical scale cursors indicate absolute voltage as well as ΔV.  Cursors are moved by dragging the up/down arrow controls located at the cursor ends.  The following illustration shows the 2 V 1 KHz signal with the vertical and horizontal cursors on.{{ university:​tools:​m2k:​scopy:​scope_7.png?1000 }} +{{ :university:​tools:​m2k:​scopy:​scopy_2018-05-16_17-25-33.png?600 |}} 
- +  - Disable channel 2 
-===== Using Built-In Signal Measurement Features ​===== +  - Select sine wave with 5V amplitude and 10kHz 
- +  - Run the signal generator 
-Mathematical calculations can be made by Scopy directly on the sampled data, and are accessed by clicking on the "​Measure"​ control located in the lower right section of the Scopy display. ​ The measurement menu is accessed by clicking on the menu icon next to the "​Measure"​ label. ​ The measurement menu appears to the right in the Scopy display, and makes many signal measurements available to the user.  The following illustration shows all available signal measurements that can be accessed by switching the "​Display All" feature to "​on."​{{ university:​tools:​m2k:​scopy:​scope_8.png?​1000 }}+  - Monitor oscilloscope 
 +==== Run both channels ​====
 +{{ :​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 ====
 +{{ :​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
 +==== Generate trapezoidal waveform ====
 +{{ :​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
 +==== Generate waveform from wav file ====
 +{{ :​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)
 +==== Generate stairstep waveform ====
 +{{ :​university:​tools:​m2k:​scopy:​scopy_2018-05-16_17-38-32.png?​600 |}}
 +  - Select the stairstep csv file provided above [[https://​​adisuciu/​7aa30bc9e545db23a17e86d23ae4f53c]]
 +  - Remove noise, disable CH1 and increase amplitude to 5V
 +  - Monitor oscilloscope
 +==== Generate waveform from math function ====
 +{{ :​university:​tools:​m2k:​scopy:​scopy_2018-05-16_17-39-23.png?​600 |}}
 +  - Select Math mode and input a function sucha s 2*(cos(6*t)*sin(2*t))
 +  - Monitor oscilloscope
 **Return to [[university:​tools:​m2k:​scopy|Scopy Main Page]]** **Return to [[university:​tools:​m2k:​scopy|Scopy Main Page]]**
university/tools/m2k/scopy/siggen.txt · Last modified: 16 May 2018 16:39 by ASuciu