Skip to main content

Python library for reading industrial scales using the P03 protocol.

Project description

📦 P03Py

Biblioteca Python para comunicação com balanças industriais via protocolo P03, com suporte à porta serial e TCP/IP.


📝 Descrição (PT-BR)

🚀 Conheça a P03Py, a primeira biblioteca Python dedicada à comunicação com balanças que utilizam o protocolo P03 (via serial ou TCP/IP).

Esta biblioteca foi desenvolvida para facilitar a integração com balanças industriais, utilizando leitura byte a byte com máquina de estados, validação de STX, CR e checksum, e extração de variáveis como peso bruto, líquido, tara e status da balança.

📺 Veja a demonstração da biblioteca no YouTube:
https://youtu.be/kWqxdXJBAPY

🔧 Compatível com portas COM (serial) ou conexões TCP/IP


📝 Description (EN)

🚀 Meet P03Py, the first Python library dedicated to communication with weighing scales using the P03 protocol (via serial or TCP/IP).

This library is designed to simplify integration with industrial scales, using byte-by-byte reading, a state machine, validation of STX, CR and checksum, and extraction of variables like gross weight, net weight, tare, and scale status.

📺 Watch the library demo on YouTube:
https://youtu.be/kWqxdXJBAPY

🔧 Compatible with serial (COM) ports and TCP/IP connections


📚 Funcionalidades | Features

  • Comunicação via porta serial (RS-232) ou TCP/IP
  • Máquina de estados para leitura segura
  • Verificação de integridade (STX, CR, Checksum)
  • Extração de dados: peso bruto, líquido, tara, status da balança
  • Suporte a pacotes P03 reais usados na indústria

📦 Instalação | Installation

pip install p03py

📁 Exemplos disponíveis | Available Examples

  • diagnostico.py — Testa a porta serial com diversas configurações para descobrir qual está sendo utilizada pela balança

  • teste_leitura_serial.py — Exemplo de leitura de dados da balança via porta serial

  • teste_leitura_tcp.py — Exemplo de leitura de dados da balança via conexão TCP/IP

  • diagnostico.py — Tests the serial port with multiple settings to discover the correct configuration used by the scale

  • teste_leitura_serial.py — Sample test for reading scale data using serial port

  • teste_leitura_tcp.py — Sample test for reading scale data using TCP/IP connection


🧪 Running Examples

python -m p03py.Exemplos.diagnostico
python -m p03py.Exemplos.teste_leitura_serial
python -m p03py.Exemplos.teste_leitura_tcp

🔗 Project


📄 Licença | License

MIT © 2025 — Ronei Toporcov

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

p03py-1.0.3.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

p03py-1.0.3-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file p03py-1.0.3.tar.gz.

File metadata

  • Download URL: p03py-1.0.3.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for p03py-1.0.3.tar.gz
Algorithm Hash digest
SHA256 58cff6144002a425245fe9061a5ef5ce866dc4ad435cc7a96f9a929d8659df86
MD5 2690881a59f84d081c72936618f706d9
BLAKE2b-256 4e4bb86b0d24781d99ba3376951074bc7856a83782efd4c473cf8b048000ed49

See more details on using hashes here.

File details

Details for the file p03py-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: p03py-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for p03py-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3b12513aa2df402c6f0b7df1b52dadeb3993cce8de2c75243260fb19862eb588
MD5 7fe4a743e12a13e66f6dc750d2e0ceab
BLAKE2b-256 73ffd4a8fd2d416aad99e4c94e20a0e2a2cbb602292d8f323b20474dd2251444

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