r/ElectricalEngineering • • 2d ago

Project Showcase Open Source LabVIEW "Alternative"

Since I had about a month of freetime between two jobs I chose to use that time wisely and developed an Open-Source Alternative to LabVIEW.

Here I used it to automatically test a 4€ Ikea 20W USB-PD power supply for efficiency, Voltage Stability, ripple etc.
I also made a private short where I go into a little more detail: https://youtube.com/shorts/WpEfdhIpwws

It obviously isn't even a close match to LabVIEW yet, but the potential is there, it works pretty well for what it is and definitely is much easier to set up than any alternative there currently is.

You can program visually like in this example, but in the background the visual script is converted to Lua at runtime and the Lua Code is what actually runs.
You can also start a Project with Lua code straight away if it is more complicated.

One of the next things I am adding is a Plugin editor/creator, so that you can very easily add your own Devices.

You can find the Project on my Github here: https://github.com/criscrafter/benchloom

386 Upvotes

69 comments sorted by

32

u/Ill-Quit6803 2d ago

I don't actually think this looks anything like labview. It definitely looks like data flow, and similiar to GNU radio.

-23

u/cris_crafter 2d ago

I didn’t want to Recreate LabVIEW. Honestly, I have never even used it.
But I wanted to create something that has most or all features that a home user or student would use from LabVIEW and make it easier and quicker to set up without any licensing headache etc.

51

u/Bored_at_Work326 2d ago

In that case, I think you should not compare it to LabVIEW and just talk about it as an open source graphical programming/scripting language.

10

u/Snellyman 2d ago

Mostly because NI is very litigious about anything that even slightly resembles labview.

-18

u/cris_crafter 2d ago

Well, I did intentionally put “Alternative” in quotation Marks.😄
I believe they are quite comparable from the standpoint of what home users will do with it.
I never claimed it was a clone.

10

u/Ill-Quit6803 2d ago

I think data flow model programming is really cool. I am glad that you produced something cool and useful with your free time for us all to play with. I am also don't want to defend proprietary software, but: You probably should learn a bit about who uses Labview and what they use it for before you try to build a replacement.

1

u/Normal-Duck9025 2d ago

LabVIEW is free for your target audience.

113

u/shift124 2d ago

I’ll never know why people love labview so much when python exists

25

u/awesomechapro 2d ago

For my use cases, you can’t beat good old fashioned GPIB with a HP-85 running basic.

12

u/K1ngjulien_ 2d ago

are you wearing bell bottom plaid pants as well?

2

u/Eimac_3-500Z 1d ago

Mr. Fancy Pants, as curiousmarc would say

17

u/theboozemaker 2d ago

Labview was great when you needed to put together something that included logic, external hardware control (especially if NI hardware), and a GUI. It is fast, efficient, and reliable for that.

Unfortunately for NI/Emerson, it's only real value these days, given the landscape of AI-assisted coding, is integration with NI hardware.

I've never seen a LabView program that didn't look like a LabView program, which is one of the reasons I always cringe when I see it in a commercialized product. Labview should be for internal-use only, in my opinion. It's always given prototype vibes, and when in commercial products it tells me your company isn't willing to invest in a skilled software team.

5

u/Madcat28 2d ago

Luckily it's going away as the older generations fade out. I would rather program any day over labview. Even matlab...

1

u/cris_crafter 2d ago

I believe it is mostly because it’s the industry standard and maybe people are used to it from work?
Who knows. 😅

10

u/shift124 2d ago

I’m not dogging on your project. It’s really cool. And you are correct about labview in industry. I just have a personal axe to grind with that. I hate labview. lol. Matlab too. Aside from the really awesome toolboxes like the phased array system one or simulink, I go for python 9/10.

5

u/bad_photog 2d ago

Agreed about it being pretty industry standard and I’m with you. I also hate labview. Fuck NI

4

u/samygiy 2d ago

The toolboxes are the only reason to use MATLAB tbh. 

3

u/JuniorAd9605 2d ago

it was grpc before grpc, and all the instrument manufacturers don't feel like changing their software to not lock in customers

2

u/reddit_user33 1d ago

Visual programming languages can be useful in the right situations.

Eg. Let's say you're out in the field, you're not in a favourable situation, and you need to figure something out quick. I think for these applications, a visual language like labview is great to see that you're getting the right inputs and outputs, and then another language to do the complex logic and maths.

There are other visual programming languages that are popular.

1

u/Ill_Bodybuilder_4105 2d ago

Because it’s fxxking fast to make something. Output is not perfect, not fancy, but it’s work anyway and datas are trustable.

1

u/Ill_Bodybuilder_4105 2d ago

Remember time is gold in test field. Labview is one of the fastest test bench environment more than python or C#.

1

u/Normal-Duck9025 2d ago

I’m a LabVIEW developer considering c# due to AI. Test development isn’t my only task so streamlining it with AI would be nice.

I like LabVIEW because of visa locking and using DQMH, I have a really good abstraction layer going for all our equipment. From what I’ve gathered C# can do the same and so can python but Python has a harder time doing this.

1

u/survivorr123_ 2d ago

they offer very expensive hardware and make it easy to use it

1

u/CoffeeBreaksMatter 1d ago

In my intern days i worked for a large semiconductor manufacturer. They used LabView to automate Component Verification with all sorts of test-equipment like temperature chambers and PSU’s. My lead engineer had built a great system with a HAL over the different Instruments so that they could easily swap devices if something was unavailable.

Anyways, one of my tasks there was to build a RPC system to control the devices from Matlab and Python. People went NUTS over it. I was praised everywhere, haha. I still have a special hate-love relationship with LabView. The lack of version control and also not being able to review “code” drove me insane.

1

u/984a 20h ago

Python does graphical programming like Labview?

1

u/shift124 5h ago

No it’s just capable of automating the same processes and you can make custom GUIs with packages like tkinter.

There are tools that you can use to create python code graphically but they are generally for much more specific applications. GNU radio is the one I’m thinking of and it is for DSP applications. Generally with GNU radio I’ll keep the DSP strictly isolated and instantiate the class externally for any automation. Python gives you a lot more wiggle room.

1

u/984a 4h ago

So then isn’t that the answer to your question “why people love labview so much when python exists”?

1

u/shift124 2h ago

If you like graphical programming with limited scope then have at it.

1

u/deafdefying66 2d ago

Especially now with a few general purpose pieces of test equipment you can vibe code a test sequence in a few minutes

4

u/shift124 2d ago

It’s all just SCPI writes/queries. I don’t even think vibe coding is even really necessary. I don’t know.. maybe it’s just me but when AI gets involved, it just adds unnecessary layers of complexity and makes debugging a nightmare.

7

u/deafdefying66 2d ago

It used to be that way. The future is now old man. I have a huge library of skills for Claude that redirect it to all of my rules for instrument scripts, where examples, built out instrument classes, and manuals are located, the annoying 2 second lag time for that old instrument after a certain command, etc.

Of course, you still need to know the equipment well, but I haven't done any debugging at all in months. Hell, you could even just tell it to run the test for you.

4

u/LilNephew 2d ago

I do the exact same. Like my little helper for instrument control. Opus 5.5 is decent enough at parsing programming manuals, even things like trigger model diagrams on DMMs

3

u/shift124 2d ago

I use AI all the time. I just refuse to use something that “works” and I’m unaware of how it’s actually executing. I use it for logic, algorithm implementation, and debug but pretty much anything with any complexity that I’ve straight up vibe coded has been rife with edge cases that take more time to track down than just scripting myself.

2

u/deafdefying66 2d ago

Fair enough. I think for me, all of that stuff gets built into the structure/heirarchy that I have in my instructions so that I can know exactly where to look and for what. Most of my problems when I first tried using AI for this stuff were actually from me not understanding how "good" code is written, so I took some time to educate myself on how programmers think about structure and whatnot in OOP. I think that because the majority of training data is reasonably structured code, when you tell it to do something an "unconventional" way (from a programmer's perspective) or without any structural plan, you get crap because it either doesn't have the training data to infer what a good single file script should look like or tries to guess what the structure should look like using the rules of good programming that you're telling it to ignore basically.

I don't think you're wrong in choosing to not use it for test scripts though. People who understand what is actually going on and aren't just telling the computer to do things are only going to get a whole lot more valuable in the workforce.

1

u/howdidyouevendothat 2d ago

Can you describe the structure/hierarchy of what you got working? I'm currently in the process of building this up for myself. I'm trying to create a library of tools/and functions, but looking at my original structure Claude gave me some weird suggestions for changing the heirarchy which it changed its mind about after I told it how I was thinking about the stuff. So now I'm worried I'm doing something weird lol

1

u/deafdefying66 1d ago

Do you use Claude? And follow up, Claude code or chat/cowork?

1

u/howdidyouevendothat 1d ago

I was using opus 5.5 in the kiro ide

1

u/deafdefying66 1d ago

Gotta use Claude code. Send me a DM if you want to talk in greater detail

2

u/BZab_ 2d ago

Let it write the scripts for repeatable measurements instead of letting it freely wander on its own. Artifacts are deterministic and can always be reviewed or modified by a human. Best of both worlds.

With Opus5.5 it's always kinda gamble. Sometimes it nails down in just few hours non-obvious issues that multiple people struggled with for months, e.g. once I left it for a night with scope plugged into board and serial connected to the boards that were debugged. It was free to experiment and collect the data basing on my set of instructions and prior measurements. After analyzing the data it collected, it corrected my instructions finding that measured results aren't uniformly random, but instead they form a discrete (albeit noisy) distribution. It analyzed the schematics and FPGA firmware, diagnosed the cause and proposed a fix. The cause was one of many clocks that wasn't synchronized with the rest of the system and some modules used it without resynchronizing it with the rest of the system. Observable issues were only showing up sometimes, randomly in high level communication between boards.

On the other day, I need to control it every few minutes, because you never know when it will hallucinate some extra task in the to-do list and will start debugging a problem that doesn't exist.

1

u/shift124 2d ago

So you are using an agent?

1

u/BZab_ 2d ago

For some stuff, sure. In most cases it works well as an orchestrator that juggles around the lower-level scripts and handles errors (or asks for decision when it encounters unexpected one). As long as it doesn't hallucinate a non-existing task to be done, it works decently working with a hardware in a loop. I can leave it running for the night. If it succeeds, it's great. If it fails, I don't care, because the time cost for me was next to none.

2

u/BathroomTaboo 2d ago

Is that ImGui? Did you use an existing node widget kit or did you roll your own?

3

u/cris_crafter 2d ago

Not ImGui, it's Qt (PySide6). The node editor is my own, built on QGraphicsView, no library.

2

u/BathroomTaboo 2d ago

That's impressive! I tried Qt but it's a lot harder to wrap my head around...

2

u/negativ32 1d ago

I bet the core isn't 5GB?

2

u/cris_crafter 1d ago

The Windows Release is 78MB and the Linux Release is 114MB.
Also no installation needed. You only download and run the Exe.

It being very small was important for me.

10

u/herrcespedes 2d ago

I’ve been using labview for 10 years professionally, while this is certainly far from replacing labview, it seems like a useful piece of kit. I’ll take it for a spin. And thanks for the hard work (and for making it FOSS)!!

10

u/TobyS2 2d ago

As a 30+ year LabVIEW developer, I like it and it is a great start. I like that you can switch between Lua and graphical view. Those that get graphical programming love it and wouldn't want to program any other way. There are great text programmers that can't understand why anyone would want to programming any other way. Our brains all work differently and love that you can use whatever mode you want. Possibly even switching between modes just to look at a problem in a different way. Lacking this text aspect is what is holding LabVIEW back in the age of AI. While there are translators to python and some have even used AI to visually analyze the screen. These methods are all slower and use more tokens than just using text.
I like that it is lean, portable, and no license management to get in the way. This is perfect for students. LabVIEW has become bloated and really can't be uninstalled completely. I'd be upset if a professor made my kid install LabVIEW on their laptop for a class.
Dislikes? Mac support would be nice and honestly would put this a leg up on NI's offerings. Also, I'd try to force inputs on the left side of a function and outputs on the right. The for loop graphical representation is a bit clunky.

Didn't even mention the driver plugins which is great. I started with LabVIEW version 3 and I feel like this is almost equivalent. We made good test systems with that. Keep at it. I think there is something here.

1

u/ohmsteadhq 2d ago

You would really like Synnax.

2

u/Fine-Fig7252 2d ago

This is pretty cool! Will give it a go. Thank you for the hard work.

3

u/cris_crafter 2d ago

I also definitely did it for myself, but if I make something that the community can take advantage of I am very Happy to share it. 😄

2

u/Fine-Fig7252 2d ago

Yeah, I think the community needs a lot of help with tools that can benefit in these areas. The ones that are available are either too premium to get.

2

u/cris_crafter 2d ago • Bravo

That was also the main reason why I developed it.
The solutions that existed were either too expensive or too annoying to set up.

2

u/electr0n_CL 2d ago

oof this is gold would love to try it

2

u/cris_crafter 2d ago

You can download the current Release from Github for Windows or Linux. :)
There are still bugfixes etc and not too many devices are supported, but much of that will come as the community grows.

3

u/Past_Ad326 2d ago

I’m embarrassed to say I’ve never heard of LabVIEW

1

u/jonsca 1d ago

I'm embarrassed to say I have!

3

u/madartist2670 1d ago

Industry is shifting towards python for lab automation

1

u/jeduars 2d ago

☠️why Lua when Python exists???

0

u/cris_crafter 2d ago

The whole software is actually written in Python, but I just believe Lua is the better scripting language.
Also much easier to learn for beginners in my opinion and more intuitive because it uses brackets.

1

u/Conor_Stewart 2d ago

Why choose lua over python when python has a large selection of libraries for data analysis, maths, etc? What most people look for in something like this is lots of support and an established ecosystem, not something that may be slightly easier in one person's view.

How many people are writing new libraries and algorithms in lua for the types of things this software is meant for? How many more people are already writing new algorithms and data analysis techniques in python? Python is pretty much the standard for scripting now so going with python lets your users use code from a lot more sources including research and even unrelated fields whereas going with lua means every piece of code your users can use has to be written specifically for your software.

0

u/cris_crafter 2d ago

The Plugins are written in Python aswell using Python Libraries etc.
Only the test scripting is done in Lua.

The good thing about it being open source is that you can just fork it and change it in any way you like. :)

2

u/dE3OB2 2d ago

The main feature of LV is wide zoo of drivers for devices and ready solution as PID, visualisation, etc. You solution looks cool, but specific. Where I spent a days for writing of lab/experimental mesuarment software (LV, HP VEE (your solution looks close to it), python), today LLM is require a minutes Qt interface and unit tests. Also main language for devices was SCPI, but last years companies create own solution, any under building as Lua does not simplified life. But anyway I hope your "bicycle" could find a riders, good luck.

2

u/c4chokes 2d ago

True test will be, if you can test this on Tek hardware without GPIB/LAN locking up

2

u/jeanlouwired 1d ago

That looks really nice!

1

u/Hirtomikko 2d ago

I am more interested with the instruments on the bench....I am salivating

1

u/Electronic-Split-492 1d ago

Literal spaghetti code.

1

u/jonsca 1d ago

If you've got the Python, you don't need the LabView.