Go to Post 10:50PM, 1/14/16: I predict that hot dog wheels will grace Einstein before Mecanum wheels will. You heard it here first. - CalTran [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
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 11-03-2014, 15:30
Rochester2909 Rochester2909 is offline
Registered User
FRC #2909
 
Join Date: Mar 2014
Location: Rochester
Posts: 11
Rochester2909 can only hope to improve
pic: Lab view

Reply With Quote
  #2   Spotlight this post!  
Unread 11-03-2014, 15:35
Jay1986's Avatar
Jay1986 Jay1986 is offline
Programmer and Driver
AKA: Jay Urban
FRC #1986 (Team Titanium)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Lees Summit
Posts: 67
Jay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the rough
Re: pic: Lab view

Well to fix your solenoid problem, the "solenoid set vi" needs a on/off command for single solenoids and not a true/false. To fix this, right click on the terminal of the "set vi" and hit create constant. This will give you the correct command. Then copy and paste another one and change it to "off". Then wire both commands to a select with the "on" wired to "true" and "off wired to "false". Then wire the output of your button to the input of the select and finally wire the output of the select to the input of the solenoid "set vi". Do this for both solenoids.
__________________

2013 Oklahoma Regional (Regional Winner, Gracious Professionalism, [and judges voted me star of the day])
2013 KC Regional (Regional Winner, Woodie Flowers, Industrial Design)
2013 Hub City Regional (Regional Winner, Entrepreneurship, Quality, Dean's List)
Reply With Quote
  #3   Spotlight this post!  
Unread 11-03-2014, 15:38
randantor randantor is offline
Registered User
AKA: James Y
FRC #0624 (CRyptonite)
Team Role: Alumni
 
Join Date: Jun 2013
Rookie Year: 2012
Location: Katy, TX
Posts: 48
randantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of light
Re: pic: Lab view

Quote:
Originally Posted by Jay1986 View Post
Well to fix your solenoid problem, the "solenoid set vi" needs a on/off command for single solenoids and not a true/false. To fix this, right click on the terminal of the "set vi" and hit create constant. This will give you the correct command. Then copy and paste another one and change it to "off". Then wire both commands to a select with the "on" wired to "true" and "off wired to "false". Then wire the output of your button to the input of the select and finally wire the output of the select to the input of the solenoid "set vi". Do this for both solenoids.

The solenoid VIs will work with either a boolean or an enum value.
Reply With Quote
  #4   Spotlight this post!  
Unread 11-03-2014, 15:47
Jay1986's Avatar
Jay1986 Jay1986 is offline
Programmer and Driver
AKA: Jay Urban
FRC #1986 (Team Titanium)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Lees Summit
Posts: 67
Jay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the roughJay1986 is a jewel in the rough
Re: pic: Lab view

Other suggestions with the rest of the code: First of all, don't have all of you code in teleop. The more code you have in teleop, the laggier your controls will be since all of the code is waiting for each other before it starts another iteration. What I recommend you to do is, write all the outputs from the buttons to global variables and then put all of your code in periodic tasks with separate loops and read the global variable from teleop. Doing this also allows you to have your code run in autonomous, so you can just write to your global variables instead of rewriting all of your code in autonomous. You don't have much code, so this is not a necessity this year. Another suggestion, you are using case structures like selects, so the case structure is a bit unnecessary. Also, the "motor set vi" reads values from -1 to 1, not -255 to 255. Other than that, it looks fine.

Hope this helps!
__________________

2013 Oklahoma Regional (Regional Winner, Gracious Professionalism, [and judges voted me star of the day])
2013 KC Regional (Regional Winner, Woodie Flowers, Industrial Design)
2013 Hub City Regional (Regional Winner, Entrepreneurship, Quality, Dean's List)
Reply With Quote
  #5   Spotlight this post!  
Unread 11-03-2014, 15:48
Woolly's Avatar
Woolly Woolly is offline
Programming Mentor
AKA: Dillon Woollums
FRC #1806 (S.W.A.T.)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Springfield, MO
Posts: 512
Woolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond reputeWoolly has a reputation beyond repute
Re: pic: Lab view

Correct me if I'm wrong, but for a double solenoid, don't you need to select between forward and reverse to make the mechanism extend and close.
Also, looking at your comments you want it to toggle being in or out on button press.

You will need to wire your button through this vi (thank you Channel Cats)
http://2013swat-robot-code.googlecod...E-FLIP-FLOP.vi

and then to a select statement that selects between the forward and reverse constants.
__________________


Team 1806 Student: 2012-2013 | Mentor: 2013-Present
Reply With Quote
  #6   Spotlight this post!  
Unread 11-03-2014, 16:19
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,705
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: pic: Lab view

Except those are Single solenoids, not doubles.
But the button toggle suggestion is good.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #7   Spotlight this post!  
Unread 11-03-2014, 17:06
AGPapa's Avatar
AGPapa AGPapa is offline
Registered User
AKA: Antonio Papa
FRC #5895
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Robbinsville, NJ
Posts: 323
AGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond reputeAGPapa has a reputation beyond repute
Re: pic: Lab view

The motor sets need a double from -1 to 1, not an integer.
__________________
Team 2590 Student [2011-2014]
Team 5684 Mentor [2015]
Team 5895 Mentor [2016-]
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 13:38.

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