devices.electronicsmeasurements:BOSS

Class for controlling the Electronics Measurement Inc.

Usage

Source

devices.electronicsmeasurements:BOSS(
    interface,
    **kwargs,
)

BOSS-20-5 power supply.

Methods

Name Description
__init__() Initialize BOSS device.
getControl() Get current control mode.
getCurrent() Get current amperage.
getVoltage() Get current voltage.
id() Get device identifier.
query() Send a command to the device and get the response.
read_very_eager() Read all available data from device buffer.
setControl() Set control mode.
setSource() Set source value.
set_local() Set device to local mode.

__init__()

Initialize BOSS device.

Usage

Source

__init__(
    interface,
    **kwargs,
)

Parameters

interface: str

VISA resource name.

**kwargs: dict
Additional keyword arguments for VisaDevice.

getControl()

Get current control mode.

Usage

Source

getControl()

Returns

int
0 for current mode, 1 for voltage mode.

getCurrent()

Get current amperage.

Usage

Source

getCurrent()

Returns

float
Current amperage in Amps.

getVoltage()

Get current voltage.

Usage

Source

getVoltage()

Returns

float
Current voltage in Volts.

id()

Get device identifier.

Usage

Source

id()

Returns

str
Device identifier.

query()

Send a command to the device and get the response.

Usage

Source

query(
    msg,
    attempts=0,
)

Parameters

msg: str

Command to send.

attempts: int = 0
Number of retry attempts.

Returns

str
Device response.

Raises

OSError
If too many attempts to query.

read_very_eager()

Read all available data from device buffer.

Usage

Source

read_very_eager(attempts=0)

Parameters

attempts: int = 0
Number of retry attempts.

Returns

str
Data read from device buffer.

Raises

OSError
If too many attempts to read eagerly.

setControl()

Set control mode.

Usage

Source

setControl(mode)

Parameters

mode: int
0 for current mode, 1 for voltage mode.

setSource()

Set source value.

Usage

Source

setSource(source)

Parameters

source: float
Source value to set.

set_local()

Set device to local mode.

Usage

Source

set_local()