Skip to main content

Python Ethernet driver for the Bloomy Controls BS120x battery simulator.

Project description

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bs120xenet-1.0.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bs120xenet-1.0.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file bs120xenet-1.0.0.tar.gz.

File metadata

  • Download URL: bs120xenet-1.0.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bs120xenet-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a273527371f51ef39c8a337dff6b203f54cc05943ac9947607b714d441755989
MD5 6feef1bfd29ab3b65069efa4e6806366
BLAKE2b-256 726f8f88f5ff6817fe89af75f994846f7a4551f5516248926961fbe2ba808aa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for bs120xenet-1.0.0.tar.gz:

Publisher: pypi-publish.yml on BloomyControls/bs120x-enet-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bs120xenet-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bs120xenet-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bs120xenet-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa3a8728bcdd85c4a4b8a69538c24d1c175866182c0624595145bd3a8d9ddd87
MD5 05119305d88fcaeb0fe179159123d823
BLAKE2b-256 945dda9ba95779d31f732758a221e2cf8bffe96a97087122690575e5d3cc6dfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for bs120xenet-1.0.0-py3-none-any.whl:

Publisher: pypi-publish.yml on BloomyControls/bs120x-enet-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page