Documentation ¶
Overview ¶
Package ds345 implements the IVI driver for the Stanford Research System DS345 function generator.
State Caching: Not implemented
Index ¶
- type Channel
- func (ch *Channel) Amplitude() (float64, error)
- func (ch *Channel) BurstCount() (int, error)
- func (ch *Channel) ConfigureStandardWaveform(wave fgen.StandardWaveform, amp float64, offset float64, freq float64, ...) error
- func (ch *Channel) DCOffset() (float64, error)
- func (ch *Channel) DisableOutput() error
- func (ch *Channel) DutyCycle() (float64, error)
- func (ch *Channel) EnableOutput() error
- func (ch *Channel) Frequency() (float64, error)
- func (ch *Channel) InternalTriggerRate() (float64, error)
- func (ch *Channel) OperationMode() (fgen.OperationMode, error)
- func (ch *Channel) OutputEnabled() (bool, error)
- func (ch *Channel) OutputImpedance() (float64, error)
- func (ch *Channel) SetAmplitude(amp float64) error
- func (ch *Channel) SetBurstCount(count int) error
- func (ch *Channel) SetDCOffset(amp float64) error
- func (ch *Channel) SetDutyCycle(duty float64) error
- func (ch *Channel) SetFrequency(freq float64) error
- func (ch *Channel) SetInternalTriggerRate(rate float64) error
- func (ch *Channel) SetOperationMode(mode fgen.OperationMode) error
- func (ch *Channel) SetOutputEnabled(v bool) error
- func (ch *Channel) SetOutputImpedance(impedance float64) error
- func (ch *Channel) SetStandardWaveform(wave fgen.StandardWaveform) error
- func (ch *Channel) SetTriggerSource(src fgen.TriggerSource) error
- func (ch *Channel) StandardWaveform() (fgen.StandardWaveform, error)
- func (ch *Channel) TriggerSource() (fgen.TriggerSource, error)
- type DS345
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
Channel represents a repeated capability of an output channel for the function generator.
func (*Channel) Amplitude ¶
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 ¶
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 ¶
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 ¶
DisableOutput is a convenience function for setting the Output Enabled attribute to false.
func (*Channel) DutyCycle ¶
DutyCycle 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 ¶
EnableOutput is a convenience function for setting the Output Enabled attribute to true.
func (*Channel) Frequency ¶
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) InternalTriggerRate ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) SetDutyCycle ¶
SetDutyCycle 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 ¶
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) SetInternalTriggerRate ¶
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 ¶
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 ¶
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) 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) 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 DS345 ¶
DS345 provides the IVI driver for a SRS DS345 function generator.
func New ¶
func New(inst ivi.Instrument, reset bool) (*DS345, error)
New creates a new DS345 IVI Instrument.
func (*DS345) OutputCount ¶
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.