Author Topic: Scopes with logarithmic timescale  (Read 1847 times)

0 Members and 1 Guest are viewing this topic.

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Scopes with logarithmic timescale
« on: December 23, 2024, 05:59:28 pm »
Which scopes have a logarithmic timescale that one can afford ( ~2500€)? I guess there will only be old ones that fit into this category? Maybe there are some USB scopes that could be hacked to use its data and plot it via external program?
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD bugs/issues/workarounds (Updated 17. Oct 2025)
 

Offline TheoB

  • Regular Contributor
  • *
  • Posts: 168
  • Country: nl
Re: Scopes with logarithmic timescale
« Reply #1 on: December 23, 2024, 07:45:24 pm »
I've seen your plots for the square wave problem you have. That shows you already are able to make them. It's a very special display mode that is easy to implement by plotting with semilogx. You only have to tell what is time zero. It can be the trigger moment or a small time before the trigger. It's that what you need?
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Scopes with logarithmic timescale
« Reply #2 on: December 23, 2024, 10:41:38 pm »
I've seen your plots for the square wave problem you have. That shows you already are able to make them.
Yes, but its a bit of work. And i like to work less ;-)
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD bugs/issues/workarounds (Updated 17. Oct 2025)
 

Offline TheoB

  • Regular Contributor
  • *
  • Posts: 168
  • Country: nl
Re: Scopes with logarithmic timescale
« Reply #3 on: December 24, 2024, 09:22:44 am »
Example of how you can do that with python. I tried it with a Rigol DHO802 but I think it should work with any scope supporting SCPI commands|:

Code: [Select]
import pyvisa
import matplotlib.pyplot as plt
import numpy as np

rm = pyvisa.ResourceManager()
my_instrument = rm.open_resource('TCPIP::192.168.1.8::INSTR')
print(my_instrument.query('*IDN?'))
my_instrument.write(":WAV:SOURCE CHAN1")
my_instrument.write(":WAV:MODE RAW")
my_instrument.write(":WAV:FORM WORD")
my_instrument.write(":STOP")

# get the data from the scope
data = {}
data["yincr"] = float(my_instrument.query(":WAVeform:YINCrement?"))
data["yorg"] = float(my_instrument.query(":WAVeform:YORIGIN?"))
data["yref"] = float(my_instrument.query(":WAVeform:YREFERENCE?"))
data["xincr"] = float(my_instrument.query(":WAVeform:XINCrement?"))
data["xorg"] = float(my_instrument.query(":WAVeform:XORIGIN?"))
data["mdepth"] = float(my_instrument.query(":ACQuire:MDEPth?"))
data["sr"] = float(my_instrument.query(":ACQuire:SRATe?"))

data["y"] = my_instrument.query_binary_values(":WAVeform:data?", datatype='H', is_big_endian=False, container=np.array)
data["y"] = (data["y"] - data["yref"] - data["yorg"]) * data["yincr"]

# Reconstruct the x-axis
N = len(data["y"])
data["x"] = np.linspace(0, N * data["xincr"], N)
data["x"] = data["x"] + data["xorg"]

fig, ax = plt.subplots(3, figsize=(10, 12))

#labels
ax[0].set_xlabel("time (s)")
ax[1].set_xlabel("logx from triggerpoint")
ax[2].set_xlabel("symlog")

ax[0].set_ylabel("V")
ax[1].set_ylabel("V")
ax[2].set_ylabel("V")

ax[0].plot(data["x"], data["y"], "-")
ax[0].grid(True)
ax[1].semilogx(data["x"], data["y"], "g-")
ax[1].grid(True)
ax[2].plot(data["x"], data["y"], "r-")
# threshold should be 10e-9 not 2e-9 for nicer plot
linthreshold = 10 ** int(np.log10(data["xincr"]))
ax[2].set_xscale('symlog', linthresh=linthreshold)
ax[2].grid(True)

plt.show()
my_instrument.write(":RUN")

« Last Edit: December 24, 2024, 09:28:58 am by TheoB »
 
The following users thanked this post: egonotto

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3457
  • Country: de
Re: Scopes with logarithmic timescale
« Reply #4 on: December 24, 2024, 10:39:54 am »
Hello,

My PicoScope (USB-Ocilloscope) can do this directly:

Define a math function log(T) (add 1 ns to avoid log(0)) and define Range from -9 to -1 for 1ns to 100 ms.
use the math channel as x-axis
thats all.
Upper screen shows Channel A (log Time)
lower screen shows Channel A (Time)

the question is:
- what bandwith and time resolution do you need
- what amplitude resolution do you need 8/10/12/14/16 Bits

with best regards

Andreas
« Last Edit: December 24, 2024, 10:51:07 am by Andreas »
 
The following users thanked this post: egonotto

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Scopes with logarithmic timescale
« Reply #5 on: December 28, 2024, 01:03:16 pm »
Example of how you can do that with python. I tried it with a Rigol DHO802 but I think it should work with any scope supporting SCPI commands|:
....


Thats nice. Could you measure the time it takes to get the data from the scope?

My PicoScope (USB-Ocilloscope) can do this directly:

That is awesome, i was already thinking about these scopes, since i find the GUI of the SDS800X HD so bad, i thought when having to use a PC/keyboard, i can switch to a laptop with picoscope alltogether.

Does every model has this ability?
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD bugs/issues/workarounds (Updated 17. Oct 2025)
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3457
  • Country: de
Re: Scopes with logarithmic timescale
« Reply #6 on: December 28, 2024, 04:01:18 pm »
Does every model has this ability?
Hello,

The math functions are part of the software on PC.
So in principle every model has this ability.

The low end models (PS2xxxA) may not have enough memory at higher sample frequencies for longer aquisitions.

with best regards

Andreas
 

Offline TheoB

  • Regular Contributor
  • *
  • Posts: 168
  • Country: nl
Re: Scopes with logarithmic timescale
« Reply #7 on: December 28, 2024, 04:10:07 pm »
Thats nice. Could you measure the time it takes to get the data from the scope?
I calculatedmeasured roughly 53Mbps when using the pyvisa library. My scope needs two bytes/point (12 bits resolution). That equates to 53M/16=331k points/second.
« Last Edit: December 29, 2024, 04:26:59 pm by TheoB »
 
The following users thanked this post: egonotto

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Scopes with logarithmic timescale
« Reply #8 on: December 29, 2024, 12:53:15 pm »
I calculated roughly 53Mbps ....

You calculated? In another script?

I would have just measured the time it takes in your script. No calculations needed, and no errors would be introduced.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD bugs/issues/workarounds (Updated 17. Oct 2025)
 

Offline TheoB

  • Regular Contributor
  • *
  • Posts: 168
  • Country: nl
Re: Scopes with logarithmic timescale
« Reply #9 on: December 29, 2024, 04:27:54 pm »
That should indeed be measured :-). Just a dump of a large dataset, me counting the seconds.
 
The following users thanked this post: egonotto

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Scopes with logarithmic timescale
« Reply #10 on: December 29, 2024, 06:06:41 pm »
That should indeed be measured :-). Just a dump of a large dataset, me counting the seconds.

Were you counting the seconds, or measuring the seconds with a tool?  ;D
If you made multiple measurements: did you use median or mean average?  ;D :-DD
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD bugs/issues/workarounds (Updated 17. Oct 2025)
 

Offline TheoB

  • Regular Contributor
  • *
  • Posts: 168
  • Country: nl
Re: Scopes with logarithmic timescale
« Reply #11 on: December 29, 2024, 06:49:49 pm »
O dear. Even that was not correct. My computer was counting the seconds and I was just observing the start and end time. Subtracting them from each-other. Both observations have an uncorrelated random error of 1 second so it was 15 seconds +/-1 I guess.
Nerd level is rather high here  ^-^
 

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Scopes with logarithmic timescale
« Reply #12 on: December 29, 2024, 07:26:17 pm »
O dear. Even that was not correct. My computer was counting the seconds and I was just observing the start and end time. Subtracting them from each-other. Both observations have an uncorrelated random error of 1 second so it was 15 seconds +/-1 I guess.
Nerd level is rather high here  ^-^

Terms and measurements... meaningless without a minimum level of precision.  ;)
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD bugs/issues/workarounds (Updated 17. Oct 2025)
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 7524
  • Country: de
Re: Scopes with logarithmic timescale
« Reply #13 on: December 30, 2024, 12:50:07 pm »
Terms and measurements... meaningless without a minimum level of precision.  ;)

The same goes for bug reports, by the way. :P
 
The following users thanked this post: Grandchuck, mawyatt

Offline eTobeyTopic starter

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: de
  • Virtual Features for the SDS800XHD -> My website
    • Virtual feature script
Re: Scopes with logarithmic timescale
« Reply #14 on: December 30, 2024, 04:13:48 pm »
Terms and measurements... meaningless without a minimum level of precision.  ;)

The same goes for bug reports, by the way. :P

I used some precise terms in the past. It didnt work in quite a few cases, so naturally you would do less things, if they dont lead to any results...
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant."(Maxim Gorki)

SDS800X HD bugs/issues/workarounds (Updated 17. Oct 2025)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf