Main Content
Transition Your Code to ividev
Interface
Discover Installed IVI-C Drivers
Functionality | Use This Instead |
---|---|
driversInfo = ivinstrhwinfo('ivi');
driversInfo.Modules |
list = ividriverlist |
list = ividevlist |
Use ividriverlist
to view a list of installed IVI-C and
VXIplug&play drivers installed on your computer and their
corresponding MATLAB® drivers. Use ividevlist
to view a list of physically
connected hardware and their drivers.
Create MATLAB Instrument Driver
Functionality | Use This Instead |
---|---|
makemid('AgInfiniiVision','AgInfiniiVision.mdd') | You do not need to create the MATLAB instrument driver. These drivers are included with the Instrument Control Toolbox™ Support Package for IVI® and VXIplug&play Drivers. |
Connect to Instrument
Functionality | Use This Instead |
---|---|
dev = icdevice('AgInfiniiVision.mdd','USB0::0x2A8D::0x0386::CN59216227::0::INSTR'); connect(dev); | dev = ividev("AgInfiniiVision","USB0::0x2A8D::0x0386::CN59216227::0::INSTR"); connect function. |
disconnect(dev)
clear dev | clear dev disconnect function. |
Connect to IVI-C Class-Compliant Instrument
Functionality | Use This Instead |
---|---|
% myScope is the logical name in the iviconfigurationstore object dev = instrument.ivic.IviScope(); dev.init('myScope',true,true); |
% myScope is the logical name in the iviconfigurationstore object dev = ividev("IviScope","myScope","IDQuery",true,"ResetDevice",true); |
Get Instrument Properties
Functionality | Use This Instead |
---|---|
get(dev,'Inherentiviattributesdriveridentification') |
dev.InherentIVIAttributes.DriverIdentification |
You can explore your instrument's properties by using dot notation and tab-complete in
the MATLAB Command Window. You can also click on the links from the
ividev
object output display.
Invoke Instrument Methods
Functionality | Use This Instead |
---|---|
configuration = dev.Configuration;
invoke(configuration, 'autosetup') |
autosetup(dev); |
Use Repeated Capabilities
Functionality | Use This Instead |
---|---|
dev.RepCapIdentifier = 'Channel1'; dev.Channel.Input_Impedance = 50; dev.RepCapIdentifier = 'Channel2'; dev.Channel.Input_Impedance = 50; |
dev.Channel("Channel1").InputImpedance = 50; dev.Channel("Channel2").InputImpedance = 50; |
Read Waveform from Oscilloscope
Functionality | Use This Instead |
---|---|
recordLength = dev.Acquisition.Horizontal_Record_Length;
waveformArray = zeros(1, recordLength);
[waveformArray,actualPoints,initialX,xIncrement] = dev.WaveformAcquisition.
ReadWaveform('Channel1', recordLength, 1000, waveformArray); | recordLength = actualRecordLength(dev)
[waveformArray,actualPoints,initialX,xIncrement] = readWaveform(dev,"Channel1",recordLength,1000); You do not need to pre-allocate an array for the waveform. |