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.2.tar.gz (49.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: lv-linkpy-1.0.2.tar.gz
  • Upload date:
  • Size: 49.8 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.2.tar.gz
Algorithm Hash digest
SHA256 47bc778ab418692440c3c94d5ceae5cf943ea902d23b4a7aee43411927b5d50b
MD5 47b6cdcadbc7a1fd9c98b47a71569df5
BLAKE2b-256 4a13bfbbca79ce1f3e3690de3e6a3d3eff5a0457febcf6e9cf73071b6059119d

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