Skip to main content

BRoaD API package

Project description

BRoaDpy

BRoaD API class for python.

Software development support library for BRoaD I/III in Python.

  • Programming language: Python 3.9+
  • License: MIT License

What is BRoaD

BROAD is a laboratory digital signal processing device developed by Bee Beans Technologies Inc. With BRoaD, you can easily generate, synthesize, and distribute a variety of logic signals in your lab.

There are two types of BRoaD: BRoaD I and BRoaD III.

What is BRoaDpy

BRoaD allows you to design digital signals using a dedicated GUI application. The BRoaDpy API can be used, for example, to read signal processing counters configured in BRoaD from a Python program.

How to Use

Use the BRoaD1 class when targeting BRoaD I, and the BRoaD3 class when targeting BRoaD III.

from broadpy import BRoaD1

mybroad = BRoaD1('192.168.10.16', 24, 4660) # Use the BRoaD1 or BRoaD3 class according to the device targeting.
mybroad.connect() # Initialize the connection with BRoaD.

Use disconnect to end use.

Measure Counter

Measure Counter Logic can be controlled (Connect, Start, Stop, Disconnect) by broadpy. connect_measure_counter establishes a TCP connection with BRoaD, and when data is received, the functions specified by set_counter_function and set_raw_function are executed.

  • set_counter_function : The arguments are the Measure Counter number and the measurement value.
    • If the SRC setting of Measure Counter is Gate Time, True Time, the measurement value is nsec.
    • Otherwise the measurement value is a count of the number of pulses.
  • set_raw_function : The argument is raw data (8 bytes).
def sample_counter_function(id, count):
    """
    Callback function to receive decoded ID and counter value
    """
    print(f"counter {id}:{count}")

def sample_raw_function(counter_byte:bytes ):
    """
    Callback function to receive raw byte data
    """
    print(f"counter bytes : {counter_byte.hex()}")

mybroad.connect_measure_counter() # Establish a TCP connection with BRoaD.
mybroad.set_counter_function(sample_counter_function) # Specifies the function to execute when TCP data is received.
mybroad.set_raw_function(sample_raw_function) # Specifies the function to execute when TCP data is received.(raw data)

If the Gate setting is User Control, you can control the start and end of measurement with start_read and stop_read.

mybroad.start_read(0) # Start measurement Measure Counter:0.
mybroad.stop_read(0) # End measurement  MeasureCounter:0. TCP data is sent from BRoaD, and the functions specified by set_counter_function and set_raw_function are executed.

disconnect_measure_counter closes the TCP connection.

mybroad.disconnect_measure_counter()

User Control

The User Control function of BRoaD III can be read and write to ON/OFF by broadpy.

from broadpy import BRoaD3

mybroad3 = BRoaD3('192.168.10.16', 24, 4660) # The User Control function is only available on BRoaD III.
mybroad3.connect()
mybroad3.user_control_value = mybroad3.read_user_control(0) # Read the current User Control (ON:True, OFF:False) of INPUT0 from BRoaD III.
mybroad3.user_control(0, True) # Change the User Control value of INPUT0 to ON: True, OFF: False.

Version History

0.1.0 - First release.

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

broadpy-0.1.0.tar.gz (360.0 kB view details)

Uploaded Source

Built Distribution

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

broadpy-0.1.0-py3-none-any.whl (356.5 kB view details)

Uploaded Python 3

File details

Details for the file broadpy-0.1.0.tar.gz.

File metadata

  • Download URL: broadpy-0.1.0.tar.gz
  • Upload date:
  • Size: 360.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for broadpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 df70587f21c0b0c2f42301db6fc4ba70d88bab0dcc2d26bc447a02f6bbe7c9e3
MD5 6fc1ba61a9be6afce60a1b310781c418
BLAKE2b-256 fb8b798cc7a1d522a5956014089845687f354312b00e0076e70bcae988166c0d

See more details on using hashes here.

File details

Details for the file broadpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: broadpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 356.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for broadpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c88d83d3f6320d8b60854885723d918d51024f0e506e02df18bc392aa517b2f
MD5 362906a465c73114f765167c94e770a6
BLAKE2b-256 1f2873b66855fa863b9e5bf918d798468cde5b8a7ae0a1bacd4a71b3e947e470

See more details on using hashes here.

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