Go to Post If your goal is to win matches... Pick the most capable candidate. If your goal is to change lives... Sometimes you pick those that need the most change. - IKE [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 06-12-2011, 06:58
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
project startup vi

I am making a simple drive project which allows you to either drive with tank or arcade drive, depending on keyboard input. There are 3 different vi's in this project. How would i set which one runs first?
Reply With Quote
  #2   Spotlight this post!  
Unread 06-12-2011, 08:01
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: project startup vi

Do you want to run all three in sequence, with the order depending on a user choice? Or do you want to run only one of the three based on what the user selects?

Are you planning to have the robot controller get information from the Driver Station keyboard?
Reply With Quote
  #3   Spotlight this post!  
Unread 06-12-2011, 15:43
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: project startup vi

well, i want it to load with an initial vi that reads the keyboard input. Depending on if A or T is pressed, it will run either the tank drive vi or the arcade drive vi.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-12-2011, 21:10
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: project startup vi

The Driver Station program does not pass keyboard information to the robot. You should think about other ways to select arcade vs. tank drive, such as a joystick button or a switch on the Cypress I/O board (which doesn't have to be a real switch; you can use the emulated I/O on the Driver Station tab).

Use a Case block to run either the Arcade or Tank drive functions. Which one gets run will depend on the select input to the Case, and that should come from the switch you've chosen.

Does this help?
Reply With Quote
  #5   Spotlight this post!  
Unread 06-12-2011, 21:27
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: project startup vi

oh, thought it would get keyboard. Ok. Can you explain "Case Block"?
Reply With Quote
  #6   Spotlight this post!  
Unread 06-12-2011, 21:33
plnyyanks's Avatar
plnyyanks plnyyanks is offline
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,114
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: project startup vi

Also called a case structure, this is basically equivalent to an if statement and a switch statement as found in some text based languages. Wire your selector value to the node on the left side of the rectangle and put the code you want to execute in each state in the corresponding subdiagram.

NI Reference
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote
  #7   Spotlight this post!  
Unread 07-12-2011, 07:05
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: project startup vi

oh, ok. Didn't recognize the name. I know what that is. The problem that i found was that it wouldn't keep the value. I fixed this by putting a while loop inside the case structure.
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 20:48.

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