This is a multi-part blog post. In this post I will be talking about the basics of LabVIEW and Continuous Integration using Jenkins, with future posts discussing the use of virtual machines for dynamic build environments, expanding the LabVIEW Command Line Interface, builds triggered by source code control, automated unit testing, and more advanced topics.
Python made a rather large splash at NIWeek 2018. It got a number of mentions in various settings, the most notable of which was Collin Draughon's talk "Automating Measurements with Python." LabVIEW 2018's Python Node makes it very straight-forward to call a simple Python script from within LabVIEW. You set up the Python environment, invoke the Python Node, and then tear down the environment when you're done.
Summary: Test engineers typically add manual-control screens to LabVIEW applications. While it would be helpful to repetitively execute varying parts of those manual-control screens, LabVIEW is not optimal for dynamic scripting, or on-the-fly sequencing with flow control. (Imagine editing the source code of Excel each time you wanted to create a macro.) And while Python is built for scripting, it requires advanced custom coding to interface with LabVIEW.
This post is going to focus on a few of the tools currently available for integrating Python and LabVIEW together in your application. In a follow-up post we will be discussing a tool that WTI has developed internally for use in an application-scripting framework - so stay tuned.
Edit: We've now released TestScript, the free bidirectional Python/LabVIEW Connector
A lookup table is a table of values that may need to be indiscriminately retrieved programmatically, often even determined subjectively by a user’s input. Using an array and brute force linear searching is often the first method that comes to mind for many programmers, but the larger the table is or grows the more inefficient this method quickly becomes. Variant lookup tables can be created using a simple LabVIEW API that utilizes very efficient algorithms for key-value pairs.
Suppose you find yourself needing to rotate a point in three-dimensional space about an arbitrary axis. This problem comes up frequently in robotic kinematics, for example. You can use Euler angles and rotation matrices. However, this approach, while computationally efficient, has a few drawbacks. One is that it is not particularly easy to invert. Another is gimbal lock. Quaternion rotations do not suffer from either of these drawbacks. While quaternions are not quite as computationally efficient as rotation matrices, modern computer hardware makes this drawback less important for most applications.
The Hough Circle Transform has been known for some time. The Hough Circle Transform takes in data and a known radius, and outputs the center of the circle with that radius, that best fits the data. It does this by setting up an accumulator grid, all initialized to zero, in which each data point votes on where it thinks the circle center is. A more formal description follows.