sudo chmod a+rw /dev/usbtmc0to do this. You can then run the test code in RigolDSWrap.py using:
python RigolDSWrap.pyThis should capture a signal from channel 1, plot it, do a frequency domain analysis on it, and plot its spectrum.
if __name__ == '__main__': # Open a connection to the oscilloscope. o = RigolDS() # Get the scope's identification string. print o.query( '*IDN?' ) # Set the timebase. o.command( ':TIM:SCAL 0.0001' ) # Acquire the data with the current front panel settings. (nch1, nch2, nmax) = o.acquire(1,1) print nch1, nch2, nmax # If we got channel 1 data, process it. if( nch1 > 0 ): # Read data and plot it. (nsamples, data, deltat, hoff, voff ) = o.read_channel(1,nch1) print "Time domain data. Volts." print "samples", nsamples, "time step", deltat, "H offset", hoff, "V offset", voff time_plot( nsamples, data, deltat, hoff, 'Channel 1 Time Data' ) # Find the amplitude spectrum and plot it. print "Frequency domain. Linear RMS Volts." ( nfreqs, freq_step, max_freq, spectrum ) = \ fourier_spectrum( nsamples, data, deltat, False, False, True ) print "Freq step", freq_step, "Max freq", max_freq, "Freq bins", nfreqs freq_plot( nfreqs, spectrum, freq_step, max_freq ) # Find the log amplitude spectrum and plot it. print "Frequency domain. Log RMS Volts." ( nfreqs, freq_step, max_freq, spectrum ) = \ fourier_spectrum( nsamples, data, deltat, True, False, True ) freq_plot( nfreqs, spectrum, freq_step, max_freq, None, True ) # Plot channel 2 amplitude vs. time data if we got any. if( nch2 > 0 ): (nsamples, data, deltat, hoff, voff ) = o.read_channel(2,nch2) print nsamples, deltat, hoff, voff time_plot( nsamples, data, deltat, hoff, 'Channel 2 Time Data' )