total noob question :)

Ok, so I know that this year we can program the robot in any of the three languages:

LabView
C
C++

and we will probably do it in LabView, but I was wondering if anyone knew where there is a place for a good C tutorial. I know a bit about C, thanks to C For Dummies, but I’m almost positive that doesn’t have everything I need to know, so if anyone knows where I could find more tutorials on C that would be amazing, thanks guys

I believe there is a C for dummies book out, and a C++ for dummies, but no LapView for Dummies.

Some teams make C tutorials I’ve been told, you can find some online, there also lots of books that can instruction one in programming, but free, well, I’m not sure…

Are you not able to get a mentor? I mean there are quite a bit of tech companies in Idaho that you should totally go ask for mentors!

Hehe, I thought Dean Kammen’s speech was really good today, despite its length. =]

http://www.cprogramming.com/ is pretty good and Stanford has free online recordings of their CS department lectures. I don’t remember the link, though.

http://wiki.lavag.org/LabVIEW_tutorial

There is indeed a LabVIEW for Dummies book (as well as many other resources referenced in the above link).

Russ

There is a C tutorial on the First web site that we used last year during our Rookie year; http://www.usfirst.org/community/frc/content.aspx?id=482

You won’t find a LapVIEW for anything, since it is actually LabVIEW. The book that most closely approaches the dummies book would be LabVIEW for Everyone. There are plenty others too.

Greg McKaskle

I also don’t think LabView is a language.

Technically, you’re correct. LabVIEW is a programming environment, not a language. The language one programs in when using LabVIEW is called “G”.

But most people talk about “programming in LabVIEW”, and they’re technically correct as well. They’re writing and editing programs, in the LabVIEW environment.

There are a number of good C resources. I’m listing a few below. I also recommend Harbison and Steele’s C: A REFERENCE MANUAL and, if you’d like to be a C monk, Peter Van Der Linden, EXPERT C PROGRAMMING: DEEP C SECRETS.

Beej’s Guide to C Programming

Jacob Navia’s “A quick introduction to the C language”

Embedded C Traps and Pitfalls

There is also the entirely useful and intriguing Ch dialect of C. This is C implemented as a powerful interpreter, so it can be used for scripting as well as programming. It affords all the capability of C, plus the dynamism that comes with an interpretive environment, including the ability to debug more readily. While it is a commercial product, the Ch Standard edition is free for the download. It also offers both heavy numerical support and the for-purchase Embedded Ch, which lets runtime call a Ch interpreter for script execution with certain advantages.

Ch is also available for Unix/Linux and has packaged with it all your favorite Unixen commands available from the WinXP shell.

I know it would be breaking the FRC mold a bit – and it’s certainly not a task for a Rookie Team – but basing a FIRST entry upon Ch and its world would be most interesting.

I don’t know Alan, I use LabVIEW at work, and I’m more used to traditional (C/C++/BASIC/etc) style programming, and I wouldn’t even really consider G to be a “language” per se. I like to refer to LabVIEW/G as “Programming with flow-charts.”

The C setup they have actually just wraps C++ functions in C constructs. There was some significant discussion about this during the Beta period. We didn’t see the C wrappers until late in the Beta program as well. We also ran out of time to test the C implementation.

If you are going to go down the C/C++ path I’d recommend sticking with C++; it’s not really any more or less difficult and you remove a layer that could possibly cause problems.

The example code (both simple and ‘default’) provide enough template code to be able to work your way through implementing other features.

For C++ tutorials:
http://www.cplusplus.com/doc/tutorial/

D. Sean Kelly
Team #499

I tried to learn some over the summer too…

my dad showed me this site:

http://www.cs.cf.ac.uk/Dave/C/node4.html#SECTION004100000000000000000

LabVIEW’s “G” language is a Dataflow programming language. Dataflow programming started to gain popularity in the late 70’s / early 80’s with the emergence of supercomputers supporting large levels of concurrency.

Dataflow programs are referred to as “data driven” because the flow of execution is determined by the availability of data in the program, not a sequential order. When you write a program in a structural language like C or C++, execution of commands (lines) must occur in sequence (although this order can be somewhat controlled by the use of threads).

Dataflow programming languages, such as LabVIEW, don’t impose this restriction. Any part of the program can be executed at any time, depending on when the individual components receive inputs (in LabVIEW, this happens along the wires).

A dataflow program consists of a set of actors (in LabVIEW they are called components) connected by relations (wires). When an actor has received all the information it needs to perform its assigned computation (ex. an addition actor needs two inputs, A and B, to perform A+B) it does so and passes the result along wires to connected actors. In this way, data propagates through the program to the other actors.

This is all really cool because, by default, Dataflow programs are highly concurrent. Any actor can perform its assigned work whenever it has data available- even at the same time as other actors! While this isn’t terribly useful for our controller, as normal desktop CPU’s keep getting more and more processing cores, this type of programming has the potential to become very important. Free concurrency!

My point is, don’t feel like you need to learn C or C++ to program competitively in the competition this year. Many experienced programmers don’t like LabVIEW because it is radically different from what they are comfortable with. While I haven’t familiarized myself with the new control system, LabVIEW as a programming language can be just as powerful as C++. Any difference is due to a more optimized compiler / architecture.

LabVIEW is not necessarily less powerful than C++, it’s just different.

See also:

Why do people insist on naming languages after letters?

The free online stanford CS courses.

They really stress software engineering, not so much learning a language.
http://see.stanford.edu/SEE/Courses.aspx
The professor is pretty good though. At least for the one that i watched.

Also from the description of labview that we just received, it sounds as if it would work best with VxWorks, because VxWorks is an RTOS (Real Time Operating System) that is “hard-real time” RTOS…

basically it’s an operating system that all events must be finished by their scheduled times, if they aren’t done by then it’s considered a failure of the system.

thus labview and the VxWorks seem to go hand in hand.

Does this make sense to everyone else?