Return data with the timestamp
Show older comments
Hey, I`m doing a measurement and getting its data from (Keysight 34465A). The problem is that I don`t get the timestamp along with the data.I looked at the manual and found the command which should return the data with the time stamp but it doesn`t do so. Can it also be because of device? Please help if you have any ideas. Here is the piece of the code i use:
%code
fprintf(key,'MMEMory:FORMat:READing:INFormation ON'); % command supposed to get data with timestamp
fprintf(key,'TRIGger:SOURce EXT');
fprintf(key,'TRIGger:DELay:AUTO OFF');
fprintf(key,'TRIGger:DELay MIN');
fprintf(key,'SAMP:COUN 100');
fprintf(key,'SAMPle:COUNt:PRETrigger 50');
fprintf(key,'TRIGger:COUNt 1');
fprintf(key,'INIT');
Readings=fopen('testreading.txt','w');
for jj=1:100
fprintf(key,'DATA:REM? 1'); % getting data
dat=fscanf(key);
dat=strread(dat,'%f','delimiter',',');
fprintf(Readings, '%f\t\r\n',dat);
end
fclose(Readings);
Answers (0)
Categories
Find more on Big Data Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!