Keysight M3102A Digitizer
This module contains the many methods and types necessary to control and configure the Keysight M3102A Digitizer. In essence, it wraps the KeysightInstruments.jl package, which in itself is a bare-bones wrapper to the native C library which controls the Keysight instruments, in a way which affords compatibility with the rest of the InstrumentControl package, as well as consistency between the control code of this instrument and other instruments represented in this package.
Usage/Configuration
Instrument Overview
Each MM3102A Digitizer card has several channels; each channel has it's own DAQ for reading data. The DAQ reads data upon acquisition of triggers, and stores the data in a buffer allocated in the onboard RAM of the digitizer card. Upon reaching a user defined threshold for data acquisition, either an memory threshold or a time threshold, the contents of the buffer are passed on to the computer through the (fast) PXI cables. The DAQ can also be configured to read the data in "cycles", where acquisition for each cycle commences upon receiving a trigger, in which the user configures the amount of data acquired in each cycle.
Moreover, each Digitizer card has it's own internal 100MHz clock which is phase-locked to the chassis clock: any actions taken by the AWG occur on a clock tick (so in intervals of 10ns), and different AWG/Digitizer cards are synchronized through the chassis clock. Each card also has an extra port called the TRG port, on which triggers can be received or generated
Usage
All instrument control and configuration happens through the following Instrument
subtype:
#
InstrumentControl.DigitizerM3102A.InsDigitizerM3102A
— Type.
mutable struct InsDigitizerM3102A <: Instrument serial_num::String product_name::String index::Int chassis_num::Int slot_num::Int channels::Dict{Int,Dict{Any,Any}} end
Object representing an DigitizerM3102A instrument. It holds, as fields, instrument information such as digitizer card instrument index, slot number, chassis number, serial number, product name, etc.
This object also holds individual channel properties in a dictionary named channels
, where in the type's implementation, the values of the dictionaries are themselves dictionaries that hold all configuration information for a particular channel.For example, for an object ins::InsDigitizerM3102A
, ins.channels[1]
will return a dictionary that holds all configuration information for channel 1; its keys will be subtypes of the InstrumentProperty
abstract type, and its values will be the values which the instrument property associated that subtype are configured to in that channel in the digitizer.
Two inner constructors are provided: one which initializes the object with a given slot number and chassis number, and one which initializes the object with a given serial number. When the object is initialized, it obtains all other instrument information described above with the passed arguments, and initializes all the channels properties to some standard values and records them in the channels
dictionary through the configure_channels!
function
For example, calling InsDigitizerM3102A(16,1,num_channels = 4)
will open the Digitizer card on slot 16 on the PXI chassis indexed by 1 (internal Keysight software does the chassis "indexing"); num_channels
corresponds to the number of channels in the Digitizer card. The second input, which sets the value for the chassis
field in the InsDigitizerM3102A
object, is an optional argument with default value 1
(for the case when only one chassis is connected to the computer), while the num_channels
input is a keyword argument whose default value is 4
–> Hence, InsDigitizerM3102A(16)
would make an instance of the same object.
Configuration
Configuration/Inspection of settings happens through setindex!/getindex methods, as described in Overview
These are the following properties which can be configured, each of which has it's own InstrumentProperty
subtype:
#
InstrumentControl.DigitizerM3102A.FullScale
— Type.
Fullscale of each channel. For example, if the fullscale is configured to be 1V, the digitizer measures voltages on the range of 1V to -1V, and truncates any values outside this interval to the interval's boundary. The data acquired by the digitizer is converted to voltages by the formula data*FullScale/2e15
#
InstrumentControl.DigitizerM3102A.InputMode
— Type.
Can be configured to be either :DC or :AC
#
InstrumentControl.DigitizerM3102A.Impedance
— Type.
Can be configured to be either :Ohm_50 or :Ohm_High, corresponding to either 50Ω impedance or 1MΩ impedance
#
InstrumentControl.DigitizerM3102A.Prescaler
— Type.
Used to arbitrarily change the sampling rate of the digitizer: the effective sampling rate is 500e8/(1+prescaler). Can be configured to be an integer greater than or equal to zero
#
InstrumentControl.DigitizerM3102A.AnalogTrigBehavior
— Type.
Analog trigger means trigger by the incoming data itself. Analog trigger behavior is what behavior by the incoming data triggers the DAQ to start acquiring data. Can be configured to either: :RisingAnalog, :FallingAnalog, or :BothAnalog, corresponding to, respectively, trigger on the rising edge, trigger on the falling edge, or trigger on any edge
#
InstrumentControl.DigitizerM3102A.AnalogTrigThreshold
— Type.
Threshold on which, if the incoming data surpasses, generarates an analog trigger to the DAQ. Configured to be a Float64
number.
#
InstrumentControl.DigitizerM3102A.DAQTrigMode
— Type.
Configures which type of trigger the DAQ will start measuring data upon trigger acquisition. Can be configured to :Auto (no trigger), :Software, :External, or :Analog.
#
InstrumentControl.DigitizerM3102A.DAQTrigDelay
— Type.
Delay between acquisition of trigger and measurement of incoming data. Configured to be an integer, the delay is measured in units of samples <-> in units of 2ns.
#
InstrumentControl.DigitizerM3102A.DAQPointsPerCycle
— Type.
Number of samples measured per DAQ cycle
#
InstrumentControl.DigitizerM3102A.DAQCycles
— Type.
Number of "cycles" for which the digitizer will acquire data; data acquisition for each cycle starts upon receiving whatever trigger is configure by DAQTrigMode property
#
InstrumentControl.DigitizerM3102A.ExternalTrigSource
— Type.
Source of external trigger. Can be configured to be either a number 0-7, which corresponds to a PXI line on the PXI backplane, or :TrgPort, which corresponds to the Trg port on the digitizer card
#
InstrumentControl.DigitizerM3102A.ExternalTrigBehavior
— Type.
External trigger behavior is what behavior by the external trigger actually triggers the DAQ to start acquiring data. Can be configured to either: :Rising, :Falling, :High, or :Low; corresponding to, respectively, trigger on the rising edge, trigger on the falling edge, trigger on high voltage, trigger on low voltage
#
InstrumentControl.DigitizerM3102A.AnalogTrigSource
— Type.
Source of analog trigger; can be configured to be an integer corresponding to a channel number in the digitizer