Go to Post The more interesting arguments were around a related subject: whether it was pronounced "Wago tool" or "screwdriver". - Billfred [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 16-02-2012, 12:23
juchong's Avatar
juchong juchong is offline
Electrical Engineer
AKA: Juan Chong
FRC #2655 (Flying Platypi)
Team Role: Engineer
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Greensboro, NC
Posts: 107
juchong is a jewel in the roughjuchong is a jewel in the roughjuchong is a jewel in the rough
Re: Explanation.

I believe so. I'm not sure what that PID block's inputs are since I don't have LabVIEW open right now, but it makes sense.
__________________
Teams I've worked with:My Website: http://www.juanjchong.com/
What I do: Analog Devices iSensor Product Engineer
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2012, 12:31
mtnteam mtnteam is offline
3747 - Programmer
AKA: Steven
FRC #3747 (ChaoTech)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Minnesota
Posts: 30
mtnteam is an unknown quantity at this point
Re: Explanation.

I do appreciate you helping me out. I have one more question if you don't mind. If i were to tweak the distance out a bit to give me the degrees, would i be able to use that instead of the ticks?
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2012, 12:40
juchong's Avatar
juchong juchong is offline
Electrical Engineer
AKA: Juan Chong
FRC #2655 (Flying Platypi)
Team Role: Engineer
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Greensboro, NC
Posts: 107
juchong is a jewel in the roughjuchong is a jewel in the roughjuchong is a jewel in the rough
Re: Explanation.

You could, but you would have to find some sort of "ticks vs degrees" relationship via experimentation. Maybe have the robot move 20 ticks and check how many degrees have been moved on your motor.
__________________
Teams I've worked with:My Website: http://www.juanjchong.com/
What I do: Analog Devices iSensor Product Engineer
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2012, 12:43
mtnteam mtnteam is offline
3747 - Programmer
AKA: Steven
FRC #3747 (ChaoTech)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Minnesota
Posts: 30
mtnteam is an unknown quantity at this point
Re: Explanation.

okay thank you. I think this example would help out a lot of teams. Thank you very much for your help. If i have anymore questions, would you mind if i messaged you about it?
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2012, 12:44
juchong's Avatar
juchong juchong is offline
Electrical Engineer
AKA: Juan Chong
FRC #2655 (Flying Platypi)
Team Role: Engineer
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Greensboro, NC
Posts: 107
juchong is a jewel in the roughjuchong is a jewel in the roughjuchong is a jewel in the rough
Re: Explanation.

Don't mind at all, although if it's something that other teams should know feel free to start a topic and message me the link, that way more people benefit!
__________________
Teams I've worked with:My Website: http://www.juanjchong.com/
What I do: Analog Devices iSensor Product Engineer
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2012, 14:10
mtnteam mtnteam is offline
3747 - Programmer
AKA: Steven
FRC #3747 (ChaoTech)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Minnesota
Posts: 30
mtnteam is an unknown quantity at this point
Re: Explanation.

Alright sounds good. I just been reading other topics in the past couple days. Most of them were asking how to have a motor controlled with a push of a button using an encoder.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2012, 00:20
bstites82 bstites82 is offline
Registered User
AKA: Blake Stites
FRC #2164 (multiple)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Harrisonville
Posts: 12
bstites82 is an unknown quantity at this point
Re: Explanation.

assuming that this is in the teleop, which is inside the robot main loop which executes aprox every 20 ms. ok so if you walk through the code, it feeds the 4 buttons into an array, then it uses a boolean to number conversion to return the array index of the button that was pressed, then it checks to see if the array index of the button pressed was greater than 1(which i assume zero is the default case). it also writes the index value of any button that was pressed to a global variable called arm binary. then it feeds the results of "was button pressed" >1 to a select function, where it compares the index value of button pressed>1 to the global variable arm binary. now if a new button was pressed, and was greater than one, it moves to the case that corresponds with the index array of that button (ie.. top row, middle row, ect). and feeds the appropriate values to the pid controllers for the desired position. if the loop iterates and a button was not pressed then it executes the value read from global variable arm binary and stays at whatever the last position was (ie.. top row, middle row, ect).
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2012, 00:54
juchong's Avatar
juchong juchong is offline
Electrical Engineer
AKA: Juan Chong
FRC #2655 (Flying Platypi)
Team Role: Engineer
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Greensboro, NC
Posts: 107
juchong is a jewel in the roughjuchong is a jewel in the roughjuchong is a jewel in the rough
Re: Explanation.

I think a single case statement with a bunch of different cases would've been a more efficient way to write this, but oh well...
__________________
Teams I've worked with:My Website: http://www.juanjchong.com/
What I do: Analog Devices iSensor Product Engineer
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:08.

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