Skip to main content

Biblioteca para comunicação com balanças industriais via protocolo P03 (serial ou TCP/IP)

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


📄 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.0.tar.gz (2.6 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.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: p03py-1.0.0.tar.gz
  • Upload date:
  • Size: 2.6 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.0.tar.gz
Algorithm Hash digest
SHA256 2f5bb94030f4968e62141e61d4c96afa161c95c3cfe68f0cd7c3006f342b22ad
MD5 be4b036f8b540330b46f5211a870aa0e
BLAKE2b-256 583db5a9c55e631b240e78bd323d3bb844481ccdb8d45fb83f45c202b0cc1552

See more details on using hashes here.

File details

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

File metadata

  • Download URL: p03py-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 355138ed47c0445e4c912534d87549b0b731c5aec780d5a95b6fba3bddd19a02
MD5 e8f31281486d7c096ea6d336d45dd2fa
BLAKE2b-256 ccb83f6a98cd7bf8dd653ba16ce9db15057ebf0aefe5b4ba36cf3b496a79996e

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