Test and Measurement Forum

Save average amplitude at each frequency

Forum for discussing PicoScope version 6 (non-automotive version)

Save average amplitude at each frequency

Postby eltitofranki » Tue Feb 17, 2015 11:56 am


I need to measure the oscillation modes of a metallic box. The setup is as follows: A function generator is connected to an amplifier, which is connected to a piezoelectric that acts as a sound emmiter. Another piezo is connected as a sound receiver, and this is connected to PicoScope 4227. The signal is displayed correctly in PicoScope 6 in Windows. However, I need to make a frequency sweep and, for each value of the frequency (which I change manually from the function generator), save the average amplitude. Hence, I need a text file with one column as the frequency and another column as the amplitude, I do not need to save the whole waveform.
How can I do it?
Any help would be appreciated.
Posts: 0
Joined: Tue Feb 17, 2015 11:43 am

Re: Save average amplitude at each frequency

Postby Hitesh » Thu Feb 26, 2015 11:45 am

Hi eltitofranki,

There are two ways of capturing information but unfortunately they will not generate a single file with the values so you will need to manually create this:

1. Use Maths Channels

You can the Math Channels feature in PicoScope 6 to create maths channels for frequency and average amplitude. You can then save this to a csv or text file for each buffer but it will have a value for each sample in the waveform, so you will have to extract data out.

2. Use Measurements

The Measurements feature can be used to add measurements such as Frequency and AC RMS (or DC average) for each waveform in the buffer.

You would then manually enter the values into a file or if you use the PicoScope Automation command via a Windows command line interface, you can write the values shown in the measurement table to a text or csv file. Unfortunately, you would have to do this for each waveform in the buffer, then extract out the required values.

Below are example commands for text and csv file output:

Code: Select all
picoscope.com /a Measurements.CSV? >> test.txt

picoscope.com /a Measurements.CSV? >> test.csv

I hope this helps.

Technical Specialist
Pico Technology
Site Admin
Site Admin
Posts: 2196
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Save average amplitude at each frequency

Postby AndrewA » Mon May 18, 2015 2:06 pm

I created a batch file which uses a pico macro to save every measurement from each buffer in a psdata file.
But you have tell the batch file how many buffers there are in the psdata file.

To use-
1. Open the your saved psdata file, note the number of buffer waveforms. And set up the measurements you need.
2. Open a cmd box where the batch and macro files are.
3. Type 'measure.bat 32' (for 32 buffer waveforms)

The macro writes 3 lines for each buffer measurement- (And starts at buffer 32)
Code: Select all
0ms: Measurements.CSV?
A,AC RMS,999.5 mV,999.5 mV,999.5 mV,999.5 mV,0 V,1,WholeTrace,

The batch and marco files are attached.
batch and marco files
(558 Bytes) Downloaded 248 times
Regards Andrew
Technical Specialist
Zen Master
Zen Master
Posts: 178
Joined: Tue Oct 21, 2014 3:07 pm

Return to PicoScope 6 for Windows

Who is online

Users browsing this forum: No registered users and 0 guests