Merging LabVIEW VIs with SourceTree

Blogs, LabVIEW Blog
After 10+ years of working in LabVIEW, I finally got to merge one of the projects properly. Though we can use source control like SVN & Git with LabVIEW file types (such as .vi, .ctl), there is very little chance our LabVIEW developers get to diff and merge the LabVIEW file types. This is mainly due to the visual complexity that we go through, the binary format of LV files and real estate needs, and the simplicity of silos in most LabVIEW projects. Of them, LabVIEW merge is very less used than LabVIEW diff. I had some directions on how to apply it for sourcetree from Endigit here but later found that it partly worked. So I customized it further in order to get it working. Here is the working…
Read More

TestStand Execution Aborts Unexpectedly

Blogs, LabVIEW Blog
TestStand persisted data (like a watch window data) could be a reason behind such aborts or stopping of sequence unexpectedly. In my case, I tried to check function AbortAll() in the watch window and ran into an infinite loop of aborts whenever I try to pause the sequence. To add more trouble, it didn't allow me to delete it as Watch View becomes inaccessible (see greyed out below) after sequence aborts. Watch Window in TestStand is executing unexpected functions of TS-Engine To overcome this issue, the Watch expressions are persisted in the TS common app data can be edited in a simple text editor. Open TeststandPersistedOptions.opt found in below path in a notepad and remove the section as highlighted in following screenshot. C:\ProgramData\National Instruments\TestStand 2021 (32-bit)\Cfg\TeststandPersistedOptions.opt Delete the section which…
Read More

Integrate LabVIEW with Python to access SaaS Services

Blogs, LabVIEW Blog
The world is bombarding with SaaS services all over and it's time to connect LabVIEW to the SaaS world. Most of the SaaS service provides Python API and integrating Python API to LabVIEW is gradually becoming a norm. Recently I spoke on GLA Summit 2021 about how we can integrate the LabVIEW with SaaS services with a producer-consumer loop in the python layer. Demonstration Video This video explains a top-level view of how this really works for a simple email SaaS from mailersend. https://www.youtube.com/watch?v=YQeJaod8Ti8 Presentation Slides Here are the slides where I explained one of the Python to LabVIEW integration techniques that I adopted for integrating the SaaS services to LabVIEW. GLA Summit 2021: Python Integration & Door to SaaS worldDownload
Read More

Imperative vs Declarative programming paradigm

Blogs, LabVIEW Blog, New Learnings
This is a series of blogs where I collect some interesting programming concepts, new things I learn As LabVIEWers we're familiar with few programming paradigms like object-oriented (OOP). Have you heard of functional programming?Imperative Programming changes the state of the program. OOP is an imperative programmingDeclarative Programming: doesn't change the state of the program. Functional is a declarative programming Wikipedia has more details on the programming paradigm 2 main principles of Functional Programming Don't mutate. Don't change the state of the program, whatever data comes into the function make a new copy of the function and return the new data without modifying the original data. Keep the function purely independent ie., even if you want to play with the global variables, then pass that global variable as arguments to that function…
Read More

LabVIEW 64-bit Database Addon

Blogs, LabVIEW Blog
Up until LabVIEW 2018, National Instruments provided database addon only for 32-bit version. Those who works with 64-bit LabVIEW version, this could be a roadblock if ever wanted to run the app only in 64bit and still need to access databases. Access Database from both LabVIEW 32bit and LabVIEW 64bit Short Answer A simple trick which works. If we copy the database addon from 32-bit LabVIEW installation to 64-bit LabVIEW installation, it still works without any issues. However ensure that other database file (.udl etc) and ODBC connections are setup for 64bit as well. Checkout my Oracle DB Connection learnings as well here Long Answer I used Oracle database via ODBC for an application in 32-bit. To get it working in 64 bit I had 32-bit version of same LabVIEW…
Read More

LabVIEW or TestStand File Diff using TortoiseSVN or TortoiseGit

Blogs, LabVIEW Blog
When you're extensively working in LabVIEW or TestStand with multiple developers, you could easily end up in the need of merging different VIs or sequences. The LVCompare tool and TestStand File Diff and Merge Utility come in handy. Here is how you set up the Tortoise settings to make the diff handier right from the context menu using TortoiseSVN or TortoiseGit. You can diff the files this way without the need to go through the file selection dialog boxes. https://www.youtube.com/watch?v=UsvqPt8MB0g&feature=youtu.be For .vi file of LabVIEW "C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" %base %mine For .seq file of Teststand "C:\Program Files\National Instruments\Shared\TestStand\FileDifferLauncher.exe" %base %mine References For LabVIEW diff with merge, there is a good article here from Delacor.
Read More
Not Enough Memory in TestStand + LabVIEW environment

Not Enough Memory in TestStand + LabVIEW environment

Blogs, LabVIEW Blog
If you have your test running in 32bit version of LabVIEW and 32-bit version of TestStand, and especially if your application is dealing with image processing algorithms, then there are numerous chances you end-up with a Not Enough Memory dialog from LabVIEW as below. There are some creative way and some workaround way to fix this memory issue. Not enough memory dialog from LabVIEW. 1. Unload option Find out the step which consumes most memory and change the Unload Option for that step in TestStand properties. I prefer Unload after step executes. This option would unload that step from the memory and thereby releasing any data stored in that module. Ensure if this module deals with any references, which upon closing, other modules might get affected. Choosing Unload after step…
Read More

SVN Externals

Blogs, LabVIEW Blog, Snippets
If you are looking to reuse a project which already exists in another project and if you need that new project gets updates of the already existing project then-and-there, there is a very good feature in SVN called as externals to help on this kind of requirements. Advantages You can avoid multiple copies of the same source in SVN/source control repositories. Get updates from the root project as and when there is an update.  So no need to manually copy the project again when there is an update. SVN-logs are maintained for the root project from the new project and hence better historical control. In case you don't need updates from root project, use specific revision to freeze to selective version. How does that works? This can be best explained…
Read More

Simple Event Logger for LabVIEW Developers

Blogs, LabVIEW Blog
An event logger is a logger which can log various events or error happening in an application run.  Usually it would be a simple text file or csv file with info about the run details of the application.  An event logger can help in various ways. It can help in identifying the error happened after an operator simply tells you that "Hey you developer! Something went wrong in your application, debug it quickly, production is paused cuz of this issue!!".  In such case, if you have an event logger, you wouldn't need to rerun the app to identify error again.  Just simply looking at the error log can give a hindsight. It can help if the LabVIEW application is completely parallel, then identifying the root-error becomes difficult with lots of…
Read More

SPI communication from LabVIEW using FT4222

Blogs, LabVIEW Blog
I've been recently asked to help out with some SPI communication support with FTDI FT4222 device.  For those who don't have idea about this comm., it's one of the famous inter-controller communication method.  The SPI comm. speed with FT4222 can go up to 53.8Mbps.  Really, it's that much speed however you should have board designed for that much speed. Here is a short story on how I did it. I developed low-level LabVIEW drivers which essentially uses the LibFT422 DLL from FTDI.  The 4 important SPI comm., functions to be achieved are SPI Master Read SPI Master Write SPI Slave Read SPI Slave Write After writing the low-level drivers in LabVIEW, I wanted to do the real testing. But to do the real testing, I don't have access to the…
Read More