devices.kepco:BOP5020mg

The device class for the Kepco BOP 50-20MG power supply.

Usage

Source

devices.kepco:BOP5020mg(
    interface,
    **kwargs,
)

It can possibly be used with different models with little changes.

Methods

Name Description
__init__() Initialize the BOP5020mg device.
getCurrent() Get the actual current at the device output.
getCurrentSetting() Get the programmed value of current at the device output.
getVoltage() Get the actual voltage at the device output.
setCurrent() Set the output current in A.
setCurrentProtection() Set the output protection current in A.
setCurrentWait() Set the output current in A so the actual one is within tolerance.
setMode() Set the output mode to current or voltage.
setOutput() Set the output current ON or OFF.
setRemote() Set the device to remote mode.
setVoltage() Set the output voltage in V.
setVoltageProtection() Set the output protection voltage in V.

__init__()

Initialize the BOP5020mg device.

Usage

Source

__init__(
    interface,
    **kwargs,
)

Parameters

interface: str

VISA resource name for the device

**kwargs: dict
Additional keyword arguments to pass to the VISA device

getCurrent()

Get the actual current at the device output.

Usage

Source

getCurrent()

Returns

float
Actual current in A

getCurrentSetting()

Get the programmed value of current at the device output.

Usage

Source

getCurrentSetting()

Returns

float
Set current in A

getVoltage()

Get the actual voltage at the device output.

Usage

Source

getVoltage()

Returns

float
Actual voltage in V

setCurrent()

Set the output current in A.

Usage

Source

setCurrent(current)

Parameters

current: float
Output current in A

setCurrentProtection()

Set the output protection current in A.

Usage

Source

setCurrentProtection(
    voltage,
    resistance=0.8,
)

Calculates the current from the applied voltage and the total resistance of the electromagnet.

Parameters

voltage: float

Output voltage in V

resistance: float = 0.8
Total resistance of the electromagnet in Ohm, default is 0.8

setCurrentWait()

Set the output current in A so the actual one is within tolerance.

Usage

Source

setCurrentWait(
    current,
    tolerance=0.4,
)

Adjusts the current incrementally until the desired value is reached.

Parameters

current: float

Output current in A

tolerance: float = 0.4
Tolerance for the actual current in A, default is 0.4

setMode()

Set the output mode to current or voltage.

Usage

Source

setMode(mode)

Parameters

mode: str
Takes “current” or “voltage” as input

setOutput()

Set the output current ON or OFF.

Usage

Source

setOutput(output=None)

Parameters

output: bool = None
True for ON, False for OFF

setRemote()

Set the device to remote mode.

Usage

Source

setRemote()

setVoltage()

Set the output voltage in V.

Usage

Source

setVoltage(voltage)

Parameters

voltage: float
Output voltage in V

setVoltageProtection()

Set the output protection voltage in V.

Usage

Source

setVoltageProtection(
    current,
    resistance=0.8,
)

Calculates the voltage from the applied current and the total resistance of the electromagnet.

Parameters

current: float

Output current in A

resistance: float = 0.8
Total resistance of the electromagnet in Ohm, default is 0.8