Documentation ¶
Overview ¶
Package dp800 implements the IVI driver for the Rigol DP800 series of programmable linear DC power supplies.
State Caching: Not implemented
Index ¶
- func AvailableCOMPorts() []string
- func DefaultGPIBAddress() int
- func DefaultSerialBaudRate() int
- func DefaultSerialDataFrame() string
- func SerialBaudRates() []int
- func SerialConfig() string
- func SerialDataFrames() []string
- func SerialEndMark() string
- type Channel
- func (ch *Channel) ConfigureCurrentLimit(behavior dcpwr.CurrentLimitBehavior, limit float64) error
- func (ch *Channel) ConfigureOVP(b bool, limit float64) error
- func (ch *Channel) ConfigureOutputRange(rt dcpwr.RangeType, rng float64) error
- func (ch *Channel) CurrentLimit() (float64, error)
- func (ch *Channel) CurrentLimitBehavior() (dcpwr.CurrentLimitBehavior, error)
- func (ch *Channel) DisableOVP() error
- func (ch *Channel) DisableOutput() error
- func (ch *Channel) EnableOVP() error
- func (ch *Channel) EnableOutput() error
- func (ch *Channel) Measure(msrType dcpwr.MeasurementType) (float64, error)
- func (ch *Channel) MeasureCurrent() (float64, error)
- func (ch *Channel) MeasureVoltage() (float64, error)
- func (ch *Channel) Name() string
- func (ch *Channel) OVPEnabled() (bool, error)
- func (ch *Channel) OVPLimit() (float64, error)
- func (ch *Channel) OutputEnabled() (bool, error)
- func (ch *Channel) QueryCurrentLimitMax(voltage float64) (float64, error)
- func (ch *Channel) QueryOutputState(os dcpwr.OutputState) (bool, error)
- func (ch *Channel) QueryVoltageLevelMax(currentLimit float64) (float64, error)
- func (ch *Channel) ResetOutputProtection() error
- func (ch *Channel) SetCurrentLimit(limit float64) error
- func (ch *Channel) SetCurrentLimitBehavior(behavior dcpwr.CurrentLimitBehavior) error
- func (ch *Channel) SetOVPEnabled(v bool) error
- func (ch *Channel) SetOVPLimit(limit float64) error
- func (ch *Channel) SetOutputEnabled(v bool) error
- func (ch *Channel) SetVoltageLevel(amp float64) error
- func (ch *Channel) VoltageLevel() (float64, error)
- type Device
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableCOMPorts ¶
func AvailableCOMPorts() []string
AvailableCOMPorts lists the avaialble COM ports, including optional ports.
func DefaultGPIBAddress ¶
func DefaultGPIBAddress() int
DefaultGPIBAddress lists the default GPIB interface address.
func DefaultSerialBaudRate ¶
func DefaultSerialBaudRate() int
DefaultSerialBaudRate returns the default baud rate for the RS-232 serial port.
func DefaultSerialDataFrame ¶
func DefaultSerialDataFrame() string
DefaultSerialDataFrame returns the default RS-232 data frame format.
func SerialBaudRates ¶
func SerialBaudRates() []int
SerialBaudRates lists the available baud rates for the RS-232 serial port from the fastest to the slowest.
func SerialConfig ¶
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 ¶
func SerialDataFrames() []string
SerialDataFrames lists the available RS-232 data frame formats.
func SerialEndMark ¶ added in v0.9.0
func SerialEndMark() string
SerialEndMark lists the end mark for commands sent over the RS-232 serial port.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel models the output channel repeated capabilitiy for the DC power supply output channel.
func (*Channel) ConfigureCurrentLimit ¶
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 ¶
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 ¶
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.
Some DC power supplies do not allow the user to explicitly specify an output’s range. Instead, they automatically change the range based on the values the user requests for the voltage level, OVP limit, and current limit. For instruments that automatically change the range, the ConfigureOutputRange function should perform range checking to verify that its input parameters are valid, but should not perform any communication with the instrument or set any attributes.
ConfigureOutputRange implements the IviDCPwrBase function described in Section 4.3.3 of IVI-4.4: IviDCPwr Class Specification.
func (*Channel) CurrentLimit ¶
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 ¶
DisableOVP is a convenience function for disabling Over-Voltage Protection (OVP). DisableOVP always returns nil for the E3631A since support OVP.
func (*Channel) DisableOutput ¶
DisableOutput is a convenience function for setting the Output Enabled attribute to false.
func (*Channel) EnableOVP ¶
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 ¶
EnableOutput is a convenience function for setting the Output Enabled attribute to true.
func (*Channel) Measure ¶ added in v0.11.0
func (ch *Channel) Measure(msrType dcpwr.MeasurementType) (float64, error)
func (*Channel) MeasureCurrent ¶
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 ¶
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 ¶
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 ¶
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 ¶
OutputEnabled determines if the given output channel is 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 Device ¶
Device provides the IVI driver for the Rigol DP800 series of DC power supplies.
func New ¶
func New(inst ivi.Instrument, reset bool) (*Device, error)
New creates a new Rigol DP800 IVI Instrument driver. 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 (*Device) ChannelCount ¶
ChannelCount returns the number of available output channels.
ChannelCount 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.