Rigol DS1052E Digital Oscilloscope
12 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Cristhian Zárate
2019 年 9 月 19 日
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
2019 年 11 月 4 日
編集済み: Ali bala
2019 年 11 月 4 日
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.
回答 (1 件)
AngryMob
2020 年 2 月 9 日
編集済み: AngryMob
2020 年 2 月 9 日
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);
1 件のコメント
Priyanka
2024 年 7 月 16 日
I am using the same code. ITs still reading 1200 pts only. Is there any solution to this problem?
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!