web
You’re offline. This is a read only version of the page.
close
  • Setting sample rate on DPO4104 Oscilloscope

    I am writing a python script that interacts with a DPO4104 Oscilliscope using SCPI over eternet via pivisa.  I have gotten many features to work following the commands in the DPO4000 Series programmer manual. I am stuck trying to set the sample frequency.

    I am able to read the frequency with the command:
    horizontal:samplerate?
    but I am unable to change the command with:
    horizontal:samplerate 100000

    I have tried the abbreviated form of the command, and tried decimal and scientific notation for the value.  Any attempt does not seem to have any effect on the oscilloscope, and I am not getting any errors in python.  Below is minimal code to reproduce (hopefully) the problem I am having.


    import pyvisa
    rm = pyvisa.ResourceManager()
    scope = rm.open_resource("TCPIP::192.168.20.82::INSTR")
    print(scope.query("*idn?"))
    print(scope.query("horizontal:samplerate?"))
    scope.write("horizontal:samplerate 500.0000E+3")
    print(scope.query("horizontal:samplerate?"))

    Output:

    TEKTRONIX,DPO4104,B010495,CF:91.1CT FV:v2.48 

    1.0000E+6

    1.0000E+6