Main Content

Read Waveforms from Keysight L4534A Digitizer Using IVI-C Driver

This example shows how to initialize the agl453xdni IVI-C driver, acquire a waveform using Keysight™ Technologies L4534A digitizer, and display in MATLAB®.

Requirements

To run this example, you must have the Keysight L4534A Digitizer - agl453xdni IVI-C driver version 1.2 installed on your computer.

View Installed IVI-C Drivers

View a list of the IVI-C drivers and associated MATLAB drivers that are installed on your computer using ividriverlist.

list = ividriverlist
list=17×4 table
             VendorDriver          MATLABDriver            IVIClass                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              SupportedModels                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
          __________________    __________________    __________________    _________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

    1     "Ag3446x"             "Ag3446x"             "IVIDmm"              {["34460A"    "34461A"    "34465A"    "34470A"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ]}
    2     "agl453xdni"          "agl453xdni"          "IVIDigitizer"        {["L4532A"    "L4534A"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ]}
    3     "IviACPwr"            "IviACPwr"            "IVIACPwr"            {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    4     "IviCounter"          "IviCounter"          "IVICounter"          {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    5     "IviDCPwr"            "IviDCPwr"            "IVIDCPwr"            {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    6     "IviDigitizer"        "IviDigitizer"        "IVIDigitizer"        {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    7     "IviDmm"              "IviDmm"              "IVIDmm"              {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    8     "IviDownconverter"    "IviDownconverter"    "IVIDownconverter"    {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    9     "IviFgen"             "IviFgen"             "IVIFgen"             {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    10    "IviPwrMeter"         "IviPwrMeter"         "IVIPwrMeter"         {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    11    "IviRfSigGen"         "IviRfSigGen"         "IVIRfSigGen"         {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    12    "IviScope"            "IviScope"            "IVIScope"            {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    13    "IviSpecAn"           "IviSpecAn"           "IVISpecAn"           {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    14    "IviSwtch"            "IviSwtch"            "IVISwtch"            {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    15    "IviUpconverter"      "IviUpconverter"      "IVIUpconverter"      {[""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ]}
    16    "KtRFPowerMeter"      ""                    "IVIPwrMeter"         {["8481A"    "8481B"    "8481D"    "8481H"    "8482A"    "8482B"    "8482H"    "8483A"    "8485A"    "8485D"    "8487A"    "8487D"    "E4416A"    "E4417A"    "E4418B"    "E4419B"    "E9325A"    "E9326A"    "E9327A"    "L2051XA"    "L2052XA"    "L2053XA"    "L2054XA"    "L2055XA"    "L2056XA"    "L2057XA"    "L2061XA"    "L2062XA"    "L2063XA"    "L2064XA"    "L2065XA"    "L2065XT"    "L2066XA"    "L2066XT"    "L2067XA"    "L2067XT"    "N1911A"    "N1912A"    "N1913A"    "N1914A"    "N1921A"    "N1922A"    "N432A"    "N8262A"    "U2000A"    "U2000B"    "U2000H"    "U2001A"    "U2001B"    "U2001H"    "U2002A"    "U2002B"    "U2002H"    "U2004A"    "U2021XA"    "U2022XA"    "U2041XA"    "U2042XA"    "U2043XA"    "U2044XA"    "U2049XA"    "U2051XA"    "U2052XA"    "U2053XA"    "U2054XA"    "U2055XA"    "U2056XA"    "U2057XA"    "U2061XA"    "U2062XA"    "U2063XA"    "U2064XA"    "U2065XA"    "U2066XA"    "U2067XA"    "U8481A"    "U8485A"    "U8487A"    "U8488A"    "U8489A"]}
      ⋮

Connect to Instrument

Connect to a simulated Keysight L4534A Digitizer using ividev with the instrument's MATLAB driver name and resource name. This example uses the agl453xdni driver's simulation mode to run without physically connecting any hardware. Since simulation mode is enabled, the resource name can be specified as empty.

dev = ividev("agl453xdni","",Simulate=true)
dev = 
  agl453xdni with properties:

                      Model: "w" 
               Manufacturer: "Agilent Technologies" 
               SerialNumber: "" 
               ResourceName: "" 
               VendorDriver: "agl453xdni" 
                   Simulate: 1 

               ArmSourceIDs: ["VAL_IMMEDIATE", "VAL_EXTERNAL", "VAL_SOFTWARE", "VAL_TIMER", ... ] 
                 ChannelIDs: ["1", "2"] 
           TriggerSourceIDs: ["1", "2", "VAL_EXTERNAL", "VAL_SOFTWARE", "VAL_CHANNEL", ... ] 

      InherentIVIAttributes: [1x1 InherentIVIAttributes] 
                        Arm: [1x4 Arm] 
                    Channel: [1x2 Channel] 
        ReferenceOscillator: [1x1 ReferenceOscillator] 
                    Trigger: [1x7 Trigger] 
              OutputTrigger: [1x1 OutputTrigger] 
        WaveformAcquisition: [1x1 WaveformAcquisition] 
        WaveformMeasurement: [1x2 WaveformMeasurement] 
    MiscellaneousAttributes: [1x1 MiscellaneousAttributes] 

Show all functions

Define Variables

Specify acquisition parameters such as sampling rate, record size, range, etc.

range = 256;
offset = 0;
numRecords = 1;
recordSize = 204800;
samplingRate = 20e6;
maxTimeMillisec = 5000;

Get General Device Properties

Query information about the driver and its attributes. You can explore properties and sub-properties of the object by clicking on the property links from the object output display.

dev.InherentIVIAttributes
ans = 
  InherentIVIAttributes with properties:

                   UserOptions: [1x1 UserOptions] 
          DriverIdentification: [1x1 DriverIdentification] 
            DriverCapabilities: [1x1 DriverCapabilities] 
      InstrumentIdentification: [1x1 InstrumentIdentification] 
    AdvancedSessionInformation: [1x1 AdvancedSessionInformation] 

dev.InherentIVIAttributes.DriverIdentification
ans = 
  DriverIdentification with properties:

                       Description: "Agilent L4532A/34A High Resolution Digitizer IviDigitizer Driver" 
                      DriverPrefix: "agl453xdni" 
                      DriverVendor: "National Instruments" 
                          Revision: "Driver: agl453xdni 1.4, Compiler: CVI 15.01, Components: IVIEngine 21.00, VISA-Spec 5.80" 
    ClassSpecificationMajorVersion: 1 
    ClassSpecificationMinorVersion: 0 

Configure Channel

Configure the attributes of channel 1 sub-system. These attributes are the range, offset, coupling, and whether the channel is enabled.

configureChannel(dev,"1",range,offset,"VERTICAL_COUPLING_DC",true);

Configure Acquisition

Configure the attributes of the digitizer acquisition sub-system. These attributes are the samples per record, the number of records to acquire, and the sampling rate.

configureAcquisition(dev,numRecords,recordSize,samplingRate);

Read Waveform

The readWaveformReal64 function initiates an acquisition on the configured channel , waits for the acquisition to complete, and returns the waveform for the specified channel.

[waveformArrayReal64, actualPts,firstValidPt,initialOffset,initialXTimeSec,...
    initialXTimefraction,xIncrement] = readWaveformReal64(dev,"1",maxTimeMillisec,recordSize*numRecords);

Display Waveform

Create a time vector.

t = 0:xIncrement:(length(waveformArrayReal64)-1)*xIncrement;

Plot the waveform.

plot(t,waveformArrayReal64);
grid on;
xlabel("Time (s)");
ylabel("Volts (V)");
ylim([-3 4])
xlim([0 0.004])

Figure contains an axes object. The axes object contains an object of type line.

Clean Up

Disconnect and clear the ividev object from the workspace.

clear dev

See Also

| |

Related Topics