Jump to content
  • 0

how to record the frequency variations for 1 minute time-period at a 500Hz sampling?


EngineerAmjad

Question

Hello

I am using the Analog Discovery 2. I need to do a measurement and record the frequency variation for a 1-minute period, sampling at 500 Hz using channel one.

I can see the frequency variations in runtime scope. However, when I try to record the frequency variations, it records voltage variation instead of frequency. I tried two methods, but in both method the scope record voltage with time. The photos are attached below.

 

Could someone please guide me how to record the frequency variations for 1 minute time-period at a 500Hz sampling?

Thanks a lot!!

 

 

Method 1

 

Output

 

Method 2

scope.tif

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hello @attila @Fausto

I tried to make a similar setup as you suggested.

Initially I tried to make an auto setup which give me a triangle signal and having the frequency variation as can be seen in the picture (can be seen in figure 1).

 

 But when I change the setup as your suggested one (can be seen in the figure 2 and 3), then the signal is disappeared, while the frequency is decreased  can be observed in the measurement window. Also as If I change the time the other two (sample and rate automatically changed) and vice versa. Also If I try to export the data, it is still consist of time and voltage (can be seen in Fig4).

 

 I am trying to record the frequency variations (as underlined in figure 1) for 1 minute time-period at a 500Hz sampling?

 

 I am using the Analog discovery 2 for the first time so do not have enough experience. I am reading different blog and tutorial but could not figure it out.

 

I will be very thankful for any suggestion or guideline.

 

Thank you.

 

 

 

 

Figure_1.PNG

Figure_2.PNG

Figure_3.PNG

Figure_4.PNG

Edited by EngineerAmjad
Link to comment
Share on other sites

  • 0

Hi @EngineerAmjad

I initially understood you want 500Hz sample rate.

You can create with Wavegen (or Pattern) a 500Hz trigger signal. Here I generated a signal to have some input but you can also use DC...

image.png

 

In Scope set the trigger Source to "Wavegen C1"
In the Measurements select "Multiple captures" if you want averaging/stats for multiple captures.
Reduce the number of samples (from the default 16Ki) if the following Script takes more than 1sec (500x2ms). The processing time depends on opened views, measurements, logging, graphics if the Scope is visible...

image.png

 

You can use the following Script to perform 500 captures and display the time it took.

image.png

Wavegen.run()
Scope.Measurements.clear()
Scope.run()
var t0 = 0
for(var i = 0; i < 500; i++) {
    Scope.wait()
    if(i==0) t0 = Scope.Time.taken
}
Scope.stop()

print(Scope.Time.taken-t0, "ms")

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...