e36xx

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package e36xx implements the IVI driver for the Agilent/Keysight E3600 series of power supplies.

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 DefaultSerialBaudRate added in v0.6.1

func DefaultSerialBaudRate() int

DefaultSerialBaudRate returns the default baud rate for the RS-232 serial port.

func DefaultSerialDataFrame added in v0.6.1

func DefaultSerialDataFrame() string

DefaultSerialDataFrame returns the default RS-232 data frame format.

func SerialBaudRates added in v0.6.1

func SerialBaudRates() []int

SerialBaudRates lists the available baud rates for the RS-232 serial port from the fastest to the slowest.

func SerialConfig added in v0.6.1

func SerialConfig() string

SerialConfig lists whether the RS-232 serial port is configured as a DCE (Data Circuit-Terminating Equipment) or a DTE (Data Terminal Equipment). Computers running the IVI program are DTEs; therefore, use a straight through serial cable when connecting to DCEs and a null modem cable when connecting to DTEs.

func SerialDataFrames added in v0.6.1

func SerialDataFrames() []string

SerialDataFrames lists the available RS-232 data frame formats.

Types

type Channel

type Channel struct {
	dcpwr.Channel
}

Channel models an E36xx DC power supply output channel.

func (*Channel) ConfigureCurrentLimit added in v0.6.1

func (ch *Channel) ConfigureCurrentLimit(behavior dcpwr.CurrentLimitBehavior, limit float64) error

ConfigureCurrentLimit configures the current limit. It specifies the output current limit value and the behavior of the power supply when the output current is greater than or equal to that value.

ConfigureCurrentLimit implements the IviDCPwrBase function described in Section 4.3.1 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) ConfigureOVP added in v0.6.1

func (ch *Channel) ConfigureOVP(b bool, limit float64) error

ConfigureOVP configures the Over-Voltage Protection (OVP). It specifies the over-voltage limit and the behavior of the power supply when the output voltage is greater than or equal to that value. When the Enabled parameter is False, the Limit parameter does not affect the instrument’s behavior, and the driver does not set the OVP Limit attribute.

ConfigureOVP implements the IviDCPwrBase function described in Section 4.3.4 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) ConfigureOutputRange added in v0.6.1

func (ch *Channel) ConfigureOutputRange(rt dcpwr.RangeType, rng float64) error

ConfigureOutputRange configures either the power supply’s output voltage or current range on an output. Setting a voltage range can invalidate a previously configured current range. Setting a current range can invalidate a previously configured voltage range.

ConfigureOutputRange implements the IviDCPwrBase function described in Section 4.3.3 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) CurrentLimit

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

CurrentLimit determines the output current limit. The units are Amps.

CurrentLimit implements the getter for the read-write IviDCPwrBase Attribute Current Limit described in Section 4.2.1 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) CurrentLimitBehavior

func (ch *Channel) CurrentLimitBehavior() (dcpwr.CurrentLimitBehavior, error)

CurrentLimitBehavior determines the behavior of the power supply when the output current is equal to or greater than the value of the Current Limit attribute. The E3631A only supports the CurrentRegulate behavior.

CurrentLimitBehavior implements the getter for the read-write IviDCPwrBase Attribute Current Limit Behavior described in Section 4.2.2 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) DisableOVP added in v0.6.1

func (ch *Channel) DisableOVP() error

DisableOVP is a convenience function for disabling Over-Voltage Protection (OVP). DisableOVP always returns nil for the E3631A since support OVP.

func (*Channel) DisableOutput

func (ch *Channel) DisableOutput() error

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

func (*Channel) EnableOVP added in v0.6.1

func (ch *Channel) EnableOVP() error

EnableOVP is a convenience function for enabling Over-Voltage Protection (OVP). EnableOVP always returns an error for the E3631A since support OVP.

func (*Channel) EnableOutput

func (ch *Channel) EnableOutput() error

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

func (*Channel) MeasureCurrent

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

MeasureCurrent takes a measurement on the output signal and returns the measured current.

MeasureCurrent implements the IviDCPwrMeasurement function Measure for the Current MeasurementType parameter described in Section 7.2.1 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) MeasureVoltage

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

MeasureVoltage takes a measurement on the output signal and returns the measured voltage.

MeasureVoltage implements the IviDCPwrMeasurement function Measure for the Voltage MeasurementType parameter described in Section 7.2.1 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) OVPEnabled

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

OVPEnabled always returns false for the E3631A since it doesn't have OVP.

OVPEnabled is the getter for the read-write IviFgenBase Attribute OVP Enabled described in Section 4.2.4 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) OVPLimit

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

OVPLimit returns an error, since the E3631A doesn't support Over-Voltage Protection (OVP).

OVPLimit is the getter for the read-write IviDWPwrBase Attribute OVP Limit described in Section 4.2.5 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) OutputEnabled

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

OutputEnabled determines if all three output channels are enabled or disabled.

OutputEnabled is the getter for the read-write IviDCPwrBase Attribute Output Enabled described in Section 4.2.3 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) QueryCurrentLimitMax added in v0.6.1

func (ch *Channel) QueryCurrentLimitMax(voltage float64) (float64, error)

QueryCurrentLimitMax returns the maximum programmable current limit that the power supply accepts for a particular voltage level on an output.

QueryCurrentLimitMax implements the IviDCPwrBase function described in Section 4.3.7 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) QueryOutputState added in v0.6.1

func (ch *Channel) QueryOutputState(os dcpwr.OutputState) (bool, error)

QueryOutputState returns whether the power supply is in a particular output state.

QueryOutputState implements the IviDCPwrBase function described in Section 4.3.9 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) QueryVoltageLevelMax added in v0.6.1

func (ch *Channel) QueryVoltageLevelMax(currentLimit float64) (float64, error)

QueryVoltageLevelMax returns the maximum programmable voltage level that the power supply accepts for a particular current limit on an output.

QueryVoltageLevelMax implements the IviDCPwrBase function described in Section 4.3.8 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) ResetOutputProtection added in v0.6.1

func (ch *Channel) ResetOutputProtection() error

ResetOutputProtection resets the power supply output protection after an over-voltage or over-current condition occurs.

ResetOutputProtection implements the IviDCPwrBase function described in Section 4.3.10 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) SetCurrentLimit

func (ch *Channel) SetCurrentLimit(limit float64) error

SetCurrentLimit specifies the output current limit in Amperes.

SetCurrentLimit implements the setter for the read-write IviDCPwrBase Attribute Current Limit described in Section 4.2.1 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) SetCurrentLimitBehavior

func (ch *Channel) SetCurrentLimitBehavior(behavior dcpwr.CurrentLimitBehavior) error

SetCurrentLimitBehavior specifies the behavior of the power supply when the output current is equal to or greater than the value of the current limit attribute. The E3631A only supports the CurrentRegulate behavior, so attempting to set CurrentTrip will result in an error.

CurrentLimitBehavior implements the getter for the read-write IviDCPwrBase Attribute Current Limit Behavior described in Section 4.2.2 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) SetOVPEnabled

func (ch *Channel) SetOVPEnabled(v bool) error

SetOVPEnabled always returns an error for the E3631A since it doesn't have Over-Voltage Protection (OVP).

SetOVPEnabled is the setter for the read-write IviFgenBase Attribute OVP Enabled described in Section 4.2.4 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) SetOVPLimit

func (ch *Channel) SetOVPLimit(limit float64) error

SetOVPLimit returns an error since the E3631A doesn't support Over-Voltage Protection (OVP).

SetOVPLimit is the setter for the read-write IviDCPwrBase Attribute OVP Limit described in Section 4.2.5 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) SetOutputEnabled

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

SetOutputEnabled sets all three output channels to enabled or disabled.

SetOutputEnabled is the setter for the read-write IviDCPwrBase Attribute Output Enabled described in Section 4.2.3 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) SetVoltageLevel

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

SetVoltageLevel specifies the voltage level the DC power supply attempts to generate in Volts.

SetVoltageLevel is the setter for the read-write IviDCPwrBase Attribute Voltage Level described in Section 4.2.6 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) VoltageLevel

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

VoltageLevel reads the specified voltage level the DC power supply attempts to generate in Volts.

VoltageLevel is the getter for the read-write IviDCPwrBase Attribute Voltage Level described in Section 4.2.6 of IVI-4.4: IviDCPwr Class Specification.

type E36xx

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

E36xx provides the IVI driver for the Agilent/Keysight E3600 series of power supplies.

func New

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

New creates a new AgilentE36xx IVI Instrument driver. Currently, only the E3631A model is supported, but in the future as other models are added, the New function will query the instrument to determine the model and ensure it is one of the supported models. If reset is true, then the instrument is reset.

func (*E36xx) OutputCount

func (dev *E36xx) OutputCount() int

OutputCount returns the number of available output channels.

OutputCount is the getter for the read-only IviDCPwrBase Attribute Output Channel Count described in Section 4.2.7 of IVI-4.4: IviDCPwr Class Specification.

Jump to

Keyboard shortcuts

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