Well it’s not just syntax. Some basic programming concepts don’t get introduced with labview, while others get introduced spectacularly well. I’ll use this example from NI tutorials.
Here you can see A simple autonomous program. It will drive and turn right for a second, as well as drive and turn left for half a second.
Let’s talk about things it does well first
State Machines - I can clearly see 3 distinct states. When one finishes, it goes to the other. This is a really hard concept for some students to grasp, and I think the example makes it really clear what a state machine is, what’s it’s useful for, and how it works.
Simple - There’s nothing too complex about this code. I can understand what’s happening (for the most part. More on that in the cons). I can see a drive object, I can see the arcadeDrive method being called and what arguments are going to it, and I can see the general flow of the program.
Now the cons
Structure - The first thing I noticed was there’s no ‘line-by-line’ format like there is in text based. In the first block, I see the 50ms delay. Does this happen first? Last? When? There is no concept of order.
State Machine Transition - While Labview shows how state machines work well, the one thing they are missing is the transition phase. One thing I think is important to learn is the concept of keeping track of your states, and then checking which state you’re in, and performing an action based on that state. Labview does make states easier, and I’ll give it props for that, but just something that may be overlooked by students learning
Arguments - There’s no structure to the arguments either. Arguments in Labview are more like keyword arguments in Python. They don’t have to be in any order, since each one has a specific key to go with it. When learning text based languages, it may be hard to grasp this concept of order because previously there was only 1 spot for the argument, and it didn’t matter which one you added, as long as the wires went to the right spot. Just a thought.
Weird style - If I’m “reading” this right, the way the loops work is it’s basically
while True:
blah blah blah
if (i++ >= 10)
break
now, if I saw this in someones code, I might kill them. Anyone can tell you this is a stupid way to write code. But that’s the way labview (or at least this tutorial) does it.
Initialization - That variable i comes out of nowhere. It’s not initialized. That’s just cray cray.
That’s my rant/debate/whatever. I’m sure I missed a few things.