FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Progamming for Dummies

I really know nothing and I need to learn. The FRC manual does not help me because I don't understand the terms used. I don't know what variables are, I don't really understand any of the loops, and that's just a few of my problems. I want to learn how to program, not just copy and paste programs and hope it works. So i want to know if there is a manual in "english" and where i can get it.

0 Kudos
Message 1 of 7
(5,707 Views)

I'm not positive as to whether or not there is a better guide to programming, I have a decent background in computer science and i've been programming for almost 4 years now so alot of the terminology is easy for me. I'm still new to LabView though! I find it easier to take baby steps into the programming world untill your comfortable with the logic that ensues programming itself. for example loops are something that are in every language that has any use. The old saying you have to crawl before you walk comes to mind, you cant program an entire robot with complicated features before you know simple basics. I suggest learning another language like java or C++ before trying anything more then copying code unless you want to try simple experiments. this is unfortunately a time consuming task, i've been using java for 2 years and im still learning new features. Think of this year as an experiment and just get a moving robot, then practice practice practice for next year.

0 Kudos
Message 2 of 7
(2,868 Views)

There's a wealth of training material, probably so much that you won't have time for it all. Learning to program is not a simple task, like Andrew said.

For basic LabVIEW programming, NI has a list of their training resources: http://www.ni.com/academic/labview_training/ I like the LabVIEW in 6 hours self paced course.

Once you know LabVIEW, programming for FRC can still be daunting, even for experienced programmers. Some materials that are directed specifically at FRC are http://frcmastery.com and http://decibel.ni.com/content/docs/DOC-8923

0 Kudos
Message 3 of 7
(2,868 Views)

Where are you located? Does your team have a mentor who can assist you with the programming? It is a nontrivial task to learn programming on your own. Even though LabvIEW makes things a bit easier you would be able to learn much faster and easier if you had a mentor to help you. You might also want to get a copy of "LabVIEW for Everyone". This is a good book for beginners.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 4 of 7
(2,868 Views)

I tend to disagree with many of the comments.  I am thoroughly pc illiterate (I use a mac) and have never programmed but with a bit of help from

the good folks on the phones at ni I got a decent teleop mode program going. I think you are the one that is correct.  The training materials offered by First are wretched and are almost completely irrelevent to our most basic needs of getting motors and solenoids working with joysticks and buttons on the joysticks.  I have looked at almost all the examples, watched all the training videos. I read this forum everyday and see problem after problem that could have been addressed with better, more relevent and more up to date training materials.  I have spent  a bit of time on the phone with the good folks at ni and without them I seriously would be demanding my money back this year (right Adrian at FRC?).

Anyway, I am attaching my file of the program I wrote with Olivia (the saint of ni) patiently helping me. I have problems with keepng the solenoids assigned to the correct joystick buttons but basically this gives you three motors controlled by three joysticks and six solenoid outputs (assign them on the front panel) triggered by six buttons on joystick three (USB 3).  THe great thing about LABview is how easy it is to copy and paste, "grab" bits of code and move it with the arrow keys. The "wires" that shuttle data around are virtually impossible to hook up incorrectly.  THere are lots of little quirky things though like this one:  if you copy and paste an icon (say a get jostick icon) into a while loop you cannot immediately wire it to another icon.  YOu have to grab it, move it outside the while loop for a second, and then move it back in the while loop.  Then you can wire it. Go figure!

Good luck

0 Kudos
Message 5 of 7
(2,868 Views)

richardharman wrote:

THere are lots of little quirky things though like this one:  if you copy and paste an icon (say a get jostick icon) into a while loop you cannot immediately wire it to another icon.  YOu have to grab it, move it outside the while loop for a second, and then move it back in the while loop.  Then you can wire it. Go figure!

Sadly you are encountering a bug that NI introduced in version 8.6.1 regarding the copy and paste. This bug only existed in that release and believe me it drove me crazy. I program LabVIEW for a living and this one bug, while realtively minor in terms of what it did was one of the most frustrating bugs I have had to deal with in all my years of LabVIEW programming.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 7
(2,868 Views)

Actually I don't agree with your advice suggesting to learning general programming concepts using other languages. The basic programming structures, loops, conditional statements, arrays, etc. are the same regardless of what language you use. If someone will be using primarily LabVIEW then why learn programming techniques using a different language? The person would leanr to think in terms of sequential programming and then have to unlearn that and begin thinking in terms of data flow. It would be best to learn the general programming techniques using the language you will be working with.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 7 of 7
(2,868 Views)