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.
-
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]
-
getMode()[source]¶ Gets the operating mode
Possible values:
- cc: Constant Current
- cv: Constant Voltage
- cw: Constant Power
- cr: Constant Resistance
Returns: str
-
getTransient(mode)[source]¶ Gets the transient mode settings
Returns: tuple (Amplitude A, Width A, Amplitude B, Width B, Mode)
-
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)
-
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
-
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:
-
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
-