TestScript: A Free Python/LabVIEW Connector from Wineman Technology

  • Python
  • Thread starter Ackbach
  • Start date
  • Tags
    Technology
In summary: However, LabVIEW does not have a generalized inner product, which is a feature that is found in Python and other languages. The lack of a generalized inner product means that LabVIEW may struggle with certain types of matrix operations.
  • #1
Ackbach
Gold Member
MHB
4,155
92
With a few of my colleagues here at Wineman Technology, we have developed a free LabVIEW/Python connector tool called TestScript. You can follow the link to the direct download, or read the blog post for more information. Very exciting!
 
Technology news on Phys.org
  • #2
Hey Ackbach,

Can you clarify what the value is that this engine offers (that is built on top of Python), that no other engine (like Octave or Sage) offers?
Btw, maybe it's just me, but I'm not familiar with LabVIEW, so it may be helpful to highlight what LabVIEW offers...
 
  • #3
I like Serena said:
Hey Ackbach,

Can you clarify what the value is that this engine offers (that is built on top of Python), that no other engine (like Octave or Sage) offers?
Btw, maybe it's just me, but I'm not familiar with LabVIEW, so it may be helpful to highlight what LabVIEW offers...

Sure! National Instruments puts out LabVIEW, a graphical programming environment technically implementing the G programming language. Most people just say LabVIEW, and are done with it. Programming is graphical: you put nodes down and connect them with wires. That is the act of programming: it's a dataflow programming language: nodes execute as soon as all their inputs are available. Strengths of LabVIEW: 1. GUI development is extraordinarily fast, because every single file has what's called a front panel, on which you can put tons of different kinds of GUI elements in a WYSIWYG fashion. 2. No programming language talks to hardware better than LabVIEW. There is a LabVIEW driver for just about any instrument you can think of. 3. LabVIEW is inherently parallel: if code can run in parallel, it will. 4. LabVIEW has a fair amount of numerical analysis built into it, with algorithms implemented ranging from polynomial fitting, interpolation and extrapolation, digital filters, calculus and differential equation solvers, geometry, and much more. Its libraries are not as vast as Python's, but they are still quite large, and adequate for many analysis tasks in the Operational Technology world (physical sensor data, as opposed to user data like web clicks). Weaknesses of LabVIEW: 1. It's not good for scripting, unless your scripts are exceptionally linear. If you need flow control like IF statements or FOR loops, you essentially have to know LabVIEW. 2. Its GPU interface is not highly developed - Python, e.g., is way ahead of LabVIEW on this score. 3. It's not open-source, but is a paid closed-source language managed by NI. NI does a good job with it, but LabVIEW is expensive.

Python fills in some of these gaps that LabVIEW has; in particular, it's great at scripting because of its exceptionally easy-to-learn syntax. There are terrific GPU libraries like TensorFlow and Theano, and it's FOSS. So, TestScript bridges the gap by providing a connector between the two. There are other connectors, most notably Enthought's connector, but it is not fully bi-directional (you can call Python scripts from LabVIEW, but not LabVIEW functions from within Python). For example, in LabVIEW applications, there is typically a manual control screen where you can directly interact with your hardware. But once you've spent the time to develop a manual control screen, you'd like to automate processes on it (set the power supply to 10 V, then get a DMM reading, etc.) Well, using TestScript, you define these functions (set voltage, get DMM reading, etc.), and then you can call them in your Python script and essentially write test scripts very easily. While TestScript isn't the only way you could do this (NI's product TestStand comes to mind), TestScript is much lighter weight, and free. So that's what we're offering.
 
  • #4
Weakness: LabVIEW does not have a generalized inner product.
 
  • #5
tkhunny said:
Weakness: LabVIEW does not have a generalized inner product.

Perhaps you could expand a bit on this? I know what an inner product is relative to an inner product space. Are you talking more about a specific programming language feature? LabVIEW can quite efficiently compute a typical inner product (really a dot product) thus:

View attachment 8108

LabVIEW has many, many vectorized operations similar to NumPy and MATLAB/Octave.
 

Attachments

  • LabVIEW Inner Product.png
    LabVIEW Inner Product.png
    4.3 KB · Views: 65

FAQ: TestScript: A Free Python/LabVIEW Connector from Wineman Technology

What is TestScript?

TestScript is a free, open-source Python and LabVIEW connector developed by Wineman Technology. It allows users to easily integrate Python scripts with LabVIEW programs, enabling data sharing and control between the two languages.

How does TestScript work?

TestScript uses a client-server architecture, where the Python script acts as the client and the LabVIEW program acts as the server. The two communicate through a TCP/IP connection, allowing for data transfer and control commands.

What are the benefits of using TestScript?

TestScript provides a seamless and efficient way to combine the capabilities of Python and LabVIEW. It allows for easy data sharing and control, making it ideal for applications such as test automation, data analysis, and more.

Is TestScript compatible with all versions of Python and LabVIEW?

TestScript is compatible with Python 2.7 and 3.x, as well as LabVIEW 2015 or newer. However, it is recommended to use the latest versions of both languages for optimal performance and compatibility.

Can I contribute to the development of TestScript?

Yes, TestScript is an open-source project and contributions are welcome. You can find the source code and information on how to contribute on the official TestScript GitHub repository.

Back
Top