|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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?
|
|
#2
|
|||||
|
|||||
|
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. |
|
#3
|
||||
|
||||
|
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 |
|
#4
|
|||
|
|||
|
Re: LabVIEW for C/C++/Java Programmers
I am comfortable with LV ,C/C++ and matlab. Our team chose to stay with C++ for FRC target code but since I always do engineering simulations of our control systems including the pneumatics my language preferences vary.
For engineering analysis, I usually prefer matlab but find the intended users are often unfamiliar with it or don't have matlab installed. Since most of the kids have C capability, several build seasons I used C to write the simulations and used EXCEL to do the graphing. Recently, I've wrapped LV I/O functions around C programs to extract the utility of both languages for quick simulation. The LV graphics are powerful and the text editing of C beats the somewhat clumsy data flow editing of LV particularly when dealing with logic and simple math. The plus is that most teams have LV working now so the software is portable. Had our team used LV, I think it would have been easy to build an autonomous mode simulator that used LV embedded target code for the control system and LV for the simulated dynamics and graphics as some teams have done. Often times hardware availability dictates the use of LV. At the college where I mentor we had an NI DAQ board lying around so we chose to use LV to write the control system for a STM project to aid a nanotech initiative. It took longer since I had to learn LV but like Alan said when you give in to the data flow concept the work flows easier too. If NI offered up a good cheap virtual space modeling capability I'd use LV more for sure. Maybe they will include more graphics and virtual capability in next year's kit. Last edited by vamfun : 08-06-2010 at 04:09. |
|
#5
|
||||
|
||||
|
Re: LabVIEW for C/C++/Java Programmers
I agree, with a heavy background in Java, switching to Labview was a burden, yet I just read the Labview manual once or twice and things started to make sense. I have no clear method to decipher Labview into some other language, other than reading the manual and trial & error.
|
|
#6
|
|||||
|
|||||
|
Re: LabVIEW for C/C++/Java Programmers
I have to agree that Gdeaver hit the nail on the head! Procedural versus data flow are different beasts, both to be tamed and put to good use. A good conceptual middle ground is to learn to exploit the benefits of procedural programming in a multi-tasked/multi-threaded environment. Spend some time learning to use things like semaphores, messaging, state programming.
I've been programming as a professional since the early '80s. I have used many different languages. My first exposure to LabView came in the early '90s. At the time I was working for a controls company and we were investigating LabView as a tool for developing User Interfaces (UIs). One of the tasks I was assigned then was to implement a serial protocol using it. Not the best tool for the job. Like has been stated earlier each choice has its strengths and its weaknesses. Look at the strengths and weaknesses of your programming team and pick the environment that fills in the gaps. There are ways to use both LabView and C++ in a PC environment and I hope they expose that capability for FRC in the near future. On another note, early on in using LabView for FRC my son and I wrote a simple motor simulator VI in LabView. It was a great learning experience and gave us some tools to work out the bugs in our PID routines. Has anyone else used LabView to build up a virtual library of useful FRC components? |
![]() |
| 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 |