This example demonstrates the use of the TAM API with Python. With the installation of the Python.NET package, Python programmers have an almost seamless integration with the .NET Common Language Runtime (CLR). It allows Python code to interact with the CLR respectively with the TAM API.
- Connection to the drive by Tria-Link (via PCI adapter), USB or Ethernet
- Windows OS
- TAM API available (comes along with the TAM System Explorer)
- Make sure that Python is installed on your system
- Python.NET installed
Python.NET (pythonnet) is currently compatible and tested with Python releases from 3.7 to 3.12 on both Windows and Mono runtimes (Linux/macOS). Ensure your Python version aligns with these supported releases for a smooth experience. For more information, visit the Python.NET documentation.
The example shows how the TAM API can be integrated into Python and reading a register or recording data. Before you run the example code, the following parameters may need to be adapted to your application:
- Path and version of the TAM Software
TAM_SOFTWARE_PATH = path.join(environ['ProgramFiles'], 'Triamec', 'Tam', '7.24.1', 'SDK') - Name of the axis
axis_name = 'Axis 0'
- Windows 11
- Python 3.11.4
- TAM Software 7.26.1
- pythonnet 3.0.3