BK_Precision.Load

BK Precision DC Loads

Code author: Kevin Kennedy <protonyx@users.noreply.github.com>

Connection Instructions

The BK Precision 8500 Series DC Loads must be connected to a PC through a USB-to-Serial adapter. BK Precision also recommends using an RS-232-to-TTL isolated pass-through to protect the serial interface on the instrument.

These devices also use a custom communication protocol that does not support enumeration. In order to use the device, this driver must be loaded to the proper serial port before use. Once the driver is loaded, the device will be placed into Remote Control mode.

Driver

You may need to install a driver for the USB-to-Serial adapter. Follow the instructions from the device vendor’s website.

BK Precision provides a device for communicating with this class of DC load: IT-132 USB-to-Serial Adapter. The driver for this device can be found here

class labtronyx.drivers.BK_Precision.Load.d_85XX(resource, **kwargs)[source]

Driver for BK Precision 8500 Series DC Loads

Adapted from reference code provided by BK Precision

disableLocalControl()[source]

Disable local control of the load. User will be unable to control load functions using the front panel.

disableRemoteSense()[source]

Disable remote sensing

enableLocalControl()[source]

Enable local control of the load

enableRemoteSense(enabled=0)[source]

Enable remote sensing

getBatteryTestVoltage()[source]

Gets the battery test voltage

Returns:float
getCurrent()[source]

Gets the constant current mode’s current level

Returns:float
getFunction()[source]

Get the function (type of operation) of the load

Returns:str
getInputValues()[source]

Returns voltage in V, current in A, and power in W, op_state byte, and demand_state byte.

Returns:list: [voltage, current, power, op_state, demand_state]
getLastStatus()[source]

Get the last command response status

Returns:int
getLoadOnTimer()[source]

Gets the time in seconds that the load will be on

Returns:int
getLoadOnTimerState()[source]

Gets the LOAD ON timer state

Returns:int
getMaxCurrent()[source]

Returns the maximum current the load will sink

Returns:float
getMaxPower()[source]

Gets the maximum power the load will allow

Returns:float
getMaxVoltage()[source]

Gets the maximum voltage the load will allow

Returns:float
getMode()[source]

Gets the operating mode

Possible values:

  • cc: Constant Current
  • cv: Constant Voltage
  • cw: Constant Power
  • cr: Constant Resistance
Returns:str
getPower()[source]

Gets the constant power mode’s power level

Returns:float
getRemoteSense()[source]

Get the state of remote sensing

Returns:int (0: Disabled, 1: Enabled)
getResistance()[source]

Gets the constant resistance mode’s resistance level

Returns:float
getTerminalCurrent()[source]

Returns the terminal current in Amps

Returns:float
getTerminalPower()[source]

Returns the terminal power in Watts

Returns:float
getTerminalVoltage()[source]

Returns the terminal voltage in Volts

Returns:float
getTransient(mode)[source]

Gets the transient mode settings

Returns:tuple (Amplitude A, Width A, Amplitude B, Width B, Mode)
getTriggerSource()[source]

Get how the instrument will be triggered

Returns:str
getVoltage()[source]

Gets the constant voltage mode’s voltage level

Returns:float
powerOff()[source]

Turns the load off

powerOn()[source]

Turns the load on

recallSettings(register=0)[source]

Restore instrument settings from a register

saveSettings(register=0)[source]

Save instrument settings to a register

setBatteryTestVoltage(min_voltage)[source]

Sets the battery test voltage

Parameters:min_voltage (float) – Minimum Voltage (volts)
setCurrent(current)[source]

Sets the constant current mode’s current level

Parameters:current (float) – Current in Amps
setFunction(function='fixed')[source]

Set the function (type of operation) of the load.

Parameters:function (str) – Function (“fixed”, “short”, “transient”, “list” or “battery”)
setLoadOnTimer(time_in_s)[source]

Sets the time in seconds that the load will be on

Parameters:time_in_s (int) – Time (in seconds)
setLoadOnTimerState(enabled=0)[source]

Enables or disables the LOAD ON timer state

Parameters:enabled (int) – Timer State (0: Disabled, 1: Enabled)
setLocalControl()[source]

Sets the load to local control

setMaxCurrent(current)[source]

Sets the maximum current the load will sink

Parameters:current (float) – Current in Amps
setMaxPower(power)[source]

Sets the maximum power the load will allow

Parameters:power (float) – Power in Watts
setMaxVoltage(voltage)[source]

Sets the maximum voltage the load will allow

Parameters:voltage (float) – Voltage in Volts
setMode(mode)[source]

Sets the operating mode

Possible values:

  • cc: Constant Current
  • cv: Constant Voltage
  • cp: Constant Power
  • cr: Constant Resistance
Parameters:mode (str) – Operating mode
Raises:Exception
setPower(power)[source]

Sets the constant power mode’s power level

Parameters:power (float) – Power in Watts
setRemoteControl()[source]

Sets the load to remote control

setResistance(resistance)[source]

Sets the constant resistance mode’s resistance level

Parameters:resistance (str) – Resistance in Ohms
setTransient(A, A_time_s, B, B_time_s, operation='continuous')[source]

Sets up the transient operation mode.

Parameters:
  • A (float) – Amplitude A
  • A_time_s (float) – Width of A (in seconds)
  • B (float) – Amplitude of B
  • B – Width of B (in seconds)
  • operation (str) – Transient Mode (one of “continuous”, “pulse”, “toggled”)
setTriggerSource(source='IMMEDIATE')[source]

Set how the instrument will be triggered:

  • “IMMEDIATE” means triggered from the front panel.
  • “EXTERNAL” means triggered by a TTL signal on the rear panel.
  • “BUS” means a software trigger (see Trigger()).
Parameters:source (str) – Source (“immediate”, “external” or “bus”)
Raises:ValueError
setVoltage(voltage)[source]

Sets the constant voltage mode’s voltage level

Parameters:voltage (float) – Voltage in Volts
trigger()[source]

Provide a software trigger. This is only of use when the trigger mode is set to “bus”.