Lost !

-----hard working for the furture.

导航

统计

matlab get scope

https://ww2.mathworks.cn/help/instrument/getwaveform.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
scopeResource = "TCPIP0::192.168.1.3::inst0::INSTR";
ch = "CH1";
scope = oscilloscope;
scope.Resource = scopeResource;
connect(scope)
autoSetup(scope)
enableChannel(scope,ch);
% configureChannel(scope,ch,"VerticalCoupling","AC")
%
% configureChannel(scope,ch,"VerticalRange",1)
%
% configureChannel(scope,ch,"ProbeAttenuation",1)
%
% scope.AcquisitionTime = 0.25;
%
% scope.TriggerLevel = 2.56;
scope.TriggerSource = ch;
scope.TriggerSlope = "rising";
scope.TriggerMode = "normal";
 
disp(scope)
 
%fgenResource = "GPIB0::5::INSTR";
%vfgen = visadev(fgenResource)
 
% writeline(vfgen,"SOUR1:VOLT +1.0")
% writeline(vfgen,"SOUR1:VOLT:OFFS +1.0")
 
 
% writeline(vfgen,"SOUR1:FREQ:MODE SWE");
% writeline(vfgen,"SOUR1:SWE:STAT ON");
% writeline(vfgen,"SOUR1:SWE:SPAC LIN");
 
% fstart = 20;
% fstop = 200;
%
% writeline(vfgen,compose("SOUR1:FREQ:STAR %d",fstart));
% writeline(vfgen,compose("SOUR1:FREQ:STOP %d",fstop));
% sweepTime = 0.1;
% holdTime = 0;
% returnTime = 0;
%
% writeline(vfgen,compose("SOUR1:SWE:TIME %0.1f",sweepTime));
%
% writeline(vfgen,compose("SOUR1:SWE:HTIME %0.1f",holdTime));
%
% writeline(vfgen,compose("SOUR1:SWE:RTIME %0.1f",returnTime));
 
 
% writeline(vfgen,"TRIG1:SLOP POS");
% writeline(vfgen,"TRIG1:SOUR IMM");
 
y = readWaveform(scope);
t = linspace(0,scope.AcquisitionTime,scope.WaveformLength);
 
plot(t,y)
% ylim([0.5,3.5]);
title("Acquired waveform (sweep)")
xlabel("Time (s)");
ylabel("Voltage (V)");
 
disconnect(scope)
clear scope

  

posted on   失落''80  阅读(28)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· 展开说说关于C#中ORM框架的用法!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
点击右上角即可分享
微信分享提示