Posted Mon, 05 Dec 2022 02:10:52 GMT by Li, Jeremy

Dear all,
1. Is it possible to transfer both analog waveform data and spectrum view data in one trigger event?(MSO 4 Series)  if yes, how should I do, how to input the string after DATa:SOUrce<?>

I tried to fetch(CH1,CH2) and then fetch SV (CH1_SV_NORMal, CH2_SV_NORMal data), but it seems only able to fetch one sv data, and I still not sure if the SV data corresponding to the channel and current analog data.  

 2. How can I know how many data points(DATa:STOP)  should I set for the curve? command to fetch SV data.  the MDO 3 series is a fixed 750 data points in the mannual.

3.  Should I use 10*log(1000 * x)  to calculate the SV (CH1_SV_NORMal) DATA? the output seems didn't match what I have saw on the scope screen.

Posted Tue, 06 Dec 2022 01:00:28 GMT by Teles, Afonso
1. Yes, it is possible to transfer both the time domain waveform and the spectrum view data in one trigger event. This might require stopping acquisition to allow time to transfer both waveforms.
The argument for DATA:SOURce should be "CHX_SV_NORMAL", as specified on page 2-439 of the programmer's manual for the MSO4.

How are you processing the data? It should be floating point data (as mentioned on page 2-429), so they take a bit more work to read than time domain waveform data.

2. That is up to how many points you wish to read. If you wish to read all the points then you can send "DATA INIT" to set it to the default settings.

3. I believe this issue goes back to I discussed in 1., that the data is floating point and so needs to be read differently from time domain waveform data.
Posted Tue, 06 Dec 2022 08:06:26 GMT by Li, Jeremy
Hi Teles,
Thanks for the instruction.
1.  I have updated the timeout setting and it seems ok now. I am not able to try it on MSO 4 series currently. I try the Math function on MSO2 instead.
2.  I was thinking if the data points is fixed if I want to read all the points. such as MDO 3 Series. it seems the data points will be different with different data length on MSO4, am I correct?
3. I will try it later when I have the chance to get close to the instrument, thank you so much for the help.
Posted Wed, 07 Dec 2022 00:32:02 GMT by Teles, Afonso

2. That is correct, the number of data points available is equals to the record length that the instrument is configured to.

3. I have attached a Python script I wrote that exemplifies how to read the spectrum waveform data from the scope. This can be a bit tricky as it is a double float and needs to be converted into a usable format from its packed binary representation.
To your initial question, no you should not apply a log function to this data as it is already in log form. From page 2-429 of the manual:

> CHx_SV_NORMal, CHx_SV_AVErage, CHx_SV_MAXHold, CHx_SVMINHold: When DATa:SOUrce is set to one of these traces, the data points represent the amplitude of the Spectrum View frequency domain traces in the current units, and are floating point values

Posted Wed, 07 Dec 2022 01:26:24 GMT by Li, Jeremy
Hi Teles, 
Thanks, now it is clear for me, I should not apply a log function to this data as it is already in log form.
I'm using LabVIEW for the programming, and I should take care of the data width as in your script scope.write("dat:width 8").
Posted Wed, 07 Dec 2022 17:37:20 GMT by Teles, Afonso

Hi Jeremy,

Just to be clear, the data is already in log form if using dB units. If using Vrms then the data will be linear.

The data follows the units that spectrum view is set to.

"DAT:WIDTH 8" Is actually not necessary as when we set the data:source to CHx_SV_NORMAL, it automatically sets the data width to 8. This is because the spectrum view data is encoded as double precision floating point, which takes up 8 bytes per point, as mentioned on page 2-420 of the programmer's manual.

So it's there just to make it clear to any reader that the data is 8 bytes per point.

Posted Wed, 07 Dec 2022 22:43:52 GMT by Li, Jeremy
Hi Teles,
Thanks for the reply. it seems we need to set data width to 8 when transfering FFT data on MSO2. But it is ture that we don't need to set the data width on MSO4 spectrum view when using dB unit.

Here I come up with another question which confuse me for a long time.

I connected the probe to the probe compensation source. and we could have a 2.5V square wave. 
When doing FFT transfer, we could know that the most strength frequency is 1K Hz. and then other frequency 3k,5k... but as shown on the scope screen, the 1K Hz frequency is always about 13-14dBm, how can we calculate to have this value.
Is there some relationship with Vrms unit.

because when doing FFT on LabVIEW, the 1K Hz is always near to 0 dBm while the delta dB between different frequency seems correct. it seems some kind of offset between the calculation.
Posted Mon, 12 Dec 2022 18:32:44 GMT by Teles, Afonso
"curve?" data from spectrum view should always be in 8 byte floating point format, so data:width doesn't need to be set explicitly.

Vrms is a measure of the voltage integral adjusted to allow for easier measure of power.
dBm is a measure of power relative to 1 mW.
The relationship between them is giving by the usual P = V^2/R relationship. The dBm display on spectrum view assumes a 50 Ohm load, this may or may not be true.

The fact the first harmonic is at ~13.5 dBm comes from the inherent properties of applying the Fourier transform to a square wave. I will not go through the math here, but there are plenty of sources discussing the Fourier transform of a square wave.

I do not know how your LabVIEW program works, but I assume you simply passed it the data from the "curve?" command to a plotting function.
It then picked the highest point as 0 dB (not dBm). This explains what you are seeing.
This seems like a quirk of how the LabVIEW plotting function works.
Posted Tue, 13 Dec 2022 01:43:07 GMT by Li, Jeremy
Hi Teles,
Thanks for you patience, according to your instruction, I have find out the answer in LabVIEW help document.

magnitude is the magnitude of the averaged FFT spectrum. If the input signal is in volts (V), magnitude has units of volts-rms (Vrms). If the input signal is not in volts, magnitude has units of the input signal unit-rms. If dB On is TRUE and the input signal is in volts, magnitude has units of dBV

So what I got was dBV ,and 14.01dBm seems close to the scope.

You must be signed in to post in this forum.