diff --git a/CHANGELOG.md b/CHANGELOG.md index e81270db..c5053a3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,31 @@ Valid subsections within a version are: ## Unreleased -Things to be included in the next release go here. +- Things to be included in the next release go here. + +### Added + +- Added the constraint ranges for all signal generators +- Added drivers for AWG and AFG channels +- Added a property named `source_channel` in AWG's and AFG's. +- Added drivers for internal AFG in TekScopes. +- Added a property named `internal_afg` in TekScope. +- Added implementation of `generate_function` for all AWG models. +- Added two burst functions to SignalGeneratorMixin: one to set up burst and one to generate the burst by forcing trigger. + - NOTE: Only the AFG's and internal AFG have these functions implemented. +- Added `OutputSignalPath` enum attribute in AWG's representing output signal path options. +- Added two functions for loading waveform set files in the AWG70k's and AWG5200: one for loading a waveform set file and another for loading a specific waveform from a waveform set file. +- Added `sample_waveform_set_file` attribute in AWG70k's and AWG5200 to define the default waveform set file. + +### Changed + +- BREAKING CHANGE. Changed the term "signal source" to "signal generator". + - All uses of this term are changed. Import paths now use signal_generator instead of signal_source. +- BREAKING CHANGE. Changed the function name of `generate_waveform()` to `generate_function()`. + - `generate_waveform()` only exists on AWGs now, however the functionality is entirely changed. +- BREAKING CHANGE. Changed the `generate_function()` function by removing burst functionality. + - Any use of burst now must use `setup_burst()` and `generate_burst()` instead. +- Updated AWG's such that the `family_base_class` is at the series level. --- diff --git a/docs/advanced/signal_generators.md b/docs/advanced/signal_generators.md index dfd627e4..8411e1e4 100644 --- a/docs/advanced/signal_generators.md +++ b/docs/advanced/signal_generators.md @@ -8,7 +8,7 @@ An overview of the signal generation functionality available in this package, al A function is a limited set of common waveforms that are provided by default through the instrument. The simplicity of these waveforms allows for output parameters like waveform length and sample rate to be -abstracted away. Frequency replaces these in order to provide signals which are easy to quantify and manipulate. +abstracted away. Frequency replaces these in order to provide signals that are easy to quantify and manipulate. Arbitrary Function Generators ([AFGs](default:AFG)) utilize a phase increment process and a data lookup table to provide variable frequencies. The phase increment calculated is dependent on the waveform length and frequency requested. This has @@ -16,7 +16,7 @@ a side effect where the phase increment can be larger than one index in the look issue by being simplistic enough that waveform length reduction does not have a detrimental effect on the end output. Arbitrary Waveform Generators ([AWGs](default:AWG)) enforce one cycle per sample, allowing the output to be the same shape regardless of clock rate. -The number of samples that occurs during a second is referred to as a sample per second (S/s), a unit which determines the frequency of the waveform. +The number of samples that occur during a second is referred to as a sample per second (S/s), a unit that determines the frequency of the waveform. With low frequency functions, [AWGs](default:AWG) are functionally identical to [AFGs](default:AFG), besides offering more constrained amplitudes and offsets. --- @@ -40,7 +40,7 @@ Similarly, [`TekScope`][tm_devices.drivers.pi.scopes.tekscope.tekscope.TekScope] [AFG](default:AFG) internal to the scopes themselves, commonly referred to as an [IAFG](default:IAFG). All of these classes inherit [`SignalGeneratorMixin`][tm_devices.driver_mixins.signal_generator_mixin.SignalGeneratorMixin], -which includes a list of methods which share +which includes a list of methods that share functionality throughout all signal generators. !!! note @@ -52,14 +52,17 @@ functionality throughout all signal generators. classDiagram direction LR - Tekscope <|-- InternalAFGChannel - AFG <|-- AFGSourceChannel + SignalGeneratorMixin <|-- Tekscope + SignalGeneratorMixin <|-- AFG + SignalGeneratorMixin <|-- AWG - AWG <|-- AWGSourceChannel + Tekscope "1..n" *-- InternalAFGChannel + AWG "1..n" *-- AWGSourceChannel + AWGSourceChannel <|-- AWG5200SourceChannel AWGSourceChannel <|-- AWG5KSourceChannel AWG5KSourceChannel <|-- AWG7KSourceChannel - AWGSourceChannel <|-- AWG5200SourceChannel AWGSourceChannel <|-- AWG70KSourceChannel + AFG "1..n" *-- AFGSourceChannel ``` Each [`SignalGenerator`][tm_devices.drivers.pi.signal_generators.signal_generator.SignalGenerator] class( @@ -75,12 +78,12 @@ Each of these source channel classes ( ) represents an output on the signal generator (or the [IAFG](default:IAFG) in the case of an oscilloscope). -These source channel classes contain methods and properties which pertain to [PI](default:PI) commands which only apply changes to one output. -For example: the `afg.source_channel\["SOURCE1"\].set_amplitude()` call will change the amplitude only for source output 1. +These source channel classes contain methods and properties that pertain to [PI](default:PI) commands, which only apply changes to one output. +For example: the `afg.source_channel["SOURCE1"].set_amplitude()` call will change the amplitude only for source output 1. !!! tip -The source channel classes not only provide easy access to basic [SCPI](default:SCPI) commands, but also helper functions, like `set_function_properties()` +The source channel classes not only provide easy access to basic [SCPI](default:SCPI) commands but also helper functions, like `set_function_properties()` --- @@ -92,33 +95,33 @@ The source channel classes not only provide easy access to basic [SCPI](default: state it was in previously. Attempting validation when changes can occur outside its scope leads to many redundant checks. As such, it is up to the user to implement these checks. -Each class has children which inherit the base abstracted methods. These methods are tailored to each signal generator so the +Each class has children which inherit the base abstracted methods. These methods are tailored to each signal generator, so the methods handle similarly, regardless of the different [PI](default:PI) commands required. -- `source_device_constants` is a property which holds information about what functions +- `source_device_constants` is a property that holds information about what functions and memory sizes are allowed. !!! tip `source_device_constants.functions` will provide an enum of possible functions to generate on the current signal generator. -`generate_function()` is a method which allows for the user to request a function from -any source channel, provided an amplitude, frequency and offset is supplied. Other key features +`generate_function()` is a method that allows the user to request a function from +any source channel, provided an amplitude, frequency, and offset are supplied. Other key features include the ability to manipulate specific aspects of certain functions. Ramp waveforms can have their symmetry changed and duty cycle can be altered for pulse functions. The termination of the [IAFG](default:IAFG) and any [AFG](default:AFG) can be specified using `HIGHZ` or `FIFTY` string literals. If the output needs to be inverted, the polarity can be changed on [AFGs](default:AFG). !!! warning - `generate_function()` allows function parameters which can exceed actual generation bounds. + `generate_function()` allows function parameters that can exceed actual generation bounds. `get_waveform_constraints()` should be used in tandem with `generate_function()`, or utilizing the constraints provided in [Signal Generators](#signal-generators). -The `setup_burst()` method places the signal generator into a state for waveforms to be generated a set number +The `setup_burst()` method places the signal generator in a state for waveforms to be generated a set number of times. All parameters passed into the method are functionally identical to `generate_function()`, besides `burst_count`. `burst_count` specifies how many cycles of the waveform are to be generated. !!! warning - `setup_burst()` will set parameters which can affect the signal generators behavior. Changing these parameters + `setup_burst()` will set parameters that can affect the signal generator's behavior. Changing these parameters manually will likely cause burst to stop functioning. `generate_burst()` writes a trigger to the signal generator, initiating the generation of a burst of waveforms. @@ -129,19 +132,19 @@ make sure that the parameters you will be supplying are not outside the bounds. The method only requires the desired waveform function (except on [AWGs](default:AWG)) to be provided. However, different aspects may need to be provided to get a more accurate representation of what can actually be generated. If no other inputs are provided, the smallest range of the attribute is chosen. -An [AWG's](default:AWG) signal path affects the range of the offset and amplitude. +For an [AWG](default:AWG), the signal path affects the range of the offset and amplitude. Higher frequencies on [AFGs](default:AFG) will lower the upper bound of the amplitude, -alongside the which impedance is set. +alongside which impedance is set. `set_waveform_properties()` is functionally identical to `generate_function()`, but does not turn the source channel off or on, nor will it stop or start an [AWG](default:AWG). ## Signal Generators -An overview of the different signal generators which are available in `tm_devices`. +An overview of the different signal generators that are available in `tm_devices`. This includes: -- Features unique to each which should be kept in mind. +- Features unique to each. - Constraints for each waveform parameter. --- @@ -164,7 +167,7 @@ classDiagram ``` -The TekScope series instruments are signal generators focused on waveform generation which operate on the Windows operating systems. +The TekScope series instruments are signal generators focused on waveform generation and operate on the Windows operating system. They accept communication through [USB](default:USB) and [TCPIP](default:TCPIP) interfaces. Requesting function generation on an [IAFG](default:IAFG) will initially turn it off. The frequency, offset, @@ -183,11 +186,11 @@ Setting up bursts of an [IAFG](default:IAFG) involves setting it to burst mode a [IAFGs](default:IAFG) are only accessible if the oscilloscope has the `AFG` license installed. !!! note - [IAFGs](default:IAFG) contain no waveform list, editable memory or user defined waveforms. This means arbitrary waveforms + [IAFGs](default:IAFG) contain no waveform list, editable memory, or user-defined waveforms. This means arbitrary waveforms must be loaded from the hard drive. !!! note - Some functions, like `SINC`, `GAUSSIAN`, `LORENTZ`, `ERISE`, `EDECAY` and `HAVERSINE` already have an inbuilt offset. + Some functions, like `SINC`, `GAUSSIAN`, `LORENTZ`, `ERISE`, `EDECAY`, and `HAVERSINE` already have an inbuilt offset. !!! note If the output termination matching is set to FIFTY instead of HIGHZ, then the offset and amplitude bounds will be halved. @@ -199,7 +202,7 @@ Setting up bursts of an [IAFG](default:IAFG) involves setting it to burst mode a ##### Constraints: -The amplitude and frequency range for the [IAFG](default:IAFG) varies based on the desired function. +The amplitude and frequency range for the [IAFG](default:IAFG) vary based on the desired function. These ranges are the same for each of the classes listed: [`MSO2`][tm_devices.drivers.pi.scopes.tekscope.mso2.MSO2] [`MSO4`][tm_devices.drivers.pi.scopes.tekscope.mso4.MSO4] @@ -249,7 +252,7 @@ classDiagram [AFGs](default:AFG) handle [function generation](#tekscope-internal-arbitrary-function-generators) identically to [IAFGs](default:IAFG) except for the order in which the parameters are set. -All functions which are shared by each [AFG](default:AFG) exist within the +All functions that are shared by each [AFG](default:AFG) exist within the [`AFG`][tm_devices.drivers.pi.signal_generators.afgs.afg.AFG] class. Setting up bursts of the [AFG](default:AFG) involves setting the trigger on the device to external, so the burst does not activate @@ -276,7 +279,7 @@ own class representations, corresponding to the ##### Constraints: -The amplitude, offset, and frequency range for AFG3Ks is extremely varied dependent on model number, frequency, and function. +The amplitude, offset, and frequency range for AFG3Ks are extremely varied, dependent on model number, frequency, and function. However, the sample rate of the entire AFG3K series is 250.0MS/s.