|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#46
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quick question: is the LV RT a bytecode based system (like Java) or is it just a run-time linked library?
|
|
#47
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
From what I've heard, its a bytecode system, but its is just a hair slower than java, and only enough to make java faster for the camera. The Java camera code is actually written in C++, which i raw machine code, being the fastest.
Last edited by Robototes2412 : 04-04-2010 at 22:48. Reason: I cannot type today, i was fixing the 14 spelling/punctuation errors |
|
#48
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
1990 - that long ago - now I feel old! Anyways, LabView is a great product and NI a great company. How efficient are the resulting binaries compared to code generated by commercial and open source compilers? NI does many things well but can it be that their compiler tech is way ahead of companies and open source contributors whose sole focus is compilers? Maybe so...
Why would one language be better in a multi-tasking environment than another? The VxWorks kernel and its native API are in C. Some languages (like Ada) have multi-tasking elements built into the language. I can see how they are more convenient. But you can't hide or abstract things w/o it being slower and/or less capable. Even the compiled versions of LabView must access the VxWorks API and the system call interface to interact with the OS. In any language some simple calls setup the tasks. The kernel does the multi-tasking for you w/o any further work by the application code (given a good design). I love to use LabView for many kinds of tasks. But I would NEVER hire a software engineer to do embedded work that cannot use C/C++ effectively. Many times it is all that is available. Last edited by wireties : 04-04-2010 at 22:59. |
|
#49
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
Everyone talks about C like it is the end-all-be-all of speed and efficiency, which confuses me because C is not the lowest level and seems like a rather arbitrary choice. Forgive me if I'm totally wrong; I'm no expert at the low-level stuff. |
|
#50
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
If done correctly, the general stuff you write for one platform in C will work with little to no modification on some completely different platform. With machine code, you can't do that. The other thing is that C was designed to write things that used to be written in assembly language, so to some degree that influences its design and usage. |
|
#51
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
The absolute ease of creating detailed front panels that provide real time feedback of ALL your variables, sensors, inputs, etc is an incredibly powerful tool. You can do the same thing in the other languages, but not nearly as quickly or easily. The tools are already provided for you in Labview - just drop the components you want on the front panel. Not having printf's is a wonderful thing. I agree with the builds and downloads taking a bit, 4 minutes is pushing what you can handle during eliminations. |
|
#52
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
http://code.google.com/p/webdma/ |
|
#53
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
Greg McKaskle |
|
#54
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Good questions. Quoted section marked with ***s.
*** How efficient are the resulting binaries compared to code generated by commercial and open source compilers? The performance of compiled LV code varies depending on the data types and data access patterns in use. The LV compilers have traditionally been pretty simple, thus quick to target to new HW, but not as time or space efficient as more optimizing compilers. Over the last few years, this has improved quite a bit -- using LLVM internally in order to get better codegen. *** Why would one language be better in a multi-tasking environment than another? The C language knows nothing about threads or parallelism, those are added at the library layer. The C programmer needs to use explicit mutexes, semaphores, critical sections, and threads in order to ensure safe and correct execution in a multitasking environment. A C function foo(int a) doesn't declare how thread safe it is, it typically isn't analyzed for thread safety, and there are no keywords for marking it as reentrant, critical-section, etc. By comparison, in LV, language features such as functions and wires are inherently multi-task-safe. By default, functions have a critical section around them, but a simple property change makes them reentrant. Each function call also allows for a priority change. Wires ensure the value read is delivered to each branch of the wire regardless of when it is executed, avoiding unwanted side effects. So it isn't a matter of simply being better, but being more automatic and more safe. It is possible to write totally sequential LV code with no parallelism, but it is actually more natural to specify the code with dataflow parallelism exposed, which LV will then execute that way with the assistance of the OS. Similarly, it is possible to write C code that does lots of parallelism, but it is more natural to write the C code in a sequential form which will be executed with no parallelism. Compiler options for vectorizing C do exist, they have for decades, but the options are not used that commonly. Compilers for parallelizing C are more rare, are generally still a research topic, but seem to be on the near horizon. *** The VxWorks kernel and its native API are in C. Some languages (like Ada) have multi-tasking elements built into the language. I can see how they are more convenient. But you can't hide or abstract things w/o it being slower and/or less capable. Even the compiled versions of LabView must access the VxWorks API and the system call interface to interact with the OS. In any language some simple calls setup the tasks. The kernel does the multi-tasking for you w/o any further work by the application code (given a good design). The LV execution engine augments the OS scheduler to allow it to carry out execution according to the dataflow specification. It doesn't replace the OS threads package, but attempts to use it automatically and efficiently. Greg McKaskle |
|
#55
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Then here's the question of the hour: can i write labview code in a line-based language, like python?
|
|
#56
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Answer of the hour ... anything is possible, but NI doesn't provide a textual form of the language, at least not yet.
Greg McKaskle |
|
#57
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Quote:
![]() |
|
#58
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
Great stuff, and Greg I really appreciate your input. Sure you're from NI, but I feel you've been objective.
As a mentor, I'm bummed about the lack of growth in our programming team. We have 2 or 3 people usually doing some code, but one uber-coder who likes to pursue some ultracool stuff that most others can't keep up with. Last year, that ubercoder had some personal issues and wasn't available for some chunks of time, so one mentor and his son learned to do just about everything in LV in a couple of weeks. For teams that don't have an ubercoder who loves data, bits and bytes, go LV. If you have an AP Comp Sci class at your school, Java might be the way to go since you have a class of programmers at your school. For the code-jocks who like to have access to pointers and the core of code, they won't let go of C++. But the bigger question is around the "I" in FIRST: is your goal to code, or inspire coders? For that, LV might be the biggest winner, and we're going to be making a bigger move into. |
|
#59
|
||||
|
||||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
I can't say much in comparison with Java or C++, but I have threatened our LabView code into working with wire cutters...
|
|
#60
|
|||
|
|||
|
Re: PROGRAMMERS: WIND RIVER C++ vs LABVIEW vs JAVA
correction, the write another C# program to make a graph of the data!!! now you have 2 languages!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wind River Cds | Team1710 | C/C++ | 0 | 22-09-2009 10:57 |
| Uninstall Wind River | Lord_Jeremy | C/C++ | 0 | 15-01-2009 15:56 |
| SVN wind river | Mr.Macdonald | C/C++ | 3 | 13-01-2009 12:40 |
| Wind River Help | BenB | Programming | 3 | 02-01-2009 21:42 |
| Open Wind River | excel2474 | Programming | 12 | 31-12-2008 17:36 |