DPO2024B Code for communicating with an instrument.

%% DPO2024B Code for communicating with an instrument.

%

% This is the machine generated representation of an instrument control

% session. The instrument control session comprises all the steps you are

% likely to take when communicating with your instrument. These steps are:

%

% 1. Instrument Connection

% 2. Instrument Configuration and Control

% 3. Disconnect and Clean Up

%

% To run the instrument control session, type the name of the file,

% dpo2024b, at the MATLAB command prompt.

%

% The file, DPO2024B.M must be on your MATLAB PATH. For additional information

% on setting your MATLAB PATH, type 'help addpath' at the MATLAB command

% prompt.

%

% Example:

% dpo2024b;

%

% See also SERIAL, GPIB, TCPIP, UDP, VISA, BLUETOOTH, I2C, SPI.

%

% Creation time: 23-Mar-2023 16:50:28

% Find a VISA-USB object.

obj1 = instrfind('Type', 'visa-usb', 'RsrcName', 'USB0::0x0699::0x03A3::C020161::0::INSTR', 'Tag', '');

% Create the VISA-USB object if it does not exist

% otherwise use the object that was found.

if isempty(obj1)

obj1 = visa('NI', 'USB0::0x0699::0x03A3::C020161::0::INSTR');

else

fclose(obj1);

obj1 = obj1(1);

end

% Connect to instrument object, obj1.

fopen(obj1);

%% Disconnect and Clean Up

% The following code has been automatically generated to ensure that any

% object manipulated in TMTOOL has been properly disposed when executed

% as part of a function or script.

% Disconnect all objects.

fclose(obj1);

% Clean up all objects.

delete(obj1);

clear obj1;

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

happy_baymax

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值