Jump to content
  • 0

Waveforms: Exporting Awg Input Versus Channel 1 Output


mfisher13

Question

Just began learning Analog Discovery, using it in the class room at some point in the future.  Very simple activity I am trying to do, I am just have wave form generator connected to channel 1 (chanell 1 neg connected to ground).  So I am watching when I generate a signal of certain frequency what am I getting on the scope.  All is working just fine with that.

 

Now I want to sweep a frequency range so I want to "log" the input frequency (from AWG) versus the output frequency (channel 1 scope).  I basically want to export the results of this activity, but I cannot figure out how to reference the AWG1 signal from the oscilloscope main window.

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

I don't exactly understand what you are trying to accomplish.

 

The AWG/Wavegen is in output and Scope is an input instrument. These can be controlled in different windows of WaveForms.

 

Under More instruments you can find the Network Analyzer. 

This controls the AWG channel 1 to sweep the desired frequency step by step. On each step acquisition is taken with the Scope channels and this data is transformed to frequency domain. 

The Analyzer's main Bode plot shows: Scope channel 1 magnitude relative to the configured AWG amplitude; channel 2 magnitude and phase relative to channel 1.

Link to comment
Share on other sites

my apologies for not explaining better ... the project I wanting to teach has a microcontroller in the loop, the uC takes an input frequency and acts on it and outputs a frequency as well.

 

So I wanted to connect W1 to input and generate a sweep of frequencies.  I wanted to connect scope channel 1 on the output of the uC to test what the output frequency was.  There is an algorithm on the uC that is supposed to change the output frequency based on the input frequency, so as practice we are testing how well the algorithm performs.

 

I wanted to be able to capture an output like:

input freq (W1)     |     output freq (scope chan 1)

1 Hz                                5 hz

2 hz                                10 hz

...                                       ....

 

I have been following the tutorials where in the scope window I can measure certain values, create plotes, and export data to a file.  But I can't figure out when doing that how to reference the input frequency from W1 so that it can be part of the data set.

 

I have not got to the tutorials using the network analyzer so maybe that is where it should be done or in the spectrum analyzer.  I just thought I was missing something in the early tutorials I was following when I was trying to also capture the input frequency from W1

Link to comment
Share on other sites

This seems to be an uncommon usage.

To automatically save such data you have to create a custom application or script using the WaveForms SDK functions to control the AWG and acquire data.

 

You could also use the hidden batch/script feature of WF application.

Download and double-click to open this file with WF. 

This script adjusts the AWG frequency, performs acquisition and prints the measured average frequencies of Scope channel 1 and 2.

 
Scope1-Input(Hz) (V) Scope2-Output(Hz) (V)
0.99997     1.3724    0.999996     1.3752
2.0002       1.3724    2.000005     1.378
3.999905  1.3724    3.999965     1.3752
...
Link to comment
Share on other sites

Thank you!  

 

As a newb I wouldn't have thought that this was uncommon :-) wanting to know what the input frequency was when evaluating a circuit.  I do appreciate the answer, I modified the script to instead of printing the frequency of scope 2, I print "WaveGen.1.Basic.Frequency", which is essential printing the value of the variable "hz" but at least i can now access the input frequency of the wave generator :-) and log all this data to a file

 

The hidden batch/script functionality is quite awesome by the way so another thank you for opening up my eyes to that, kudos and thanks again

Link to comment
Share on other sites

Good to know that your question is solved.

 

By uncommon I wanted to say that such logging is not a basic instrumentation feature :)

 

In WaveForms-3 the batch feature is better. The language is common JavaScript and you can interact with the opened instrument windows. But the frequency measurement is not yet implemented.

Link to comment
Share on other sites

Is there a link to the documentation for writing this kind of scripts?

 

thanks

hugo

 

This seems to be an uncommon usage.

To automatically save such data you have to create a custom application or script using the WaveForms SDK functions to control the AWG and acquire data.

 

You could also use the hidden batch/script feature of WF application.

Download and double-click to open this file with WF. 

This script adjusts the AWG frequency, performs acquisition and prints the measured average frequencies of Scope channel 1 and 2.

 
Scope1-Input(Hz) (V) Scope2-Output(Hz) (V)
0.99997     1.3724    0.999996     1.3752
2.0002       1.3724    2.000005     1.378
3.999905  1.3724    3.999965     1.3752
...

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...