瀏覽代碼

Waveformfunctie ook daadwerkelijk verwijderd

publish
Wouter Horlings 8 年之前
父節點
當前提交
5a4c58b415
共有 1 個文件被更改,包括 15 次插入15 次删除
  1. +15
    -15
      OOequipment/Oscilloscope.m

+ 15
- 15
OOequipment/Oscilloscope.m 查看文件

@@ -25,21 +25,21 @@ classdef Oscilloscope < Equipment
end
end
function data = waveform(ch,cha)
ch.scope.clear;
ch.scope.write('CHAN1:TYPE HRES');
ch.scope.write('FORM REAL');
ch.scope.write('FORM:BORD MSBF');
ch.scope.write('CHAN1:DATA:POIN DEF');
ch.scope.write('SING');
header = str2num(ch.scope.query('CHAN1:DATA:HEAD?'));
ch.scope.write_unsafe('CHAN1:DATA?');
prefixstring = fscanf(ch.scope.tcp,'%c',2);
prefixlength = str2double(prefixstring(2));
datalength = fscanf(ch.scope.tcp,'%c',prefixlength);
data = fread(ch.scope.tcp,header(3),'float');
flushinput(ch.scope.tcp);
end
% function data = waveform(ch,cha)
% ch.scope.clear;
% ch.scope.write('CHAN1:TYPE HRES');
% ch.scope.write('FORM REAL');
% ch.scope.write('FORM:BORD MSBF');
% ch.scope.write('CHAN1:DATA:POIN DEF');
% ch.scope.write('SING');
% header = str2num(ch.scope.query('CHAN1:DATA:HEAD?'));
% ch.scope.write_unsafe('CHAN1:DATA?');
% prefixstring = fscanf(ch.scope.tcp,'%c',2);
% prefixlength = str2double(prefixstring(2));
% datalength = fscanf(ch.scope.tcp,'%c',prefixlength);
% data = fread(ch.scope.tcp,header(3),'float');
% flushinput(ch.scope.tcp);
% end
end
end



Loading…
取消
儲存