08-14-2009 03:11 PM
billko wrote:
...I was going to do a "hello world," but...
Here it is....
08-14-2009 03:42 PM
Joe_H wrote:The best book to use to get started with is called LabVIEW for Everyone 3rd edition by Jeff travis and James Kring.
You can also use the getting started manual that comes with LV. It usually comes in PDF format too. there are also some tutorials out on the web that are for free.
And no you cannot learn the basics in 5 minutes. Yes you may be able to actually find what you are looking for on the functions pallete, put it on the block diagram (considering you know what that is) and right click on it and add controls and indicators in 5 minutes. But to know the basics will take you a couple of days. Years to master.
Message Edited by Joe_H on 08-14-2009 02:30 PM
Okay, Joe:
I'll concede it takes 15 minutes to learn. But what you just described to me *is* the basic stuff. I taught someone how to program a VISA instrument in 15 minutes just by showing him where the stuff was and giving him general instructions on what a wire was and what the inputs and outputs were. He strung them up together himself and in 1/2 hr he was making drivers and the next day he was writing tests. Which actually is about exactly the time frame you suggested, by the way. I am in no way disagreeing with you. I think maybe our definitions of "basics" is different, that's all. 😉
My reasoning behind presenting it as simple is because I wanted to stress the SIMPLICITY of LabVIEW, which is its beauty, not HOW COMPLICATED it can be. Sure, buying all those books and clicking on all those links is a great way to learn, but the best way is to plop some stuff on the block diagram and go to town. I wanted to encourage that kind of exploration to the noob so he wouldn't be handicapped from the get-go by thinking it was a complicated thing to learn.
To me, trying to find the stuff was always harder than knowing what to do with it, even from the beginning. Even now, I just ues the search if it's something I haven't used often.
Please, I'm not trying to start a fight, or to demean anything you guys are doing. I certainly respect all your knowledge and don't mean to dismiss it flippantly, but it's not all that complicated to learn, either. 😉
Bill
08-14-2009 03:46 PM
Broken Arrow wrote:
billko wrote:
...I was going to do a "hello world," but...
Here it is....
Nice!
08-14-2009 03:55 PM
billko wrote:
Broken Arrow wrote:
billko wrote:
...I was going to do a "hello world," but...
Here it is....
Nice!
You should take a look at this one.
Or this one. (Try to figure out how it's done before jumping to the answer, which occurs later in the thread. You may need to have some background in earlier LabVIEW versions to figure it out, though. That's how I figured it out.)
08-14-2009 04:32 PM
Wow, I can't believe the response! As of this afternoon I have access to LabVIEW 8.5. I have to get home tonight but will be back to work with it tomorrow morning. I have printed the getting started manual (thanks guys & gals!) and will run through the examples tomorrow.
It is fun to see an enthusiastic group of people. I spend a bit of time on the MikroC forums (PIC programming) and they can be hit or miss although most people are helpful.
I will keep you posted on my progress.
Wayne.C - I plan to look into these modules further, for I need a QEI, ADC, and Strain Bridge to read a load cell.
I can back off on the acquisition rates a bit if necessary.
Looking at:
NICFPQUAD-510 4 axis Quad encoder |
NI CFP-SG-140 strain/ load cell 8 ch |
NI CFP-2210 |
NI 4 module backplane |
NI cFP-AI-112 16 ch. Analog |
Power Supply (NI) |
This forum does not like pasting from Word! Later, thanks again!
08-14-2009 04:41 PM
Broken Arrow wrote:
billko wrote:Ehhh, actually you could learn the basics in about 5 minutes.
No you can not.
I agree with BrokenArrow.
No you cannot. You can hack... Do horrible code by abusing everything...
However, there is a way to learn faster..
First step:
1. Forget EVERYTHING you learned from the text-based language.
2. Forget the words "extern" and "Static".
3. Know that you can program without globals and locals
4. Sequence Structures are your ENEMY
5. Forget ALL that you do when writing text-based language code
6. Visit this forum often and ask many questions
7. Do not think of using structures that you used in text-based language
8. Have fun programming instead of writing text-based code (euh... should I mention that I'm compiling a VxWorks code as I write this? 😉 )
9. Read ALL of the Nuggets
10. Forget about what you know from text-based language
11. READ ALL of the Rube Goldberg code examples (and do laugh)
12. Locals are forbidden. Read the Why People Say that Locals are Bad thread
13. Look under Help > Find Examples and do some searches on some code examples. THey are old and badly written, but will get you started.
14. In case you are supersticious, I rephrase... Forget what you know from text-based language..
It takes more than 5 minutes to accomplish the above.
Welcome to the world of LabVIEW
R
08-14-2009 05:55 PM
Ray.R wrote:
Broken Arrow wrote:
billko wrote:Ehhh, actually you could learn the basics in about 5 minutes.
No you can not.
I agree with BrokenArrow.
No you cannot. You can hack... Do horrible code by abusing everything...
However, there is a way to learn faster..
First step:
1. Forget EVERYTHING you learned from the text-based language.
2. Forget the words "extern" and "Static".
3. Know that you can program without globals and locals
4. Sequence Structures are your ENEMY
5. Forget ALL that you do when writing text-based language code
6. Visit this forum often and ask many questions
7. Do not think of using structures that you used in text-based language
8. Have fun programming instead of writing text-based code (euh... should I mention that I'm compiling a VxWorks code as I write this? 😉 )
9. Read ALL of the Nuggets
10. Forget about what you know from text-based language
11. READ ALL of the Rube Goldberg code examples (and do laugh)
12. Locals are forbidden. Read the Why People Say that Locals are Bad thread
13. Look under Help > Find Examples and do some searches on some code examples. THey are old and badly written, but will get you started.
14. In case you are supersticious, I rephrase... Forget what you know from text-based language..
It takes more than 5 minutes to accomplish the above.
Welcome to the world of LabVIEW
R
Ray:
Is that Dilbert with a black eye, or is it just that way on my monitor? 🙂
One thing you mentioned was "forget about what you know from text-based language" but the funny thing is, sometimes relating it to text based languages helps a lot. Functions are functions, text or LabVIEW. Inputs and Outputs are parameters to be passed into and returned from functions. Where the analogy breaks down is with wiring. I guess it's like a pointer? It's not the data itself, it just points to where the data is coming from.
Wow. I think I just grasped what you (all) are saying. You are saying that, as all good programmers should do, diagram/flowchart/etc the danged thing first before you jump headlong into it! Agreed, wholeheartedly. I wasn't suggesting that hacking is the way to do anything, but it's a good way to learn how the interface works. Even though my LabVIEW instructor encourages exploration, he'd have a stroke if he thought I'd encourage random hacking to get the job done. No, I was talking about introducing the person to the very basics, to show how simple the interface is. It is designed to let you concetrate on how things fit together, not on whether a variable needs to be global or local. All means, when doing serious programming, follow "best practices!" (Even in the example I used about programming an instrument in 15 minutes, he wasn't hacking his test code.) If THIS is what you mean by "basics," then of course you are right. My definition of "basic" is "learn how to connect things together. Learn what a control is and what a function is. Learn how to manupulate data. THAT is what I think of as "basic." Please comment if you'd like, but if you'd rather just drop the subject altogether, that is fine with me, too. 🙂
Bill
08-17-2009 09:31 AM
Hi Bill,
It's a black eye patch on Dilbert's eye.. I lost vision in my right eye about 1-1/2 year ago. I finally have some vision back, but far from being able to see.
Glad you read my post. 🙂
Most people who are new to LabVIEW try to program it as it if was a text-based language. So they try to give it a similar structure by declaring all the variables within the first frame of a stacked sequence structure. This is a bad way to program. For LabVIEW, the wire is the variable and there is no need to delcare it. Then, what people do after declaring the variable is to use Local and Global variablesto pass values. That is a bad practice that will cause endless headaches in the future (immediate & distant future).
You are right. Relating to any programming language is good. In LabVIEW, you could have specific functions become a VI (or sub-VI because it will be called from another VI).
The wire is the variable. It is not a pointer to the value, it holds the value.
LabVIEW is actually very powerful and a lot of fun. You can visualize the code a lot easier than with text-based language. Once you are familiar with the language and know which architecture to use, you will code much faster than doing the same code in a text-based language. There is no language which can be learned in 5 or 15 minutes.
This forum is excellent for learning. That and taking the NI courses. 🙂
Have fun.
R
08-17-2009 10:39 AM
Kyle.Kyle,
In general, the update rate of most cFP AI modules is going to be fairly slow and geared towards industrial I/O. Very rugged but not fast. In the case of the AI-112 the update rate can be calculated based on formula in the Update Rate section of the manual . The cFP-AI-118 is the fastest AI available for cFP. cFP-SG-140 will have an update rate of approx 1Hz depending on filter settings.
If you really need to sample data at much more than 1Hz, then you should probably be looking at cRIO platform.
08-17-2009 11:04 AM
Speaking as someone who recently went through this (been using LV about 6 months now):
> 1. Forget EVERYTHING you learned from the text-based language.
Not... quite - but close. I have managed to "translate" several text-based programs in to LV form, with much cleaner results, of course!
> 6. Visit this forum often and ask many questions
Definitely agree here - forum search has helped more than my reading books has (I never took a NI class - no time).
> 12. Locals are forbidden. Read the Why People Say that Locals are Bad thread
Also not quite - but keep in mind that most times when you want to use a local, you shouldn't.
> It takes more than 5 minutes to accomplish the above.
I've used LV for probably 1000+ hours now and I'm still learning, but I think I understood the key basics after a couple hundred hours.
Regards,
Michael Tracy
Synergy Microwave