Go to Post FIRST teams do not allow other FIRST teams to fail. - [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 28-01-2011, 00:38
tagayoff's Avatar
tagayoff tagayoff is offline
Registered User
FRC #3512
 
Join Date: Jan 2011
Location: Santa Maria,CA
Posts: 40
tagayoff is a jewel in the roughtagayoff is a jewel in the roughtagayoff is a jewel in the roughtagayoff is a jewel in the rough
Question Autonomous Independent vi question

Ref line follower code. Could someone please explain the reason why the driver station switches (2) are read into the Autonomous Independent vi then changed to cases Left,Right, Straight inside the while loop? Is this for adjusting the direction at the competition with your alliance? BTW where are the Driver station switches?
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2011, 07:54
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous Independent vi question

That is a demonstration of using inputs from the DS to influence the autonomous code. In this case, the two switches are used to choose between following the left edge of the Y, right edge of the Y, or following the straight line.

The switches come from the driver station. If you have a FIRST Touch module plugged into the DS, the laptop reads the value of the different buttons and pins, and that is what defines the values. If you do not have the module plugged in, you can still flip to the I/O tab, and enter the values on the screen.

In fact, if you are going to use the default code, I'd recommend editing the string near the first two buttons so that the driver, coach, or whoever else is setting up remembers how to set the switches.

Other useful DS input values are to set an analog slider or the joystick throttle to decide how long to wait, how far to drive, how fast to drive, how high to raise an arm, etc.

The demo code only drives the base. It is up to your team to decide if and how you'd like to use any of the other inputs and to write the code for it.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2011, 10:34
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Autonomous Independent vi question

Quote:
Originally Posted by Greg McKaskle View Post
In fact, if you are going to use the default code, I'd recommend editing the string near the first two buttons so that the driver, coach, or whoever else is setting up remembers how to set the switches.
Greg - Are you saying to modify the Driver Station software, as that is where the Virtual I/O Buttons are. From my understanding, R55 Blue Box says:

"Please note that the Driver Station application is a separate application from the Dashboard. The Driver Stations software may not be modified, while teams are expected to customize their Dashboard code."
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2011, 10:59
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,713
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Autonomous Independent vi question

I think Greg just means the existing Driver Station application permits you the ability to relabel the existing controls on the I/O tab, like so:

(I didn't look at the default code to get the button labels right)
Attached Thumbnails
Click image for larger version

Name:	Relabel-DS-IO_buttons.jpg
Views:	89
Size:	45.1 KB
ID:	9863  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 28-01-2011, 11:56
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Autonomous Independent vi question

/facepalm/
Thanks Mark. Of course they are labels and not variables. I saw the word "string" and the alarms went off in my head.
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 28-01-2011, 17:29
tagayoff's Avatar
tagayoff tagayoff is offline
Registered User
FRC #3512
 
Join Date: Jan 2011
Location: Santa Maria,CA
Posts: 40
tagayoff is a jewel in the roughtagayoff is a jewel in the roughtagayoff is a jewel in the roughtagayoff is a jewel in the rough
Post Re: Autonomous Independent vi question

Correct me if I'm wrong, the first case statement in the while loop (Straight,Right,Left) will be set to Straight if the DS switch are set to 2 or 3. That will allow a two sec delay before generating a true for the next case statement (0,1,7,default) only when it’s in the 7 state (Determined by (TTT) on the three line sensors. So if that occurs then the robot stops and the while loop is exited. Then we add code after the while loop to place the tube on a post.
If we entered Right or left on the drivers switches we are given 4 seconds delay before we can shut down the robot motors at the State 7. of the next case statement. This allows the robot to have passed the Y turn ( which might generate a State 7 indication). So we need to make sure the robot passes that Y before 4 seconds are up. And in any case the while loop will shut down the robot motors after 8 seconds. Does this sound about right?
Are the values on the autonomous VI front panel the values in the Power Profile array? Also are the drivers station switches set when they show Green?
Thanks for your time
Reply With Quote
  #7   Spotlight this post!  
Unread 29-01-2011, 05:59
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Autonomous Independent vi question

Your summary of the default auto code is about right. Keep in mind that the 2 and four second numbers are a starting point. They were added to keep the Y and the occasional TTT due to a bad starting position from being interpreted as the T at the end of the line. Adjust according to your robot speed.

The values on the front panel are the power profile array. If you modify them to better suit your robot, don't forget to right click and Make Current Values Default.

I believe that the DS buttons are lit green when the robot reads a true. You may want to probe to be certain.

Greg McKaskle
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 08:24.

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