Skip to main content

Python module to access the Dewetron TRION API

Project description

DEWETRON TRION SDK

DEWETRON TRION SDK. TRION API SDK description and example sources.

Github All Releases

A development environment allowing to directly access DEWETRON hardware:

  • DEWETRON TRION PXI boards
  • DEWETRON TRION3 PXIe boards
  • DEWETRON TRIONet devices
  • DEWETRON PUREC devices
  • DEWETRON NEXDAQ devices

NEWS

New DEWETRON TRION API package:

  • 2025-05-21 Release of TRION API R7.5.1
  • 2025-05-21 Release of TRIONET FIRMWARE R7.5.1
  • 2025-05-21 Release of NexDAQ FIRMWARE R7.5.1

Get those for optimal results.

Python now supports installing a trion_sdk package that can be installed using pip.

Prerequisites

To use the DEWETRION TRION SDK you need a current TRION API installation. The TRION Application installer is available on DEWETRON's customer care center:

TRION Application Installer: https://ccc.dewetron.com/pl/trion-3-modules

TRIONET Firmware: https://ccc.dewetron.com/pr/trionet

NEXDAQ Firmware: https://ccc.dewetron.com/pl/nexdaq

Or get it from this projects Releases section.

Documentation

An online version of the TRION SDK documentation is hosted here:

https://dewetron.github.io/TRION-SDK/

The docs directory contains pdf and html versions of the complete documentation.

For offline use we provide this pdf: https://github.com/DEWETRON/TRION-SDK/releases/download/TRION-R7.0.0/dewetrontrionsdk.pdf

Directory Structure

trion_api

This directory contains language bindings for C, C# and Python

trion

This directory contains examples directly accessing TRION boards. Usually for programms directly running on DEWE2 & DEWE3 enclosures.

trionet

This directory contains examples for accessing TRIONET devices.

Building the Examples

Examples in C

Building the C examples require CMAKE (https://cmake.org/).

cd trion\C
mkdir build
cd build

For a Visual Studio 2019 run:

cmake -G "Visual Studio 16 2019" ..

Other generators are listed when calling "cmake -G"

Open the generated solution:

start TRION_SDK_C.sln

See trion/C for available examples.

Examples in C#

Building the C# examples also require CMAKE (https://cmake.org/).

cd trionet\CS
mkdir build
cd build

For a Visual Studio 2019 run:

cmake -G "Visual Studio 16 2019" ..

Other generators are listed when calling "cmake -G"

Open the generated solution:

start TRION_SDK_CSHARP.sln

See trionet/CS for available examples.

Examples in Python

Running the python examples requires an installed TRION API and the trion_sdk package installed via pip (for the current user or in a virtual environment):

pip install git+https://github.com/DEWETRON/TRION-SDK.git

You can the use the TRION SDK in Python as follows:

from trion_sdk import *

DeWePxiLoad()

error_code, num_boards = DeWeDriverInit()

if num_boards != 0:
    error_code = DeWeSetParam_i32( 0, CMD_OPEN_BOARD_ALL )
    error_code = DeWeSetParam_i32( 0, CMD_RESET_BOARD_ALL )

    # Your program goes here

    error_code = DeWeSetParam_i32( 0, CMD_CLOSE_BOARD_ALL )

DeWePxiUnload()

See trion/python for available examples.

Contact

Company Information

www.dewetron.com

For general questions please contact:

support@dewetron.com

For technical questions please contact:

License

MIT License

Copyright (c) 2024 DEWETRON

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. LICENSE (END)

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

trion_sdk-7.5.0.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

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

trion_sdk-7.5.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file trion_sdk-7.5.0.tar.gz.

File metadata

  • Download URL: trion_sdk-7.5.0.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for trion_sdk-7.5.0.tar.gz
Algorithm Hash digest
SHA256 78404e0f55fac89624983d644ee744e3924299cfdcefb2aca78fc8ac64869957
MD5 d716e4f58cd083c1dff3cc4542c77690
BLAKE2b-256 96b310a11e09cf04cdeae492a2d9d87d69a95f2988a1646fbf5b5cfc0319a298

See more details on using hashes here.

File details

Details for the file trion_sdk-7.5.0-py3-none-any.whl.

File metadata

  • Download URL: trion_sdk-7.5.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for trion_sdk-7.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10ac06d51fb190d3adbc1e9abc38314af5450c5501e214bd3b4091d5086c8b44
MD5 a33082b30d47b37e648ca000fdb0a4c5
BLAKE2b-256 e9d748c4ebbfc1b4f66a8d7f358621e5f7bb3f00372e754af50d8b1d7f777d37

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