PDA

View Full Version : please some tell me how to start programing in labview


mahmosh
11-05-2008, 09:46 AM
hey there ... i am from israel ... 1946 team ... i downloaded labview 8.5.1 program ... but i donno how to start... how to program for the new controller ... please i need ur help ...
mahmod...

Roboj
11-06-2008, 11:57 AM
hey there ... i am from israel ... 1946 team ... i downloaded labview 8.5.1 program ... but i donno how to start... how to program for the new controller ... please i need ur help ...
mahmod...

I suggest looking at ni.com/first

There are LabVIEW tutorials, videos on setting up the new system and writing programs, and other examples.

DonRotolo
11-06-2008, 04:23 PM
With LabView installed, on the opening screen there is a link called "Getting Started with LabView". It will be your best friend. Read & follow the instructions.
Also, see http://decibel.ni.com/content/community/first for the latest info from NI

Don

kamocat
11-06-2008, 10:50 PM
The easiest way to learn any programming language (especially Labview) is to choose something you want to create for practice, and then attempt to build it. If you have $70.00 to spare, "Labview for everyone" covers most of the generic things you'll need to do. It really does go slow enough for anyone to follow along; if you're used to programming, you should be able to just skim through.

One of the most important and most useful things is the polymorphism (Labview handles most datatype conversion for you). Also, there's a lot of stuff hidden away in Mathematics, especially in the subpallettes of the "numeric" subpallette. Because of these two things, I found a lot of my origional subVIs weren't actually neccessary. If you have data in a cluster or array, remember that you can perform math on the array or cluster as a whole, instead of having to perform it individually to each item. Autoindexing (in both FOR and WHILE loops) is your next best friend.
Unless you find them to be unuseful and in-the-way, always have the context help and tool pallette visible.

Gdeaver
11-07-2008, 06:51 AM
While the NI tutorials are good, they tend to be fragmented. Also if you have programmed in a procedural language before, the data flow mindset of Labview can be hard to embrace. I would recommend that anybody that has downloaded the Labview trial version and can't get going, should buy a book on labview. I liked Labview for Everyone. You can find several on Amazon. Books still have value.

Gary Dillard
11-17-2008, 01:57 PM
So 2 years ago, when I discovered that we had zero programmers on my new team, I went through the EasyC tutorial in about an hour, and about 2 hours later I had all the code written to drive and operate the robot. I loved EasyC because it allowed me to teach programming logic (which I understand) to the students (who had never been exposed to it) without stumbling through syntax of a new language.

I have never used Labview, but I quickly glanced at some of the online tutorials and it appears to be kinda sorta like EasyC as far as drag and drop is concerned. Can I expect to figure it out in a couple of hours and teach my new students logic in the same way, or should I start taking my C++ books to bed with me at night and put Mike Walker's cell phone on speed dial?

Burmeister #279
11-17-2008, 02:15 PM
Gary: As Marshall [kamocat] said above, you should definately create some type of practice project for youself first, and then you should be able to recreate and advance it different ways to where you can easily explain it to your students. I personally created several different things including mapping an old usb joystick and using it to find the angle/direction/speed that it would drive different drivetrains should it be used later. This should be fairly easy for you if you are familiar with EasyC. There are several tutorials on here [no links atm] that tell you to create something such as a 'working' vending machine. After that, syntax and logic should be easily passed on to the students.
As far as writing code for the robots, you have to remember that WPI is creating a whole series of ... [the word escapes me but they are basically functions] that will aquire joystick and sensor values from the robot through cRIO. this is a horrible explanation of what they are but as long as you know you won't be dealing directly with writing code to get them.

~~Burmeister~~

Joe Ross
11-17-2008, 06:02 PM
So 2 years ago, when I discovered that we had zero programmers on my new team, I went through the EasyC tutorial in about an hour, and about 2 hours later I had all the code written to drive and operate the robot. I loved EasyC because it allowed me to teach programming logic (which I understand) to the students (who had never been exposed to it) without stumbling through syntax of a new language.

I have never used Labview, but I quickly glanced at some of the online tutorials and it appears to be kinda sorta like EasyC as far as drag and drop is concerned. Can I expect to figure it out in a couple of hours and teach my new students logic in the same way, or should I start taking my C++ books to bed with me at night and put Mike Walker's cell phone on speed dial?

I think you'll find that LabVIEW is somewhere in between EasyC and a real text based language in the way you want to use it. One of the great parts of EasyC was the WPILib, which abstracted many things, making them simpler. That level of abstraction is built into both the LabVIEW and C++ libraries this year.

Unlike EasyC, LabVIEW is a real programming language (technically, G is the language). That means that there is syntax to know, it just looks different. Instead of complaining that you missed a semicolon, it will complain that you missed a wire. LabVIEW generally has good error messages too, which helps. I never used EasyC, though, so I can't make a real direct comparison.

If you haven't already, you should check out the video tutorials the NI has been posting on their FIRST Community (http://ni.com/first). The Joystick Motor Control in 10 Minutes (http://zone.ni.com/devzone/cda/tut/p/id/7977) Tutorial should give you an idea of the minimum needed, and some of the other ones will demonstrate things more advanced.

No matter what route you choose, it's always a good idea to keep Mike Walker's cell phone on speed dial.

RMS11
11-17-2008, 06:37 PM
Is there a toolkit available to help with first robotics? If so, where can I download it. Is there much programming you can do without it? :D

kamocat
11-17-2008, 07:17 PM
As of yet, the toolkit is not released to the public. There ARE help files for this toolkit published, but don't expect the toolkit until December, when the control KOP is shipped out. (Unfortunately, this probably means you get the cRIO for christmas, not Thanksgiving. I really hope they don't pick a low-priority shipping; All I want for christmas is a cRIO.)

Gary Dillard
11-17-2008, 08:11 PM
Thanks for the advice.

My new team had its first mentors meeting tonight; guess who got pegged to be the software guy?

Yep.

And by the way, I don't need to put Mike's cell on speed dial. I've had it there for years.

Alan Anderson
11-18-2008, 06:46 AM
I have never used Labview, but I quickly glanced at some of the online tutorials and it appears to be kinda sorta like EasyC as far as drag and drop is concerned. Can I expect to figure it out in a couple of hours and teach my new students logic in the same way, or should I start taking my C++ books to bed with me at night and put Mike Walker's cell phone on speed dial?

If you start with the assumption that LabVIEW is "sorta like EasyC" you'll quickly find yourself frustrated by the differences.

If you start with the understanding that the LabVIEW graphical programming language is a different kind of language altogether, you'll be able to get comfortable with it much more easily. The fundamental thing to keep in mind is that it's data which controls execution, not program structure per se. Each block is trying to execute simultaneously, waiting for its input to be available before doing its job and providing an output.

Unlearn what you know about procedural languages and embrace the goodness that is LabVIEW. That's my commitment for this season. Fortunately, LabVIEW for FRC will come with a wealth of applicable examples and tutorials. The brief glance I had at it last weekend gives me a very warm feeling about how well we will be able to use it.

MorbidAngel
11-23-2008, 08:17 AM
You can go onto http://www.education.rec.ri.cmu.edu/content/events/ftc/labview/index.htm and they have lots of tutorials on how to do stuff

rjmah
12-06-2008, 12:35 AM
If you start with the assumption that LabVIEW is "sorta like EasyC" you'll quickly find yourself frustrated by the differences.

Unlearn what you know about procedural languages and embrace the goodness that is LabVIEW.

I still think the best analogy for Labview is to think signal processing and electronic board layout. Digital and analog in to digital / analog out. What you put in Labview are amplifiers, comparators, conditional signals and many advanced functions to make your outputs.

kamocat
12-06-2008, 12:59 AM
Wow
That's a really good way of thinking about it. Here we have our reprogrammable hardware (FPGA), and we're programming it like true hardware (an electronic diagram). We could even go so far as to say arrays are our ribbon cables.

Greg McKaskle
12-06-2008, 07:31 AM
If these are useful to get you started, great, but there are big differences, specifically LV processes discrete chunks of data in a synchronized fashion. It is somewhat more like a digital circuit with clocking and enabling controlled by the dataflow needs.

Greg McKaskle

Annette Somers
12-14-2008, 01:30 PM
I know how to start programming in Labview, but I'm looking for info about doing advanced stuff like inter-task communication (eg, semaphores).

Is that included in the book, "Labview For Everyone"?

If not, can anyone recommend a book that covers it?

Thanx.

--Annette

jdejoannis
12-14-2008, 01:45 PM
Run the benchtop control system test to make sure everything is working and set up correctly. Then start with very very simple programming tasks and work your way up. Look for concrete examples in the manuals. I found some in WPI's C/C++ Programming Guide. Even if you are using LabView, these examples are still relevant since you will be using the same WPI functions to get the job done.

kamocat
12-14-2008, 04:03 PM
Yep, that's in it. Beginning of Chapter 13, I believe. It also covers state machines, queues, locked resources, local and global variables, and some other cool stuff.
Unfortunately, the book is around $70 (I don't know why they never make $25 textbooks)