MATLAB Answers

How to connect to Keysight oscilloscope using the oscilloscope() function?

33 views (last 30 days)
Lawrence Busse
Lawrence Busse on 13 Jun 2017
Commented: Vinod on 15 Jun 2017
I'm having trouble connecting to a Keysight DSOX3012T using the oscilloscope function. Here's what I've tried so far:
>> o=oscilloscope()
o =
oscilloscope: No connection has been setup with instrument, type help oscilloscope for more information
>> o=oscilloscope('USB0::0x2A8D::0x1769::MY56310266::INSTR')
Error using instrument/Oscilloscope (line 132)
Failed to connect to the oscilloscope, please provide a driver name and try again.
>> o=oscilloscope('USB0::0x2A8D::0x1769::MY56310266::INSTR','AgInfiniiVision.mdd')
Error using instrument/Oscilloscope (line 132)
Failed to connect to the oscilloscope, please check instrument connection.
The instrument is connected which is confirmed by the NI Measurement and Automation explorer.
I have no problem connecting to a Tektronix DPO4032 scope using the command:
>> o=oscilloscope('TCPIP0::192.168.1.99::INSTR')
o =
oscilloscope: TEKTRONIX,DPO4032
Instrument Settings:
AcquisitionStartDelay: 3e-06 s
AcquisitionTime: 1e-05 s
ChannelNames: 'CH1', 'CH2', 'MATH', 'REF1', 'REF2'
ChannelsEnabled: 'CH1'
SingleSweepMode: 'off'
Timeout: 10 s
WaveformLength: 1000
Trigger Settings:
TriggerLevel: 4
TriggerSource: 'CH2'
TriggerSlope: 'rising'
TriggerMode: 'normal'
Communication Properties:
Status: 'open'
Resource: 'TCPIP0::192.168.1.99::INSTR'
Are there extra steps required to connect the Keysight Scope?
Is it even possible to use the oscilloscope function?

  0 Comments

Sign in to comment.

Answers (1)

Vinod
Vinod on 14 Jun 2017
Try
>> o=oscilloscope;
>> o.Reource = 'USB0::0x2A8D::0x1769::MY56310266::INSTR'
>> o.Driver = 'AgInfiniiVision'
>> connect(o)
If that does not work, please contact MathWorks technical support.

  2 Comments

Lawrence Busse
Lawrence Busse on 15 Jun 2017
Vinod,
Thanks for the answer. It works from the Matlab environment...but when I compile it and run the .exe in the for_testing folder, I get an error that it can't connect at line 5.
% simple test script
o=oscilloscope;
o.Resource = 'USB0::0x2A8D::0x1769::MY56310266::INSTR'
o.Driver = 'AgInfiniiVision'
connect(o)
%o = oscilloscope('USB0::0x2A8D::0x1769::MY56310266::INSTR','AgInfiniiVision')
%o.connect
waveform = readWaveform(o,'acquisition',true);
plot(waveform);
o.disconnect;
clear o;

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!