Go to Post Give yourself the best chance to win at the event you're at by picking the best possible alliance partners available - always. - Rich Kressly [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 08-03-2014, 19:17
Kevin Phan's Avatar
Kevin Phan Kevin Phan is offline
College Student
FRC #0357 (Royal Assault)
Team Role: Alumni
 
Join Date: Apr 2013
Rookie Year: 2010
Location: PA, United States
Posts: 95
Kevin Phan will become famous soon enoughKevin Phan will become famous soon enough
Re: Multi-Choice Autonomous

For me it is cleaner to use the boolean array conversion, instead having multiple case structures. AGPapa's examples are still valid. It's up to you to what you want to use.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-03-2014, 19:25
alexander.h's Avatar
alexander.h alexander.h is offline
Lead Programmer, Captain, Driver
FRC #3975 (The Dragons)
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Montreal, Quebec, Canada
Posts: 261
alexander.h has a spectacular aura aboutalexander.h has a spectacular aura aboutalexander.h has a spectacular aura about
Re: Multi-Choice Autonomous

Quote:
Originally Posted by Kevin Phan View Post
For me it is cleaner to use the boolean array conversion, instead having multiple case structures. AGPapa's examples are still valid. It's up to you to what you want to use.
OK, thanks!
__________________



2012 - Rebound Rumble - Montreal Robotics Festival - Qualified 15th - Semifinalists thanks to 3379 and 3710 (Record : 8-8-1)
2013 - Ultimate Ascent - Montreal Robotics Festival - Qualified 33rd - Dean's List Finalist : Yazid Djenadi (Record : 4-8-0)
2014 - Aerial Assist - Montreal Robotics Festival - Qualified 9th (Record : 6-4-1)
2015 - Recycle Rush *** I predicted the game ***

Reply With Quote
  #3   Spotlight this post!  
Unread 09-03-2014, 07:51
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,751
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: Multi-Choice Autonomous

You can use the Boolean bits however you like. Note that you can also name the switches on the DS so that the drive team knows what they are selecting. Just click on the field and give them a short name.

In the auto, you may want to account for unusual settings, illegal values, etc. In those cases, be sure to run something.

A few things you may want to consider.

Searching for the first True Boolean in the array gives you eight valid values (0 - 7) with good labels on the DS.

Converting the Boolean array to a number is in the Numeric>>Conversion palette and it gives you 256 valid values (0-255). The encoding will be in binary and the DS will not read as well.

You can use the sliders too, so if some of your programs vary only be a speed or a steering angle, you may want to use a slider instead. They can also be named on the DS.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 09-03-2014, 07:55
alexander.h's Avatar
alexander.h alexander.h is offline
Lead Programmer, Captain, Driver
FRC #3975 (The Dragons)
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Montreal, Quebec, Canada
Posts: 261
alexander.h has a spectacular aura aboutalexander.h has a spectacular aura aboutalexander.h has a spectacular aura about
Re: Multi-Choice Autonomous

Quote:
Originally Posted by Greg McKaskle View Post
You can use the Boolean bits however you like. Note that you can also name the switches on the DS so that the drive team knows what they are selecting. Just click on the field and give them a short name.

In the auto, you may want to account for unusual settings, illegal values, etc. In those cases, be sure to run something.

A few things you may want to consider.

Searching for the first True Boolean in the array gives you eight valid values (0 - 7) with good labels on the DS.

Converting the Boolean array to a number is in the Numeric>>Conversion palette and it gives you 256 valid values (0-255). The encoding will be in binary and the DS will not read as well.

You can use the sliders too, so if some of your programs vary only be a speed or a steering angle, you may want to use a slider instead. They can also be named on the DS.

Greg McKaskle
I see, but where exactly do I edit the names of each digital input? Directly on the driver station?
__________________



2012 - Rebound Rumble - Montreal Robotics Festival - Qualified 15th - Semifinalists thanks to 3379 and 3710 (Record : 8-8-1)
2013 - Ultimate Ascent - Montreal Robotics Festival - Qualified 33rd - Dean's List Finalist : Yazid Djenadi (Record : 4-8-0)
2014 - Aerial Assist - Montreal Robotics Festival - Qualified 9th (Record : 6-4-1)
2015 - Recycle Rush *** I predicted the game ***

Reply With Quote
  #5   Spotlight this post!  
Unread 09-03-2014, 08:07
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,751
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: Multi-Choice Autonomous

Yes, each button has a text field to the right of it. It should store and retrieve those when you next launch the DS. They are stored in the ini file. The names are not sent to the robot, only the Boolean values.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 09-03-2014, 08:09
alexander.h's Avatar
alexander.h alexander.h is offline
Lead Programmer, Captain, Driver
FRC #3975 (The Dragons)
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Montreal, Quebec, Canada
Posts: 261
alexander.h has a spectacular aura aboutalexander.h has a spectacular aura aboutalexander.h has a spectacular aura about
Re: Multi-Choice Autonomous

Quote:
Originally Posted by Greg McKaskle View Post
Yes, each button has a text field to the right of it. It should store and retrieve those when you next launch the DS. They are stored in the ini file. The names are not sent to the robot, only the Boolean values.

Greg McKaskle
About how much text do you think I could put in each text field?
__________________



2012 - Rebound Rumble - Montreal Robotics Festival - Qualified 15th - Semifinalists thanks to 3379 and 3710 (Record : 8-8-1)
2013 - Ultimate Ascent - Montreal Robotics Festival - Qualified 33rd - Dean's List Finalist : Yazid Djenadi (Record : 4-8-0)
2014 - Aerial Assist - Montreal Robotics Festival - Qualified 9th (Record : 6-4-1)
2015 - Recycle Rush *** I predicted the game ***

Reply With Quote
  #7   Spotlight this post!  
Unread 09-03-2014, 08:12
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,751
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: Multi-Choice Autonomous

If you have the DS, give it a try. In the first Button, I typed "About this much". It wrapped on the 'h'.

Greg McKaskle
Reply With Quote
  #8   Spotlight this post!  
Unread 09-03-2014, 08:14
alexander.h's Avatar
alexander.h alexander.h is offline
Lead Programmer, Captain, Driver
FRC #3975 (The Dragons)
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Montreal, Quebec, Canada
Posts: 261
alexander.h has a spectacular aura aboutalexander.h has a spectacular aura aboutalexander.h has a spectacular aura about
Re: Multi-Choice Autonomous

Quote:
Originally Posted by Greg McKaskle View Post
If you have the DS, give it a try. In the first Button, I typed "About this much". It wrapped on the 'h'.

Greg McKaskle
No, sorry, I don't have the DS in front of me, but I get the picture: I only have space for 2 or 3 keywords.
__________________



2012 - Rebound Rumble - Montreal Robotics Festival - Qualified 15th - Semifinalists thanks to 3379 and 3710 (Record : 8-8-1)
2013 - Ultimate Ascent - Montreal Robotics Festival - Qualified 33rd - Dean's List Finalist : Yazid Djenadi (Record : 4-8-0)
2014 - Aerial Assist - Montreal Robotics Festival - Qualified 9th (Record : 6-4-1)
2015 - Recycle Rush *** I predicted the game ***

Reply With Quote
  #9   Spotlight this post!  
Unread 18-03-2014, 08:56
chris.boyle's Avatar
chris.boyle chris.boyle is offline
Programming Mentor
FRC #0068 (Truck Town Thunder)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Truck Town Thunder (Brandon)
Posts: 36
chris.boyle is on a distinguished road
Re: Multi-Choice Autonomous

We are using another method based on the SD. We have a record and replay system that stores the driver & manipulator input to a file on the cRIO. Autonomous reads the selected file and populates the variables that control the robot. The drive team chooses the autonomous to run from our custom dashboard app before the start of the match.

In Begin.vi we populate the array of autonomous choices (custom file extension *.auto) and write it to the SD.

In Dashboard Main.vi we read the array of choices and populate an enum ring's String Property with the file names.

Autonomous then sends back the values it received so we know it got the correct values.
Attached Thumbnails
Click image for larger version

Name:	Begin.png
Views:	12
Size:	2.2 KB
ID:	16591  Click image for larger version

Name:	DashboardMain.png
Views:	16
Size:	9.5 KB
ID:	16592  Click image for larger version

Name:	DashboardApp.png
Views:	15
Size:	6.2 KB
ID:	16593  Click image for larger version

Name:	Auton.png
Views:	13
Size:	12.5 KB
ID:	16594  
__________________
2014 Chairman's Award--Michigan State Championship
2014 Chairman's Award--Waterford District
2014 Winner--Great Lakes Bay District
2013 Chairman's Award--Kettering District
2012 Championship Division Finalists--Thanks 330 and 639
Reply With Quote
  #10   Spotlight this post!  
Unread 19-03-2014, 00:53
Invictus3593's Avatar
Invictus3593 Invictus3593 is offline
time you like wasting is not wasted
FRC #3593 (Team Invictus)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Tulsa, OK
Posts: 318
Invictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really niceInvictus3593 is just really nice
Re: Multi-Choice Autonomous

Here's yet another method if you don't like the DS buttons:

Set up a Enum text box on your dashboard and give each number value a corresponding label, showing your driver which program to use.



Write the integer value to a SD variable and then in your autonomous mode, read the value and have a case structure select the correct program to run based simply on the integer value.



When you set up your player station, select the correct program then leave the variable alone. As the match starts, it will read the variable from your dashboard once at the beginning of the Autonomous Period, then execute the correct program.

Our team has used this method for two years and never had an issue. It's reliable and versatile, allowing for many different modes and configurations, as long as your drivers remember to check and make sure it's correct before the match starts XD.
__________________
Per Audacia Ad Astra
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:54.

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