LabVIEW Programs‎ > ‎

Why LabVIEW?


Why is LabVIEW better?

Writing a program in a high-level language is basically communicating to the compiler what the program should do. For some reason, this is today typically done by writing text based code in one of the common programming languages (C++, Java, C#, etc.). There is no reason that it needs to be done this way.

LabVIEW is a graphical programming language and offers significant advantages. Let me explain:

None of the early computers were programmed using text based code. For example ENIAC was programmed using patch cables and switches. Later was the time of the punched cardsteletype and much later terminals such as the VT100. Back then, communicating with computers was hard, because anything (input and output) needed to be reduced to a linear sequence of monochrome printable characters (the second dimension was controlled by the linefeed character!). You could do the Mona Lisa in ASCII art, but why bother. There was no other way!!!

To make things bearable, programming languages (Such as FORTRAN) were invented but the situation was clearly not optimal.

When the Macintosh came out, interaction with a computer became graphical and two dimensional and soon after Jeff Kodosky at NI invented LabVIEW, leveraging the technological advances in computing.

Modern computers have multiple processor cores and the OS is multithreaded. In modern programs many things happen concurrently. Your word processor formats and spell checks as you type. A computer can solve a chess problem while you are watching a video in a different window all the while your AV software is scanning your drive.

Writing a program that does many things concurrently and safely while avoiding race conditions is very hard using text based code.  Remember, to write a text based program you need to serialize the entire idea into a linear sequence of printable monochrome characters! Text based code is an incredibly clumsy detour that should not be necessary at all. It is difficult to imagine why a large part of the programming community is still clinging to it, wasting their time.

Computers are no longer "text only". Everything is graphical, allowing a much richer experience. Today, a typical smart phone is orders of magnitude more powerful than a Cray-1. The keyboard is mostly replaced by a mouse or even multitouch screens. Even in everyday life, It is very difficult to communicate using text alone, because there often need to be additional clues to indicate how it was meant. That's why we need emoticons in text messages and forum posts!

For the same reason, trying to communicate your programming idea to the compiler is best done graphically! Suddenly all the restrictions of text based code are no longer present. With LabVIEW, you can easily create programs that do many things at once. Dataflow determines the execution order and the compiler has a much better grasp on what should happen, but it also has much more freedom to arrange things in a way that all CPU cores can be kept busy if needed, or gracefully leave them idle if nothing needs to be done.

Remember, the LabVIEW compiler directly processes the diagram into machine code. It does not generate intermediary text based code.

As I said, it is all about communication. Over the millennia, technology has provided great advances, from smoke signals, clay tablets, morse code, radio, telegrams, b&w TV, color TV, HDTV, internet, etc. and the advances will continue at the accelerating pace we've seen so far.

Programming is basically about communicating to the compiler what you want the program to do. Why stick to technology that is nearly a century old to outline the compiler your thoughts and ideas?? Seems ridiculous if you think about it!

Graphical programming is the future, and LabVIEW will continue to evolve to adapt to our needs as technology improves. Even today, we can write LabVIEW code that can run basically unchanged on a desktop computer, on an embedded system, or even directly on an FPGA chip.

The ease of graphical programming let's us be more productive. A given program can be done in less time, or a program can be more feature-rich for the same effort. This gives us more time to push the boundaries of programming and advance it to the benefit of mankind.

Additional resources



The "Father of LabVIEW", Jeff Kodosky, reflects about LabVIEW at NI Week 2011.

Jeff Kodosky at NI Week 2011