Go to Post Why subject your robot to a potential sensor failure when you can train a monkey (or a student, if monkeys are lacking) to put the tube at the right height every time? - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 12-03-2015, 09:02
Jeremy2145's Avatar
Jeremy2145 Jeremy2145 is offline
Registered User
FRC #2145
 
Join Date: Sep 2014
Location: Michigan
Posts: 7
Jeremy2145 is an unknown quantity at this point
Solenoid only runs once

https://github.com/Jeremy2145/2015Compressor

In OI, 2 buttons are set to open and close the solenoid, but after it opens and closes once it no longer opens and will fire randomly. Why?
__________________
Time is as fluid as a dance, and truth as fleeting.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-03-2015, 10:00
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 330
fovea1959 will become famous soon enough
Re: Solenoid only runs once

lotta code there. Which button, command and actuator are the problem children?
Reply With Quote
  #3   Spotlight this post!  
Unread 12-03-2015, 12:17
Jeremy2145's Avatar
Jeremy2145 Jeremy2145 is offline
Registered User
FRC #2145
 
Join Date: Sep 2014
Location: Michigan
Posts: 7
Jeremy2145 is an unknown quantity at this point
Re: Solenoid only runs once

The compressor and solenoid are in slide. The two commands, GripTote and UnGripTote, use the solenoid. Those commands are bound to buttons in the OI.
__________________
Time is as fluid as a dance, and truth as fleeting.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-03-2015, 12:20
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Solenoid only runs once

You need to make sure both of those commands require the slide subsystem. What's happening is both commands are running at the same time.

Either that or make sure they both finish after one execution. To do this move the actuation of the slide into the initialize method and return true from isFinished();

Last edited by notmattlythgoe : 12-03-2015 at 12:22.
Reply With Quote
  #5   Spotlight this post!  
Unread 12-03-2015, 12:50
Jeremy2145's Avatar
Jeremy2145 Jeremy2145 is offline
Registered User
FRC #2145
 
Join Date: Sep 2014
Location: Michigan
Posts: 7
Jeremy2145 is an unknown quantity at this point
Re: Solenoid only runs once

YES! That worked.
__________________
Time is as fluid as a dance, and truth as fleeting.
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 10:27.

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