Forums › General Discussions › SCPI reading the avg power value in zero span
- This topic has 6 replies, 2 voices, and was last updated 8 months, 2 weeks ago by Volker.
- Volker July 9, 2022 at 12:34 am
I would like to get the avg power value in zero span mode via SCPI command. It is the value displayed in AM vs Time centered in the bottom line.
What would be the command to use ?Andrew July 11, 2022 at 10:35 am
There is not currently a way to extract that value. It is something I could add relatively easy (I believe) for the next release of Spike.
In the meantime, if you are retrieving the I/Q data, you can make this measurement with the equation
10*log10(mean(I^2 + Q^2));
In spoken word, calculate the linear power of each I/Q sample, I^2 + Q^2, calculate the mean of the linear powers, then take the 10*log10 of that mean.
This would give you the average power in dBm over the sample interval of your choice.
Given this, would you still be interested in a SCPI command to retrieve this value?
I look forward to your response.Volker July 12, 2022 at 10:29 am
thanks for your explanation of the calculation the amplitude value from the I/Q data. Still it would be nice to fetch the value from the analyser. The workaround generates lots of data, especially if you need many amplitude values…
Yes, I would be interested to have a SCPI command to retrieve it. It makes the resulting script much more easy.Andrew July 12, 2022 at 12:52 pm
Thanks for the additional feedback!
AndrewVolker September 16, 2022 at 6:58 am
in the release notes from 3.8.0 you wrote:
> SCPI command FETCH:ZS? can now return average power.
I have tried but could not get the expected result.
Parameter 1 delivers IQ Values that can be used with this formular: 10*log10(mean(I^2 + Q^2))
Parameter 2 delivers the number of IQ values
looks like no other paramters are implemented.
Can you please explain how FETCH:ZS? retrieves the avg power value in zero span mode.
VolkerAndrew September 16, 2022 at 8:53 am
Sorry, it looks like I didn’t update the SCPI manual to reflect the change.
Try “FETCH:ZS? 10” for the average power.
Let me know if you run into issues or have follow up questions.Volker September 18, 2022 at 10:32 pm
this is working fine.
You must be logged in to reply to this topic.