dcpwr

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: 3 Imported by: 1

Documentation

Overview

Package dcpwr provides the Defined Values and other structs, methods, etc. that are common among all intstruments meeting the IVI-4.4: IviDCPwr Class Specification.

Files are split based on the class capability groups.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented error = errors.New("not implemented in ivi driver")
	ErrOVPUnsupported error = errors.New("ovp not supported")
)

Error codes related to the IviDCPwr Class Specification.

Functions

This section is empty.

Types

type Base added in v0.6.1

type Base interface {
	// Channels() ([]*BaseChannel, error)
	// Channel(name string) (*BaseChannel, error)
	// ChannelByID(id int) (*BaseChannel, error)
	// ChannelCount() int
	OutputCount() int
}

Base provides the interface required for the IviDCPwrBase capability group.

type BaseChannel added in v0.6.1

type BaseChannel interface {
	CurrentLimit() (float64, error)
	SetCurrentLimit(limit float64) error
	CurrentLimitBehavior() (CurrentLimitBehavior, error)
	SetCurrentLimitBehavior(behavior CurrentLimitBehavior) error
	OutputEnabled() (bool, error)
	SetOutputEnabled(b bool) error
	DisableOutput() error
	EnableOutput() error
	OVPEnabled() (bool, error)
	SetOVPEnabled(b bool) error
	DisableOVP() error
	EnableOVP() error
	VoltageLevel() (float64, error)
	SetVoltageLevel(level float64) error
	ConfigureCurrentLimit(behavior CurrentLimitBehavior, limit float64) error
	ConfigureOutputRange(rt RangeType, rng float64) error
	ConfigureOVP(b bool, limit float64) error
	QueryCurrentLimitMax(voltage float64) (float64, error)
	QueryVoltageLevelMax(currentLimit float64) (float64, error)
	QueryOutputState(os OutputState) (bool, error)
	ResetOutputProtection() error
}

BaseChannel provides the interface for the channel repeated capability for the IviDCPwrBase capability group.

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

Channel represents the repeated capability of an output channel for a DC power supply.

func NewChannel

func NewChannel(id int, name string, inst ivi.Instrument) Channel

NewChannel returns a Channel for a DC power supply.

func (*Channel) Name

func (ch *Channel) Name() string

Name returns the name of the output channel. Name is the getter for the read-only IviDCPwrBase Attribute Output Channel Name described in Section 4.2.9 of IVI-4.4: IviDCPwr Class Specification.

func (*Channel) QueryBool

func (ch *Channel) QueryBool(cmd string) (bool, error)

QueryBool queries the channel and returns a bool.

func (*Channel) QueryFloat64

func (ch *Channel) QueryFloat64(cmd string) (float64, error)

QueryFloat64 queries the channel and returns a float64.

func (*Channel) QueryString

func (ch *Channel) QueryString(cmd string) (string, error)

QueryString queries the channel and returns a string. FIXME(mdr): Change to take a format string and ...interface{}

func (*Channel) Set

func (ch *Channel) Set(format string, a ...interface{}) error

Set takes the same inputs as fmt.Sprintf() and writes the resultant command to the IVI device.

func (*Channel) String

func (ch *Channel) String() string

String implements the stringer interface for channel.

type CurrentLimitBehavior

type CurrentLimitBehavior int

CurrentLimitBehavior provides the defined values for the Current Limit Behavior defined in Section 4.2.2 of IVI-4.4: IviDCPwr Class Specification.

const (
	CurrentTrip CurrentLimitBehavior = iota
	CurrentRegulate
)

CurrentTrip and CurrentRegulate are the available Current Limit Behaviors. In CurrentTrip behavior, the power supply disables the output when the output current is equal to or greater than the value of the Current Limit attribute. In CurrentRegulate behavior, the power supply restricts the output voltage such that the output current is not greater than the value of the Current Limit attribute.

type Measurement added in v0.6.1

type Measurement interface {
}

Measurement provides the interface required for the IviDCPwrMeasurement capability group.

type MeasurementChannel added in v0.6.1

type MeasurementChannel interface {
	MeasureVoltage() (float64, error)
	MeasureCurrent() (float64, error)
}

MeasurementChannel provides the interface for the channel repeated capability for the IviDCPwrMeasurement capability group.

type OutputState added in v0.6.1

type OutputState int

OutputState provides the defined values for the state of the output defined in Section 4.3.9 of IVI-4.4: IviDCPwr Class Specification.

const (
	ConstantVoltage OutputState = iota
	ConstantCurrent
	OverVoltage
	OverCurrent
	Unregulated
)

Available output states that can be queried.

type RangeType added in v0.6.1

type RangeType int

RangeType provides the defined values for the Output Range Type defined in Section 4.3.3 of IVI-4.4: IviDCPwr Class Specification.

const (
	VoltageRange RangeType = iota
	CurrentRange
)

Available range types. In VoltageRange, the voltage range is set by the Range parameter. In CurrentRange, the current range is set by the Range parameter.

Directories

Path Synopsis
keysight
e36xx
Package e36xx implements the IVI driver for the Agilent/Keysight E3600 series of power supplies.
Package e36xx implements the IVI driver for the Agilent/Keysight E3600 series of power supplies.
kikusui
pmx
Package pmx implements the IVI driver for the KIKUSUI PMX series of regulated DC power supplies.
Package pmx implements the IVI driver for the KIKUSUI PMX series of regulated DC power supplies.

Jump to

Keyboard shortcuts

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