Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BS120x Ethernet Python Library (bs120xenet)

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.

Features

  • 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

Installation

See docs/installation.rst for installation instructions.

Example Usage

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()

Discussion

Please report any bugs on the Github issue tracker.

About

Python Ethernet driver for Bloomy Controls BS120x.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages