Skip to main content

Python interface for the Cryomech CPA1110 compressor

Project description

CPA1110

Python interface for a Cryomech CPA1110

The Cryomech CPA1110 compressor supports remote monitoring through serial (RS232/485), as well as ethernet connections, through the Modbus RTU protocol (for serial) or ModbusTCP (for ethernet).

Installation

This project now uses uv for dependency management.

Install the package with:

uv add cpa1110

For local development:

uv sync

Publishing to PyPI (manual)

One-time setup:

  1. Create an account on https://pypi.org
  2. Create an API token at https://pypi.org/manage/account/token/
  3. Configure your token for upload (for example in ~/.pypirc)

Release flow:

  1. Bump version in pyproject.toml.
  2. Build the package:
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
  1. Upload to PyPI:
python -m twine upload dist/*

Example

Using a context manager:

from cpa1110 import CPA1110, Connection

with CPA1110("192.168.1.10", connection_type=Connection.TCP) as compressor:
	# read the coolant in/out temperatures
	temp_in = compressor.coolant_in_temperature
	temp_out = compressor.coolant_out_temperature

	# start the compressor
	compressor.enable_compressor()

	# stop the compressor
	compressor.disable_compressor()

Without a context manager:

from cpa1110 import CPA1110, Connection

compressor = CPA1110("192.168.1.10", connection_type=Connection.TCP)
try:
	temp_in = compressor.coolant_in_temperature
	temp_out = compressor.coolant_out_temperature
	compressor.enable_compressor()
	compressor.disable_compressor()
finally:
	compressor.close()

Modbus protocol

There are various kinds of registers defined by the Modbus standard, but the CPA1110 only uses two kinds, namely Input and Holding Registers. The registers used are the following [CPAxxxx Digital Panel User Manual]:

  • 30,001 - Operating State
  • 30,002 - Compressor Running
  • 30,003 - Warning State
  • 30,004 - Errors
  • 30,005 - Alarm State
  • 30,007 - Coolant In Temp
  • 30,009 - Coolant Out Temp
  • 30,011 - Oil Temp
  • 30,013 - Helium Temp
  • 30,015 - Low Pressure
  • 30,017 - Low Pressure Average
  • 30,019 - High Pressure
  • 30,021 - High Pressure Average
  • 30,023 - Delta Pressure Average
  • 30,025 - Motor Current
  • 30,027 - Hours Of Operation
  • 30,029 - Pressure Scale
  • 30,030 - Temp Scale
  • 30,031 - Panel Serial Number
  • 30,032 - Model Major + Minor numbers
  • 30,033 - Software Rev
  • 40,001 - Enable / Disable the compressor

"Modbus protocol defines a holding register as 16 bits wide; however, there is a widely used defacto standard for reading and writing data wider than 16 bits." [source] "The first two 'Input' registers and the only 'Holding' register are 16 bit integer registers and the rest of the input registers are in 32bit floating point format." [CPAxxxx Digital Panel User Manual]

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

cpa1110-0.2.0.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

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

cpa1110-0.2.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file cpa1110-0.2.0.tar.gz.

File metadata

  • Download URL: cpa1110-0.2.0.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cpa1110-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b49671e9528db74db9ce48be37d710685a89ab652c21cd8107c251ae602f606f
MD5 731ec3c4fb07b9bb59be273f7398795e
BLAKE2b-256 07f9743de41f42a4b131dc4920228d4029e048443fe56addceca4fc6d674749d

See more details on using hashes here.

File details

Details for the file cpa1110-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cpa1110-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cpa1110-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf132a513d96d31485e645c85c9bf257f86666285b8a24427de9ae24d89ceac5
MD5 5620fe1b397de2b3f13c659f9cdc15a0
BLAKE2b-256 e66445d2287a502f7731c62f743504f591713a98474a0332684820fa898014d3

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