Skip to main content

Test generator for battery cyclers

Project description

BM Generator 3000

Test generator for battery cyclers.

Supported formats: Basytec, Neware, Digatron, JSON-LD.

Screenshot

Documentation: https://digibatt.github.io/bmgen

Examples: examples

Setup

The Python package is available on PyPI and can be installed using pip:

pip install bm-generator

The web version of the program can be started using the command:

bmgen-server

Installation from sources

The required dependencies and the package itself can also be installed from the sources using pip:

pip install -e .[dev]

A working installation of Python >= 3.10 and pip is required. The web version also requires npm. To build the modules for the web version and the documentation, the provided build script can be used:

./build.sh

Documentation

The documentation is built using the script

./build_docs.sh

Examples

This is a simple example that shows the basic structure of a program:

# import required functions and channel variables
from bmgen.function import *
from bmgen.channel import *

# set data recording interval
# registration format is only applied to BM programs
register(time=seconds(1), format=["my_custom_reg"])

# set safety limits
limit(V > 4.2, error(1))
limit(V < 2.5, error(1))
limit(I > 5, error(1))
limit(I < -5, error(1))

# specify test steps
charge(current=2.0, voltage=4.2, limits=[I < 0.2])
pause(hours=1)
discharge(current=1.5, limits=[V < 3.0])

To see the test programs that are generated, expand the sections below.

Battery Manager

Command for this example: bmgen --target bm --format table examples/simple_program.py

StepLabelOperatorValueLimitActionRegistration
1SETmy_custom_reg
1 s
2SET> 4.2 V
< 2.5 V
> 5 A
< -5 A
ERR 1
ERR 1
ERR 1
ERR 1
3CHA2.0 A
4.2 V
< 0.2 A
4PAU90 min
5DCH1.5 A< 3.0 V
6STO

Neware

Command for this example: bmgen --target neware --format table examples/simple_program.py

Step IndexStep NameStep Time (hh:mm:ss.ms)Voltage (V)Current (A)Cutoff voltage (V)Cutoff current (A)Capacity (Ah)Others
1CCCV Chg4.22.00.2
2Rest1:30:00.000
3CC DChg1.53.0
4End

Basytec

Command for this example: bmgen --target basytec --format table examples/simple_program.py

LevelLabelCommandParameterTerminationActionRegistrationComment
1StartU>4.2V
U<2.5V
I>5A
I<-5A



2ChargeI=2.0A
U=4.2V
I<0.2At=1s
3Pauset>90mint=1s
4DischargeI=1.5AU<3.0Vt=1s
5STOPStop

Web Interface

The easiest way to get started is using the web version by running the command:

bmgen-server

The web interface can be accessed at http://localhost:5000

CLI

The program can also be used as a command line tool:

bmgen

The only required argument is the filename of the Python program to be translated. A dash ( - ) can be used to read from standard input.

The following options are supported:

-t, --target

Set the target language. Available values are bm, neware, and basytec. The default value is bm.

-f, --format

Set the target format. The supported formats depend on the target:

BM:

  • text (default): Plain text file that can be pasted into the Battery Manager
  • table: HTML table resembling the Battery Manager interface for test programs

Neware:

  • xml (default): XML file that can be opened in the Neware client
  • table: HTML table resembling the Neware interface for test programs

Basytec:

  • text (default): Plain text PLN file that can be opened in the Basytec program
  • table: HTML table resembling the Basytec interface for test programs

-o, --out

Name of the output file. If this option is not provided, the output is written to the terminal.

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

bm_generator-0.29.14.tar.gz (53.7 kB view details)

Uploaded Source

Built Distribution

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

bm_generator-0.29.14-py3-none-any.whl (86.0 kB view details)

Uploaded Python 3

File details

Details for the file bm_generator-0.29.14.tar.gz.

File metadata

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

File hashes

Hashes for bm_generator-0.29.14.tar.gz
Algorithm Hash digest
SHA256 92dbacbea858a3984c82f1f56abd78d688d67d0b54c41f017f090a7bd457b7c7
MD5 32e58ef45e4fd38828858e9c4a68cb75
BLAKE2b-256 49bd6688a239cc85813aca109dfa77d081e8c697ec5c2984bca6083e1dc63230

See more details on using hashes here.

Provenance

The following attestation bundles were made for bm_generator-0.29.14.tar.gz:

Publisher: publish-to-pypi.yml on DigiBatt/bmgen

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

File details

Details for the file bm_generator-0.29.14-py3-none-any.whl.

File metadata

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

File hashes

Hashes for bm_generator-0.29.14-py3-none-any.whl
Algorithm Hash digest
SHA256 9d452766f692c3412ef590ccd52a4d9b2aeb09bf3e231d22a5ca928949778a98
MD5 13f1bead70962e6a50735c8313638ce6
BLAKE2b-256 ee3055eab61fb60244c8ae2bac82a9794cb50c7d51bd5d2ecf8cabcc7a62b4cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for bm_generator-0.29.14-py3-none-any.whl:

Publisher: publish-to-pypi.yml on DigiBatt/bmgen

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