devices.electronicsmeasurements:BOSS
Class for controlling the Electronics Measurement Inc.
Usage
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
__init__(
interface,
**kwargs,
)Parameters
interface: str-
VISA resource name.
**kwargs: dict- Additional keyword arguments for VisaDevice.
getControl()
Get current control mode.
Usage
getControl()Returns
int- 0 for current mode, 1 for voltage mode.
getCurrent()
Get current amperage.
Usage
getCurrent()Returns
float- Current amperage in Amps.
getVoltage()
Get current voltage.
Usage
getVoltage()Returns
float- Current voltage in Volts.
id()
Get device identifier.
Usage
id()Returns
str- Device identifier.
query()
Send a command to the device and get the response.
Usage
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
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
setControl(mode)Parameters
mode: int- 0 for current mode, 1 for voltage mode.
setSource()
Set source value.
Usage
setSource(source)Parameters
source: float- Source value to set.
set_local()
Set device to local mode.
Usage
set_local()