Recorded Data

The Balance records the following attribute during operation:

  • grams: The weight reading value of the balance in grams.

Python API

The Balance can be controlled and monitored using the Aqueduct Python API. The Python code for interacting with the balance can be found in the aqueduct-py repository.

The module provides functions and classes to control the balance and retrieve weight readings. You can use this API to perform weight measurements and integrate the balance into your Python applications and automation scripts.

To use the Python API, you can import the Balance class from the module and create an instance of the balance. Then, you can call the available methods to retrieve weight readings and perform other operations.

Here's an example of how to use the Balance API:

"""Balance Example Script

This script demonstrates the usage of the `Balance` device from the
Aqueduct library. It connects to an Aqueduct instance,
initializes the system, and performs operations on the balance device.
import time

from import Aqueduct
from import InitParams
from aqueduct.devices.balance import Balance

# Parse the initialization parameters from the command line
params = InitParams.parse()

# Initialize the Aqueduct instance with the provided parameters
aq = Aqueduct(params.user_id, params.ip_address, params.port)

# Perform system initialization if specified

# Set the command delay for the Aqueduct instance

# Get the balance device from the Aqueduct instance
balance: Balance = aq.devices.get("balance_000001")

# Continuously perform operations on the balance device
while True:
    # Set simulated rates of change for the balance device
    balance_rocs = [5]

    # Get and print the weight readings from the balance device in grams

    # Pause for 5 seconds

    # Get and print the weight readings again

    # Perform a tare operation on the balance device for the first input

Please refer to the aqueduct-py repository for more details on how to use the Python API with the Balance.

Supported Hardware