Documentation ¶
Overview ¶
Package pmx implements the IVI driver for the KIKUSUI PMX series of regulated DC power supplies.
State Caching: Not implemented
Index ¶
- type Channel
- func (ch *Channel) ConfigureCurrentLimit(behavior dcpwr.CurrentLimitBehavior, limit float64) error
- func (ch *Channel) ConfigureOVP(enabled 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) MeasureCurrent() (float64, error)
- func (ch *Channel) MeasureVoltage() (float64, error)
- 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(level float64) error
- func (ch *Channel) VoltageLevel() (float64, error)
- type Device
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 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 Configure Current Limit function described in Section 4.3.1 of IVI-4.4: IviDCPwr Class Specification.
func (*Channel) ConfigureOVP ¶
ConfigureOVP specifies the over-voltage limit and the behavior of the power supply when the output voltage is greater than or equal to that value.
ConfigureOVP implements the IviDCPwrBase Configure OVP function described in Section 4.3.4 of IVI-4.4: IviDCPwr Class Specification.
func (*Channel) ConfigureOutputRange ¶ added in v0.6.1
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 ¶ added in v0.6.1
DisableOVP is a convenience function for disabling Over-Voltage Protection (OVP).
func (*Channel) DisableOutput ¶
DisableOutput is a convenience function for setting the Output Enabled attribute to false.
func (*Channel) EnableOVP ¶ added in v0.6.1
EnableOVP is a convenience function for enabling Over-Voltage Protection (OVP).
func (*Channel) EnableOutput ¶
EnableOutput is a convenience function for setting the Output Enabled attribute to true.
func (*Channel) MeasureCurrent ¶
MeasureCurrent takes a measurement of 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 specifies whether the power supply provides Over-Voltage Protection (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 the current Over-Voltage Protection (OVP) value.
OPVLimit 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 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
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
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
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. Since the PMX series always has the OCP enabled, if the current limit behavior is set to regulate, the OCP is set to MAX (110% of the max current value of the device). Whereas, setting the current limit behavior to trip, the OCP is set equal to the current limit.
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 enables or disables the Over-Voltage Protection (OVP). Since the OVP is always enabled on the PMX power supply, if false, the PMX's OVP is set to its maximum value, which is 110% of the maximum output voltage. voltage protection set.
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 specifies the voltage the power supply allows. The units are Volts. If the OVP Enabled attribute is set to True, the power supply disables the output when the output voltage is greater than or equal to the value of this attribute. If the OVP Enabled is set to False, this attribute does not affect the behavior of the instrument.
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. The units are 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. The units are 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 ¶ added in v0.7.0
Device provides the IVI driver for the Kikusui PMX series of DC power supplies.
func New ¶
func New(inst ivi.Instrument, reset bool) (*Device, error)
New creates a new PMX IVI Instrument. 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 (*Device) ChannelCount ¶ added in v0.7.0
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.