Until about a month ago, all of my experience writing code had been with text-based languages like C and Java. I had mostly written code to command microcontrollers or for signal processing. C allowed me a very procedural view of how the microcontroller would execute the code. One line of code could tell the microcontroller to turn on an LED and the next could tell it to turn the LED off, and the microcontroller would always execute the first line first and the second line second. Then I started at DISTek and learned how to code in LabVIEW. LabVIEW is quite the departure from text-based languages. I would like to describe how LabVIEW compares to text-based languages and some of my experiences learning LabVIEW as a new software developer.
Text-based languages facilitate structured programming very well. Generally, given two lines of code, the first line will execute first. But LabVIEW is a dataflow programming language. You don’t write code, you draw it. For example the lines coded in C, below, would equate to the code in LabVIEW beneath them.
int x = 2 + 2;
double y = 4.3 – 6.2;
The catch is that in the LabVIEW code, you don’t know which operation is going to execute first until the code compiles. Because of this, LabVIEW naturally encourages using a declarative programming style, which is more concerned with what a program should accomplish. This is in contrast to C, which is an imperative language, and defines how a program executes commands.
One advantage to the dataflow environment is that it allows for very natural parallelization of your programs. You can create two independent loops very easily in LabVIEW, and they will naturally operate independently of each other. From my experience, parallelization is more difficult to implement in text-based languages.
Learning how to use LabVIEW as a new software developer was interesting. National Instruments (NI), the company that developed LabVIEW, has a lot of good resources available to help learn how to use it. Along with courses aimed at people just starting out with LabVIEW, the NI website has forums and documents relating to every aspect of LabVIEW. These resources were very well developed and made learning LabVIEW very painless. Another big help was my lack of experience with software development in general. As a new developer, I haven’t become too accustomed to using one language over another or one development style over another and because of that I think it was much easier to adopt LabVIEW’s methods than someone who has been programming with languages like C and Java for 25 years. That’s a lot of experience to overcome in learning how to use a new tool.
More from my site