Rigol DS1052E Digital Oscilloscope

27 visualizaciones (últimos 30 días)
Hamna Ahmad
Hamna Ahmad el 4 de Feb. de 2016
Editada: AngryMob el 9 de Feb. de 2020
Hey all! I want to import data form Rigol DS1052E Digital Oscilloscope into Simulink at run time. Has anyone done this before ? Neither I can't find the drivers for my Rigol Model nor I know how to do. Will someone help me with this ? Regards,
  2 comentarios
Cristhian Zárate
Cristhian Zárate el 19 de Sept. de 2019
I'm not using the Simulink, but I'm workin on reading data from Rigol DS1054z on a matlab script.
Installation:
You will need the NI IVI Compliance Package
And the Rigol DS1000 series driver
Then try to create the object
Simpliest way
Rigol_Osc = oscilloscope();
Rigol_Osc.getResources (select the usb address of the rigol)
Rigol_Osc.Resource = '<ADDRESS>';
Rigol_Osc.getDrivers (select the driver name installed)
Rigol_Osc.Driver = '<DRIVERNAME>'
connect(Rigol_Osc)
Ali bala
Ali bala el 4 de Nov. de 2019
Editada: Ali bala el 4 de Nov. de 2019
Hi, Cristhian. I have tried what you have suggested. But I don't know how to combine the ni package with the rest of the thing. I have installed the ni package as well as the rigol driver. I have copied you piece of code into matlab and run. Only thing it did was to stop the running scope. I have used the matlab demo code from rigol programming guide. But it only acquires the screen data, 1200 points only. Also, the vertical data units do not match with the scope data. This is quite frustrating stiuation. Would you mind sharing your method with more details ? code would be much better.

Iniciar sesión para comentar.

Respuestas (1)

AngryMob
AngryMob el 9 de Feb. de 2020
Editada: AngryMob el 9 de Feb. de 2020
Try to change your settings on the oszcilloscope to Uiility->IO Setting->USB Device "Computer" ... i think it is by default on "PicBridge"
I struggle with the same problem...
It seems to work for me with:
% Find a VISA-USB object.
DS1000z = instrfind('Type', 'visa-usb', 'RsrcName', 'USB0::0x1AB1::0x04CE::DS1ZA192712385::0::INSTR', 'Tag', '');
% Create the VISA-USB object if it does not exist
% otherwise use the object that was found.
if isempty(DS1000z)
DS1000z = visa('NI', 'USB0::0x1AB1::0x04CE::DS1ZA192712385::0::INSTR');
else
fclose(DS1000z);
DS1000z = DS1000z(1);
end
% Set the device property. In this demo, the length of the input buffer is set to 2048.
DS1000z.InputBufferSize = 2048;
% Connect to instrument object, obj1.
fopen(DS1000z);
% Set channel
fprintf(DS1000z, ':WAV:SOURce CHAN1' );
% Normal Mode
fprintf(DS1000z, ':WAV:MODE NORM' );
% Samplerate T?
fprintf(DS1000z, ':WAVeform:XINCrement?');
SampRate = fscanf(DS1000z);
% Read the waveform data
fprintf(DS1000z, ':wav:data?' );
% Request the data
[data,len]= fread(DS1000z,2048);

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by