Go to Post There are simply not enough words to say how much the contributions of Dave and Woodie have given to FIRST, and countless students across the world. - Libby K [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2012, 11:04
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
No clue where to start on Programming...

Good evening Delphi,

My name is Adam of Team 3763. Our team has just recently started Programming, and I am our so called "lead programmer."

To simply state it, I have gone through and installed ALL required files onto the HOST Computer. These Files include: FRCLabVIEWupdate4.00for2012, FRC2012Utilities, and the FRC2012DriverStationUpdate. I have gone through ALL tutorial steps found here: file:///C:/Program%20Files/National%20Instruments/LabVIEW%202011/manuals/FRC_Programming_Guide/index.html#exampleprog. Now, I am at a loss as to what to do next. I'm unsure of what to do next. This is our first year with programming, but our second year with FRC. Any and ALL help would be appreciated. We wish to use an Xbox360 WIRED controller, however we CAN, if need be, use the standard provided Joysticks.

All help is appreciated from anyone. Please reply ASAP.

Thank you,
Adam of Team3763 - Wildcards
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2012, 11:09
Shrubadub's Avatar
Shrubadub Shrubadub is offline
Shrubadub
FRC #2656 (Quasics)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Monroeville Pa
Posts: 26
Shrubadub is an unknown quantity at this point
Re: No clue where to start on Programming...

I would use the standard joysticks that is what i use. To have base for programming use the FRC example provided by labview.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2012, 11:12
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,372
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: No clue where to start on Programming...

Do you have any other teams in your area that can walk you throught the basics? That is how we have helped new teams in our are, or teams with new programmers.
For now, start with getting the motors spinning for Teleop driving.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2012, 11:17
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
Re: No clue where to start on Programming...

We have one team nearby that I know of, however I believe they're lacking in the field of Programming. I've looked through a majority of examples provided in LabVIEW. It's just a matter of "ok what do I do now?" and where to start. Once I get passed this, I think we'll be good so far as programming goes. It's just comprehending the basics.
Reply With Quote
  #5   Spotlight this post!  
Unread 28-01-2012, 11:45
Tommy F.'s Avatar
Tommy F. Tommy F. is offline
Yeah! Collages!
AKA: 7h0m45
FRC #1985 (Robohawks)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: St. Louis, MO
Posts: 188
Tommy F. is just really niceTommy F. is just really niceTommy F. is just really niceTommy F. is just really nice
Re: No clue where to start on Programming...

http://www.frcmastery.com/ has some great tutorials for LabVIEW. I suggest you take a look at these if you already haven't.
__________________

FTC 289, 290 & 291 :: FRC 1985

2013 St. Louis Regional Semi-Finalist (with 3411 and 4330), Industrial Design Award
2013 Queen City Regional Winner (with 379 and 447)

Reply With Quote
  #6   Spotlight this post!  
Unread 28-01-2012, 13:11
rsisk's Avatar
rsisk rsisk is offline
The GURU Channel
AKA: Richard Sisk
FRC #2493 (Robokong)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Riverside, CA
Posts: 2,749
rsisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond reputersisk has a reputation beyond repute
Send a message via MSN to rsisk
Re: No clue where to start on Programming...

You can't go wrong with the resources at WPI either: http://thinktank.wpi.edu/tag/1

The 2 minute lesson:

In Labview, generate a default project for your robot. Be sure to put your team number in for the IP address (10.37.63.2) when you generate the project.

In Project Explorer, Expand the Build Specification thingy, right click on FRC Robot Boot Up Deployment and BUILD, after that finishes, same thing but click RUN AS STARTUP.

If all that succeeds, you now have a robot that will drive with a single joystick and a left and right motor.

To add more functionality, open up BEGIN.VI, press Ctrl-E to get to the block diagram. This is where you connect the programming world of Labview to the physical world of your robot. Check out the definition for the motors and the joystick to see how this is done.

To add other functions, right click in the block diagram to bring up the functions toolbox. Down at the bottom you will see the WPI LIBRARY, this is where most (all?) of the robot related functions are located. You can add motors, joysticks and other stuff here.

The bulk of your programming will take place in TELEOP.VI, this is the LOOP that runs while your robot is in telop mode. Same ideas apply as in BEGIN.VI, except here you will open references to the things you defined in BEGIN.VI, and do stuff with them; read sensors, send signals to motors.

That is the basics, after that, go check out examples, spend time on FRCMASTERY, hook up with other teams and all will be good.
__________________
Quote:
The views expressed are mine and should not be construed to represent the views of anyone else.
Reply With Quote
  #7   Spotlight this post!  
Unread 28-01-2012, 13:56
commonsense commonsense is offline
Registered User
FRC #3452
 
Join Date: Jan 2012
Location: Berrien Springs FRC
Posts: 16
commonsense will become famous soon enoughcommonsense will become famous soon enough
Re: No clue where to start on Programming...

I agree with all the rest of them. I am a first year labView programmer in lead position. However I have done other languages before. Do you have any other experience? I learned a lot from the tutorials, and the programer from last year (now in college). For where you are I would just suggest setting up your cRIO with the default code and getting it to deploy. After that, start from the basics. Add a motor with a default power value into your code. For a motor to run you need an "Open VI" and a "Set Refnum VI" wired together in the "Begin VI". Then in your telleop VI write a "Get Refnum VI" wired to a "Set Output VI" with an output value. And in the "End VI" write in a "Get Refnum VI" wired to a "Close VI" with the same refnum name you put into the other Refnum name terminals. The wiring is easy using the color coding. Also to give a constant value to a terminal right click on the terminal and chose Create then Constant. Once you have this, start adding in other controlls, doing the same setup, and hook them together in a logical order.
ps. some of the VIs might be the wrong name since I was working off of memory.
Reply With Quote
  #8   Spotlight this post!  
Unread 30-01-2012, 16:35
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
Re: No clue where to start on Programming...

Quote:
Originally Posted by rsisk View Post
You can't go wrong with the resources at WPI either: http://thinktank.wpi.edu/tag/1

The 2 minute lesson:

In Labview, generate a default project for your robot. Be sure to put your team number in for the IP address (10.37.63.2) when you generate the project.

In Project Explorer, Expand the Build Specification thingy, right click on FRC Robot Boot Up Deployment and BUILD, after that finishes, same thing but click RUN AS STARTUP.

If all that succeeds, you now have a robot that will drive with a single joystick and a left and right motor.

To add more functionality, open up BEGIN.VI, press Ctrl-E to get to the block diagram. This is where you connect the programming world of Labview to the physical world of your robot. Check out the definition for the motors and the joystick to see how this is done.

To add other functions, right click in the block diagram to bring up the functions toolbox. Down at the bottom you will see the WPI LIBRARY, this is where most (all?) of the robot related functions are located. You can add motors, joysticks and other stuff here.

The bulk of your programming will take place in TELEOP.VI, this is the LOOP that runs while your robot is in telop mode. Same ideas apply as in BEGIN.VI, except here you will open references to the things you defined in BEGIN.VI, and do stuff with them; read sensors, send signals to motors.

That is the basics, after that, go check out examples, spend time on FRCMASTERY, hook up with other teams and all will be good.
Thank you so much for this help along with everyone else who has provided input. I'm starting to get a "better" hang on programming. However, I have run into yet ANOTHER problem.

While in LabVIEW::

-Went to Robot Main.vi
-Pressed Ctrl+E which opened the Robot Main.iv Block Diagram.
-Double-clicked the Begin.vi and opened up the Begin.vi Front Panel
-Pressed Ctrl+E and opened the Begin.vi Block Diagram.


Now from here I tried 2 different options for adding 2 MORE motors.

Option one:
After opening the Begin.vi Block Diagram I did the following:
-Added another...Pink-ish text box and titled it "Left and Right Motors 2."
-From here I wired up EXACTLY how the first 2 motors were wired up. (Refnum, Drive - Open 2 motors, etc...)
-I COPY and PASTED the 2 PWMs provided on-screen and titled them PWM 3/4.
-With NO ERRORS, I deployed the code onto the cRIO.
-Afterwards, we switched over to the Classmate Driver Station.
-We had Robot Code and Communication, however when moving the joystick, only 2 of the 4 motors spun. (The 2 motors that were already written in the program.
**Option one failed.

Option two:
-Instead of ADDING another "Drive - Open 2 motors," I DELETED the provided Drive - Open 2 motors and REPLACED that with a Drive - Open 4 motors, adding 2 more PWMs, 3 and 4, where the other 2 motors were wired.
-With everything wired correctly and NO ERRORs displayed on screen, we moved over to the Classmate.
-Again, only 2 of the 4 motors were spinning. And again, only the 2 motors that were previously programmed.
**Option 2 Failed.

Right now, we are JUMPING all 4 motors together, but this is causing one motor to stay constant running, while the other 3 react to the position of the joystick.

Any and ALL help reguarding adding 2 more motors to the Begin.vi Block Diagram would be appreciated.

~Team 3763. Adam.
Reply With Quote
  #9   Spotlight this post!  
Unread 30-01-2012, 17:18
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: No clue where to start on Programming...

Option two should have worked for you, assuming you kept the same name for the RefNum so that the Drive block in Teleop would find it properly.

When you say you "deployed the code onto the cRIO", what exactly do you mean? Did you Build the project first?
Reply With Quote
  #10   Spotlight this post!  
Unread 30-01-2012, 21:19
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
Re: No clue where to start on Programming...

I have done the whole "Build" through the Build Specifications part of the Project Viewer. Deploying the code to the cRIO is when you press the arrow in the upper left hand of the screen that points right. This transfers all programmed code onto the cRIO ready for use on the cRIO and Driver Station. It is also known as "Run."

Option two might not have worked for this reason, and I think I hit a breakthrough.

I used the same refnum function blocks and everything, however this was only under the Begin.vi Block. I had never taken into account that the Teleop.vi is I guess for lack of a better word, the "control station" of programming. I looked under the Teleop.vi block, and I found a pathway I would call it where would show Left and Right Motors ---> Drive RefNum Get ---> Drive Arcade Drive. Along with that, the joystick information is also directed INTO the Drive Arcade Drive.

Now, I THINK that because I never made a replicate of this path, motors 3 and 4 had nothing "controlling" them. No joystick function, no Drive RefNum Get. Nothing.

However being that I am home now, I cannot "test" my theory for the time being.

Any schematics, drawings, anything involving LabVIEW and how to wire up ADDITIONAL motors would be so helpful!

Looking forward to all responses,
Adam of Team 3763 - Wildcards
Reply With Quote
  #11   Spotlight this post!  
Unread 30-01-2012, 21:44
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
Re: No clue where to start on Programming...

A HUGE shoutout to commonsense of Team 3452!

I have rewrote a fresh, new program and I have high hopes of this one working!!

Come tomorrow I'll get back to all of you, read any new posts, and let you all know how I did. I have a great feeling about this, for once!

Once again a shoutout to commonsense of Team 3452!
And of course everyone else who has contributed in some sort of way!

This is Adam of Team 3763 signing off until another day. Thank you everyone!
Reply With Quote
  #12   Spotlight this post!  
Unread 31-01-2012, 15:14
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
Re: No clue where to start on Programming...

Each time I try to Deploy the new code onto the cRIO, a Conflict Resolution window appears. Below will be a Screenshot of the window.

If anyone knows why this is occuring and can help fix this, please reply. ASAP.

http://imgur.com/lTOrP
Reply With Quote
  #13   Spotlight this post!  
Unread 31-01-2012, 15:23
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: No clue where to start on Programming...

Quote:
Originally Posted by Team3763 Adam View Post
Each time I try to Deploy the new code onto the cRIO, a Conflict Resolution window appears. Below will be a Screenshot of the window.

If anyone knows why this is occuring and can help fix this, please reply. ASAP.

http://imgur.com/lTOrP
This is a warning, not an error. The ways to stop it from happening are much slower than just clicking OK. There are no ill effects from just clicking OK.
Reply With Quote
  #14   Spotlight this post!  
Unread 31-01-2012, 15:27
Team3763 Adam Team3763 Adam is offline
Lead Programmer
FRC #3763 (4H WildCards)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2010
Location: North Carolina
Posts: 157
Team3763 Adam can only hope to improve
Re: No clue where to start on Programming...

Quote:
Originally Posted by RufflesRidge View Post
This is a warning, not an error. The ways to stop it from happening are much slower than just clicking OK. There are no ill effects from just clicking OK.
That is a MAJOR relief, thank you.
Reply With Quote
  #15   Spotlight this post!  
Unread 31-01-2012, 16:00
vhcook's Avatar
vhcook vhcook is online now
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
Re: No clue where to start on Programming...

Quote:
Originally Posted by Team3763 Adam View Post
Each time I try to Deploy the new code onto the cRIO, a Conflict Resolution window appears. Below will be a Screenshot of the window.

If anyone knows why this is occuring and can help fix this, please reply. ASAP.

http://imgur.com/lTOrP
Basically what this message is telling you is that you are replacing the code that is in the cRIO with the load you are deploying. Since that's what you meant to do, it's ok. The error you want to watch out for is "Failed to connect to RT target" which means your programming computer isn't talking to the cRIO.

If you're deploying and running by clicking the run arrow (which is what I'm gathering from your description), make sure you do so from Robot Main, not one of the other VIs like Teleop, so that all the setup code runs. This method is fine for testing since you can set probes to see what's happening, but will not stay if you disconnect the laptop or reboot the robot. You also don't have to Build before running this way.

When you have some code you'd like to stay in the robot after it's rebooted, use "Run at Startup" (not "Deploy") from the same right-click menu where you did the Build. You do need to complete a build before using this option.
__________________


Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi