Python Ethernet driver for Bloomy Controls BS120x. For detailed information on Bs120x operation refer to the user manual available at https://www.bloomy.com/products/battery-management-system-testing/battery-simulator-1201.
Important
Currently, this library only supports BS1201. If you are using BS1200, contact Bloomy for firmware updates to support this driver.
- Supports Windows and Linux
- Implements all commands supported by the BS1201
- Implemented as a wrapper around the the C/C++ library for consistent interface across languages
See docs/installation.rst for installation instructions.
from bs120xenet import Bs120xEnet
from time import sleep
with Bs120xEnet() as client:
# connect to the unit
client.connect(interface_ip, device_ip, udp_port)
# request configuration information
client.query_config()
# wait to receive configuration
sleep(0.1)
config = client.get_unit_config()
print(f"Serial number: {config.get_serial_number()}")
print(f"Firmware version: {config.get_firmware_version()}")
# set Cell 0 to 5V, 0.1A sinking and sourcing current limits
client.set_cell_voltage(0, 5)
client.set_cell_sink_current(0, 0.1)
client.set_cell_source_current(0. 0.1)
client.enable_cell(0, True)
sleep(0.1)
# read back Cell 0 voltage
v = client.get_cell_voltage(0)
print(f"Cell 0 Voltage: {v} V")
client.enable_cell(0, False)
client.disconnect()Please report any bugs on the Github issue tracker.