key33220

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 5 Imported by: 4

Documentation

Overview

Package key33220 implements the IVI Instrument driver for the Agilent 33220A function generator.

State Caching: Not implemented

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableCOMPorts added in v0.6.1

func AvailableCOMPorts() []string

AvailableCOMPorts lists the avaialble COM ports, including optional ports.

func DefaultGPIBAddress added in v0.6.1

func DefaultGPIBAddress() int

DefaultGPIBAddress lists the default GPIB interface address.

func LANPorts added in v0.6.1

func LANPorts() map[string]int

LANPorts returns a map of the different ports with the key being the type of port.

Types

type Channel

type Channel struct {
	fgen.Channel
}

Channel represents a repeated capability of an output channel for the function generator.

func (*Channel) AbortGeneration added in v0.5.0

func (ch *Channel) AbortGeneration() error

AbortGeneration Aborts a previously initiated signal generation. If the function generator is in the Output Generation State, this function moves the function generator to the Configuration State. If the function generator is already in the Configuration State, the function does nothing and returns Success. AbortGeneration implements the IviFgenBase function described in Section 4.3 of IVI-4.3: IviFgen Class Specification.

func (*Channel) Amplitude

func (ch *Channel) Amplitude() (float64, error)

Amplitude reads the difference between the maximum and minimum waveform values, i.e., the peak-to-peak voltage value. Amplitude is the getter for the read-write IviFgenStdFunc Attribute Amplitude described in Section 5.2.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) BurstCount

func (ch *Channel) BurstCount() (int, error)

BurstCount returns the number of waveform cycles that the function generator produces after it receives a trigger. BurstCount is the getter for the read-write IviFgenBurst Attribute Burst Count described in Section 17.2.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) ConfigureStandardWaveform

func (ch *Channel) ConfigureStandardWaveform(wave fgen.StandardWaveform, amp float64,
	offset float64, freq float64, phase float64) error

ConfigureStandardWaveform configures the attributes of the function generator that affect standard waveform generation. ConfigureStandardWaveform is the method that implements the Configure Standard Waveform function described in Section 5.3.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) DCOffset

func (ch *Channel) DCOffset() (float64, error)

DCOffset reads the difference between the average of the maximum and minimum waveform values and the x-axis (0 volts). DCOffset is the getter for the read-write IviFgenStdFunc Attribute DC Offset described in Section 5.2.2 of IVI-4.3: IviFgen Class Specification.

func (*Channel) DisableOutput

func (ch *Channel) DisableOutput() error

DisableOutput is a convenience function for setting the Output Enabled attribute to false.

func (*Channel) DutyCycleHigh

func (ch *Channel) DutyCycleHigh() (float64, error)

DutyCycleHigh reads the percentage of time, specified as 0-100, during one cycle for which the square wave is at its high value. DutyCycle is the getter for the read-write IviFgenStdFunc Attribute Duty Cycle High described in Section 5.2.3 of IVI-4.3: IviFgen Class Specification.

func (*Channel) EnableOutput

func (ch *Channel) EnableOutput() error

EnableOutput is a convenience function for setting the Output Enabled attribute to true.

func (*Channel) Frequency

func (ch *Channel) Frequency() (float64, error)

Frequency reads the number of waveform cycles generated in one second (i.e., Hz). Frequency is not applicable for a DC waveform. Frequency is the getter for the read-write IviFgenStdFunc Attribute Frequency described in Section 5.2.4 of IVI-4.3: IviFgen Class Specification.

func (*Channel) InternalTriggerPeriod

func (ch *Channel) InternalTriggerPeriod() (float64, error)

InternalTriggerPeriod determines the internal trigger period in seconds. InternalTriggerPeriod is not part of the IVI API, which only provides InternalTriggerRate, but this is a convenience function.

func (*Channel) InternalTriggerRate

func (ch *Channel) InternalTriggerRate() (float64, error)

InternalTriggerRate determines the rate at which the function generator's internal trigger source produces a trigger in triggers per second. InternalTriggerRate is the getter for the read-write IviFgenInternalTrigger Attribute Internal Trigger Rate described in Section 15.2.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) OperationMode

func (ch *Channel) OperationMode() (fgen.OperationMode, error)

OperationMode determines whether the function generator should produce a continuous or burst output on the channel. OperationMode implements the getter for the read-write IviFgenBase Attribute Operation Mode described in Section 4.2.2 of IVI-4.3: IviFgen Class Specification.

func (*Channel) OutputEnabled

func (ch *Channel) OutputEnabled() (bool, error)

OutputEnabled determines if the output channel is enabled or disabled. OutputEnabled is the getter for the read-write IviFgenBase Attribute Output Enabled described in Section 4.2.3 of IVI-4.3: IviFgen Class Specification.

func (*Channel) OutputImpedance

func (ch *Channel) OutputImpedance() (float64, error)

OutputImpedance return the output channel's impedance in ohms. OutputImpedance is the getter for the read-write IviFgenBase Attribute Output Impedance described in Section 4.2.4 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetAmplitude

func (ch *Channel) SetAmplitude(amp float64) error

SetAmplitude specifies the difference between the maximum and minimum waveform values, i.e., the peak-to-peak voltage value. Amplitude is the setter for the read-write IviFgenStdFunc Attribute Amplitude described in Section 5.2.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetBurstCount

func (ch *Channel) SetBurstCount(count int) error

SetBurstCount sets the number of waveform cycles that the function generator produces after it receives a trigger. SetBurstCount is the setter for the read-write IviFgenBurst Attribute Burst Count described in Section 17.2.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetDCOffset

func (ch *Channel) SetDCOffset(amp float64) error

SetDCOffset sets the difference between the average of the maximum and minimum waveform values and the x-axis (0 volts). SetDCOffset is the setter for the read-write IviFgenStdFunc Attribute DC Offset described in Section 5.2.2 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetDutyCycleHigh

func (ch *Channel) SetDutyCycleHigh(duty float64) error

SetDutyCycleHigh sets the percentage of time, specified as 0-100, during one cycle for which the square wave is at its high value. SetDutyCycle is the setter for the read-write IviFgenStdFunc Attribute Duty Cycle High described in Section 5.2.3 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetFrequency

func (ch *Channel) SetFrequency(freq float64) error

SetFrequency sets the number of waveform cycles generated in one second (i.e., Hz). Frequency is not applicable for a DC waveform. SetFrequency is the setter for the read-write IviFgenStdFunc Attribute Frequency described in Section 5.2.4 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetInternalTriggerPeriod

func (ch *Channel) SetInternalTriggerPeriod(period float64) error

SetInternalTriggerPeriod specifies the internal trigger period in seconds. SetInternalTriggerPeriod is not part of the IVI API, which only provides SetInternalTriggerRate, but this is a convenience function.

func (*Channel) SetInternalTriggerRate

func (ch *Channel) SetInternalTriggerRate(rate float64) error

SetInternalTriggerRate specifies the rate at which the function generator's internal trigger source produces a trigger in triggers per second. SetInternalTriggerRate is the setter for the read-write IviFgenInternalTrigger Attribute Internal Trigger Rate described in Section 15.2.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetOperationMode

func (ch *Channel) SetOperationMode(mode fgen.OperationMode) error

SetOperationMode specifies whether the function generator should produce a continuous or burst output on the channel. SetOperationMode implements the setter for the read-write IviFgenBase Attribute Operation Mode described in Section 4.2.2 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetOutputEnabled

func (ch *Channel) SetOutputEnabled(b bool) error

SetOutputEnabled sets the output channel to enabled or disabled. SetOutputEnabled is the setter for the read-write IviFgenBase Attribute Output Enabled described in Section 4.2.3 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetOutputImpedance

func (ch *Channel) SetOutputImpedance(impedance float64) error

SetOutputImpedance sets the output channel's impedance in ohms. SetOutputImpedance is the setter for the read-write IviFgenBase Attribute Output Impedance described in Section 4.2.3 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetStandardWaveform

func (ch *Channel) SetStandardWaveform(wave fgen.StandardWaveform) error

SetStandardWaveform specifies which standard waveform the function generator produces. SetStandardWaveform is the setter for the read-write IviFgenStdFunc Attribute Waveform described in Section 5.2.6 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetStartPhase added in v0.5.1

func (ch *Channel) SetStartPhase(freq float64) error

SetStartPhase writes the start phase of the standard waveform the function generator produces. When the Waveform attribute is set to Waveform DC, this attribute does not affect signal output. The units are degrees. StartPhase is the getter for the read-write IviFgenStdFunc Attribute Start Phase described in Section 5.2.5 of IVI-4.3: IviFgen Class Specification.

func (*Channel) SetTriggerSource

func (ch *Channel) SetTriggerSource(src fgen.TriggerSource) error

SetTriggerSource specifies the trigger srouce. SetTriggerSource is the setter for the read-write IviFgenTrigger Attribute Trigger Source described in Section 9.2.1 of IVI-4.3: IviFgen Class Specification.

func (*Channel) StandardWaveform

func (ch *Channel) StandardWaveform() (fgen.StandardWaveform, error)

StandardWaveform determines if one of the IVI Standard Waveforms is being output by the function generator. If not, an error is returned. StandardWaveform is the getter for the read-write IviFgenStdFunc Attribute Waveform described in Section 5.2.6 of IVI-4.3: IviFgen Class Specification.

func (*Channel) StartPhase added in v0.5.1

func (ch *Channel) StartPhase() (float64, error)

StartPhase reads the start phase of the standard waveform the function generator produces. When the Waveform attribute is set to Waveform DC, this attribute does not affect signal output. The units are degrees. StartPhase is the getter for the read-write IviFgenStdFunc Attribute Start Phase described in Section 5.2.5 of IVI-4.3: IviFgen Class Specification.

func (*Channel) TriggerSource

func (ch *Channel) TriggerSource() (fgen.TriggerSource, error)

TriggerSource determines the trigger srouce. TriggerSource is the getter for the read-write IviFgenTrigger Attribute Trigger Source described in Section 9.2.1 of IVI-4.3: IviFgen Class Specification.

type Key33220 added in v0.5.1

type Key33220 struct {
	Channels []Channel
	ivi.Inherent
	// contains filtered or unexported fields
}

Key33220 provides the IVI driver for an Agilent 33220A or 33210A function generator.

func New

func New(inst ivi.Instrument, reset bool) (Key33220, error)

New creates a new Key33220 IVI Instrument.

func (*Key33220) OutputCount added in v0.5.1

func (a *Key33220) OutputCount() int

OutputCount returns the number of available output channels. OutputCount is the getter for the read-only IviFgenBase Attribute Output Count described in Section 4.2.1 of IVI-4.3: IviFgen Class Specification.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL