Skip to main content

Python wrapper for the Agito AAComm .NET communication library

Project description

AACommPy

Python wrapper for the Agito AAComm .NET communication library. Provides full access to AAComm's motion controller API with IDE IntelliSense support.

Requirements

  • Python >= 3.10
  • Windows (Linux support planned)
  • .NET Framework 4.8 and/or .NET 6.0/8.0 runtime

Installation

pip install aacommpy

The AAComm NuGet package is downloaded automatically on first import.

To install a specific AAComm version manually:

aacommpy install --version 11.1.0

Quick Start

from aacommpy import CommAPI, Services, Shared, AACOMM_SERVER_EXE_PATH

# Start server
CommAPI.StartAACommServer(AACOMM_SERVER_EXE_PATH)

# Configure connection
api = CommAPI()
cData = Services.ConnectionData()
cData.ControllerType = Shared.ProductTypes.AGM800_ID
cData.CommChannelType = Shared.ChannelType.Ethernet
cData.ET_IP_1 = 172
cData.ET_IP_2 = 1
cData.ET_IP_3 = 1
cData.ET_IP_4 = 101
cData.ET_Port = 50000

# Connect
result = api.Connect(cData)
print(f"Connected: {api.IsConnected}")

# Communicate
msg = Services.AACommMessage()
msg.MessageStr = "ASpeed"
reply = api.SendReceive(msg)
print(f"Speed: {reply.ReplyStr}")

# Disconnect
api.Disconnect()
api.CloseAACommServer(False)

.NET Framework Selection

AAComm supports multiple .NET targets. Switch with:

aacommpy dotnetfw --netfw net48    # .NET Framework 4.8 (default)
aacommpy dotnetfw --netfw net6.0   # .NET 6.0
aacommpy dotnetfw --netfw net8.0   # .NET 8.0

The runtime (netfx or coreclr) is configured automatically based on your selection.

Check installed .NET versions:

aacommpy dotnetfw --check

CLI Commands

Command Description
aacommpy install [--version X.Y.Z] Download and install AAComm NuGet package
aacommpy version Show installed AAComm version
aacommpy update Update to latest AAComm version
aacommpy dotnetfw --netfw {net48,net6.0,net8.0} Switch .NET target framework
aacommpy dotnetfw --check List installed .NET runtimes

IntelliSense

AACommPy ships with type stubs (.pyi) for full IDE autocomplete and type checking. Supported in VS Code (Pylance), Visual Studio, and PyCharm.

To regenerate stubs after updating AAComm:

python generate_stubs.py

API Reference

The package exposes these AAComm namespaces:

Import Contents
CommAPI Main communication API (connect, send, receive, disconnect)
CommAPIWrapper Singleton wrapper for single-client usage
Services ConnectionData, AACommMessage, AllStatInterpreter, ControllerMessagesContainer, ...
Shared ChannelType, ProductTypes, ConnectResult, MessageType, ...
Extensions AACommDownloadFW, AACommDownloadUP, AACommDownloadFPGA, data recording, ...

All types are .NET objects accessed via pythonnet. See the AAComm documentation for full API details.

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

aacommpy-1.0.1.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

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

aacommpy-1.0.1-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file aacommpy-1.0.1.tar.gz.

File metadata

  • Download URL: aacommpy-1.0.1.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for aacommpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d9e47ec5457002588e3b67c2a8dd48d0e96bc4a4c70459897bd810bdc722e32a
MD5 8b1ce417e5184073b280587ed0aa4f73
BLAKE2b-256 264374adb295598e01a428f40c585254477802c4ca9ed85028b78a6ebf2469d6

See more details on using hashes here.

File details

Details for the file aacommpy-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: aacommpy-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for aacommpy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a92b41701cb2eaf9f449395484ac67acf3b4b8789b88300745fe1280fb3ad6a8
MD5 d39e06f5d1ee0a1b390d40d221e38ede
BLAKE2b-256 fccfe716399f93a0291418fe5964bf0fdfb63b3c7d12adbb2ff40de408a38f95

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