|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
LabVIEW for C/C++/Java Programmers
(Long build-up warning, the actual question is at the bottom!)
To start off, the programmers on our team have pretty solid "conventional" coding experience with C/C++/Java. Last year, when we first got our hands on the cRIO and dev tools, we initially sided with C++, but after some frustration, switched over to the LabVIEW environment hoping for smoother sailing. After a couple weeks of tinkering with it, myself and the other programmer at the time found that we were never "really" able to wrap our heads around it, and the code we managed to produce certainly reflected that (we've successfully used it to scare people, including ourselves). When the competition finally came around, there was a quick rewrite of everything in C++ because it simply didn't work. Needless to say, we had better luck the second time around. So... clearly we're bad LabVIEW coders . Still, I couldn't help but notice how many other teams (ie, the vast majority or FIRST) had little to no problems working with it. So my question is this: has anyone else had trouble "figuring out" LabVIEW when coming from a so-called "conventional" programming background?(Side note: obviously, had we devoted the time necessary to truly understand it, this problem never would have existed. I'm just asking if others have had similar experiences) |
|
#2
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
My experience shows that those who have programmed in conventional languages have trouble switching to LabVIEW. I, having done little coding in C++, learned most things for the first time in LabVIEW. This made everything pretty easy. A couple people on our team who had coded in C had trouble relearning how to do things in LabVIEW.
|
|
#3
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
I certainly had a hard time moving from the languages I knew to Labview. But once you know how Labview works, it becomes natural to program in either language.
It really just takes a little time experimenting to become a Labview user I think the big advantage of Labview is how quickly non-programmers can pick up the concepts Last edited by rsisk : 06-06-2010 at 11:14. |
|
#4
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
I had no problem programing in LabView, but I was just starting. 2009 was the first year I started programing, I was learning Visual Basic in school and picked up LabView at robotics. My dad picked up LabView fairly easy, and he has been programing for many years (he wants us to use machine code
) I think the reason we picked it up so easily is because I was just starting and we learned together. I guess it all depends on your experience with LabView. |
|
#5
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
When we pre-ordered the new control system before the last season (lunacy) I spent about month learning LabVIEW. Didn't have any onsite mentors for it and I didn't read too much of anything in the idea of "how to do LabVIEW". It took a bit to first understand it, but once I got it, it was pretty simple.
-Tanner |
|
#6
|
|||||
|
|||||
|
Re: LabVIEW for C/C++/Java Programmers
Quote:
It's a very Zen-like situation. The less you know, the more you learn. To learn faster, you must first forget the knowledge you already have. |
|
#7
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
Quote:
~ Last edited by Ether : 06-06-2010 at 15:42. |
|
#8
|
|||
|
|||
|
Re: LabVIEW for C/C++/Java Programmers
Quote:
.The funny thing I found was that, after some LabVIEW experience with FLL, I didn't think figuring out the "new" FRC version would be much of a problem. I was sure wrong .But... even from that "basic" experience I didn't really have issues learning different languages later on. I think having some experience bossing computers around really helped to that end, actually. |
|
#9
|
|||
|
|||
|
Re: LabVIEW for C/C++/Java Programmers
Let's say that you know base-ten numbers. You learn basic arithmetic, multiplication tables, decimals, fractions, all in base-ten. As far as you know, this is the only way to do math and you are on top of it. Go you.
Then a new teacher, say the CS teacher, decides to teach you base-eight numbers. It is weird. Many of the things you know about math are not necessarily correct. Everything is slow, you make many mistakes, and really just want to pretend this never existed. Next the teacher brings up base-16, even weirder, and then base-2. Finally things start to click and you realize that there is nothing magic about base-ten, all of these are arbitrary, and there are benefits to knowing more than one system. A similar analogy to Cartesian coordinate system versus spherical, versus cylindrical, ..., also fits. True, a language is more complex than a mathematical convention, but the point is that many times, the second way to solve a problem is more difficult to learn than the first. That doesn't mean that there was an issue with either of them, but it is simply human nature and is a natural process. Once you get over that hump, the benefits of knowing two mean three and four come far easier. Greg McKaskle |
|
#10
|
|||
|
|||
|
Re: LabVIEW for C/C++/Java Programmers
The Key to Successful programming a robot in Labview is to understand the concept of data flow. Many of the text for Labview state that a procedural programming mindset can cause problems, but do not define or give very good examples of exactly what data flow means. There is an opportunity for some one to write a paper on data flow best practices. This would help the FRC community allot. Anyone up to the challenge? The next big thing that could help with the robot programming is a good tutorial on state machines. There are some good college level text on the subject but most students seam to have problems comprehending them. Another opportunity for a white paper. This year our robot code was much more complex than previous years. We had some serious control problems. As the the season progressed and the code evolved, it went from a procedural flavor to data flow and our problems resolved. This happened by experimentation not by design. The question is how to teach these concepts to new Labview programmers.
|
|
#11
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
Quote:
~ |
|
#12
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
Quote:
This is completely true. I took a course in programming languages, at first glance the class seemed simple, we had to learn the basics of different languages and write relatively simple programs. By this point in my Computer Science Curriculum I had little difficulty picking up languages. The real test came when new paradigms were introduced. (Functional and Logic programming). You have to forget what you know about programming and start again, obviously it is still easier to learn than it was to learn your first language, however it is much harder than learning an additional language that follows the same paradigm. Comparing it to learning spoken languages, Java to C++ is like French to Spanish, structure is the same, syntax is simmilar. Going from C++ to Labview is like French to German, the structure and approach are completely different. When moving to a new programming paradigm, it is important to remember to apply the lessons you have learned about how to learn a language, not to apply the lessons about the actual language. |
|
#13
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
This might sound like an idiotic question, but is there a way to edit labview code with a text editor?
|
|
#14
|
|||||
|
|||||
|
Re: LabVIEW for C/C++/Java Programmers
Quote:
It might be possible to take the "directed graph" which defines a vi and produce a text report containing all its information, but one would need to invent a syntax for it, and making changes to that report and reversing the process would be extraordinarily error-prone. |
|
#15
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
Ugh...I've learned several text-based languages over the years, but switching to Labview was the hardest one to do. One of the mentors would tease me about how I wrote my labview code with random sequence blocks in it, simply because I wasn't used to having an environment do things for me like race conditions.
I only use it for the dashboard, but it's still taught me some things |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA | krudeboy51 | Programming | 92 | 30-05-2011 17:00 |
| Labview and Java | chsrobotics3283 | NI LabVIEW | 3 | 13-03-2010 21:36 |
| New TipJar Video: LabVIEW for C++ Programmers. | LVMastery | Programming | 1 | 06-05-2009 15:41 |
| CMU Cam2 Java app (Help with Labview GUI) | Team 1649 | Programming | 3 | 26-12-2006 14:25 |
| Hints For Rookie Programmers | Noah | Programming | 30 | 20-02-2003 20:07 |