Skip to main content

SDK for Laboratory Instrument Station Adapter

Project description

Open LISA SDK

This SDK provides an interface to interact with the Open LISA Server. The server must be integrated with the instruments of interest and running in a known Serial port (RS233 connections) in order to be able to connect via this SDK from the client side. Alternatively, you can use TCP protocol for communication being aware that this system does not provide authentication or encryption under this protocol.

Installation

pip install open-lisa-sdk

Getting started

After installation and having configured the server with the instruments, you are ready create your experience scripts with Open LISA SDK in a few lines of code. For example:

  1. Connect with the server
import Open_LISA_SDK

sdk = Open_LISA_SDK.SDK()
sdk.connect_through_RS232(port="COM3")
  1. Get the instruments
instruments = sdk.get_instruments()
for instrument in instruments:
    print("instrument {} {}".format(instrument["brand"], instrument["model"]))
  1. Get instrument commands and send invocations to your instruments
instruments = sdk.get_instruments()
first_instrument = instruments[0]
command_execution_result = sdk.send_command(instrument_id=first_instrument["id"], command_invocation="set_channel_volts 1 5.0")
print(command_execution_result)
  1. After finishing, remember to disconnect
sdk.disconnect()

Examples

You can check more online examples here. Go to examples folder and just run

python <example_script_name>.py

API Doc

You can check the full Open LISA SDK API Doc here, as well as the full source code in its repository

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

Open_LISA_SDK-1.0.3.tar.gz (13.8 kB view details)

Uploaded Source

File details

Details for the file Open_LISA_SDK-1.0.3.tar.gz.

File metadata

  • Download URL: Open_LISA_SDK-1.0.3.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for Open_LISA_SDK-1.0.3.tar.gz
Algorithm Hash digest
SHA256 108aa8a02834097571df105e0939b1fa16acdf5928d2459a45463839aec7c1f2
MD5 7fe2ef52708c0ef39e504a9b0a45c8ec
BLAKE2b-256 b153ee9993501ca0bbf8411bb48a84d76bcbe1d45abb9fd7d914e30f74c8c638

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page