Skip to main content

a python interface to remote LabVIEW controls

Project description

lv-linkpy

a python interface to remote LabVIEW controls.
Python version above 3.6 is required.

This package depends on Pykit for LabVIEW, a LabVIEW addon. For more information, please see Pykit for LabVIEW documentation.

Installation

  • pip install lv-linkpy

Register the control on LabVIEW

Usage

Create a session

from lvlinkpy import Session
s = Session(1919)

Check control references

s.print_control_info()

This code will print all control references outline which are registered on LabVIEW.

Get control value

User can get the value from the name of the control. Suppose there is a control called "Boolean" in the LabVIEW.

print(s.get_value("Boolean"))

If the control name is incorrectly given, it will raise an error.

s.get_value("fdzggZWSdgs")

Set control value

User can set the value by the name of the control. Suppose there is a control called "Boolean" in the LabVIEW, this code will set the control value to "True".

s.set_value(valueName="Boolean", value=True)

This package will perform type check before send to LabVIEW. So, If user send a string to a bool control, it will raise an error.

However, ignore_check=True can avoid type check on python. It may lead an error on LabVIEW.

s.set_value(valueName="Boolean", value="string")
s.set_value(valueName="Boolean", value="string", ignore_check=True)

mechaction=True argument can activate mechanical actions of the control. (for example firing an event case)

s.set_value(valueName="Boolean", value=True, mechaction=True)

Notice that, a button-like latch action is not supported. If you want to activate an event case of a button, you can add a hidden boolean to the target event case structure on LabVIEW.

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

lv-linkpy-1.0.3.tar.gz (50.3 kB view details)

Uploaded Source

File details

Details for the file lv-linkpy-1.0.3.tar.gz.

File metadata

  • Download URL: lv-linkpy-1.0.3.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for lv-linkpy-1.0.3.tar.gz
Algorithm Hash digest
SHA256 a328ca560887c1f2938ef633fb282e811d8226ff2d039c0730d48317db3f9d8a
MD5 51e423860facbf83c410223043299e33
BLAKE2b-256 bf09bab8bcb9e8529693388c7bb959f8d56df06e312c5034de5792310f489289

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