Go to Post Start up the rumor mill... - frcguy [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 14-03-2014, 07:53
chip1264 chip1264 is offline
Registered User
FRC #3224
 
Join Date: Jan 2014
Location: United States
Posts: 1
chip1264 is an unknown quantity at this point
Spike relay only works in reverse

We have a window motor connected to a spike relay and our Labview code is able to manipulate it in both directions but when we flash the cRio and load our Java code, the relay only runs in reverse.

We have tried multiple scenarios trying to track down the issue and these have included: changing the constructor (new relay(1); new relay(1,1); new relay(1,1,kBoth), we have changed the code and replaced the kReverse, which works, to kForward. We have even verified that kForward has a value of 2 by outputing the value to the dashboard.

When we watch the relay, reverse does turn the LED red but forward never changes to green.

Team 3224
Lion Hit Squad
Reply With Quote
  #2   Spotlight this post!  
Unread 14-03-2014, 09:32
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,079
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Spike relay only works in reverse

What do the relay lights on the DSC do?
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

Reply With Quote
  #3   Spotlight this post!  
Unread 14-03-2014, 14:09
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,785
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Spike relay only works in reverse

It is possible to have the relay only respond in one direction if the PWM cable is defective. The Spike is controlled by the two lines, not by PWM. It is only using the same cables for this connection. The DSC will have two LEDs for each relay output. If the indicators are correct, then replace the wire.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-03-2014, 15:36
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: Spike relay only works in reverse

Quote:
Originally Posted by chip1264 View Post
We have a window motor connected to a spike relay and our Labview code is able to manipulate it in both directions but when we flash the cRio and load our Java code, the relay only runs in reverse.

We have tried multiple scenarios trying to track down the issue and these have included: changing the constructor (new relay(1); new relay(1,1); new relay(1,1,kBoth), we have changed the code and replaced the kReverse, which works, to kForward. We have even verified that kForward has a value of 2 by outputing the value to the dashboard.

When we watch the relay, reverse does turn the LED red but forward never changes to green.

Team 3224
Lion Hit Squad
Please post code of your constructor, and code where you command the relay to change direction.

Have you tried swapping out the relay and the results are the same?

Are you running the test with the motor connected or disconnected? I would remove the motor from the relay and just verify voltage output from the relay terminals for now using a volt meter.

Regards,
Kevin
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
Reply With Quote
  #5   Spotlight this post!  
Unread 16-03-2014, 09:26
AlexBrinister AlexBrinister is offline
Registered User
AKA: Alex Brinister
FRC #1768 (RoboChiefs)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Bolton, MA
Posts: 93
AlexBrinister will become famous soon enough
Re: Spike relay only works in reverse

We usually instantiate our Spikes like so:

Code:
Relay spike = new Relay(1);
We do not even include the Direction in our instantiation of the object. Also, we also set the Spike to the off position right after instantiation:

Code:
spike.set(Relay.Value.kOff);
Alex Brinister

Last edited by AlexBrinister : 16-03-2014 at 09:29. Reason: Messed up Direction and Value
Reply With Quote
  #6   Spotlight this post!  
Unread 17-03-2014, 08:40
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Spike relay only works in reverse

It looks to me (based on the javadoc) that the default constructor for the Relay objects defaults to allowing the Relay object to operate in both directions.

Hence your constuctor:

Code:
Relay spike = new Relay(1);
Should be the same as:

Code:
Relay spike = new Relay(1, Relay.Direction.kBoth);
This means you should be able to put your relay in 3 different states:

Code:
public void autonomous() {
  // SimpleRobot autonomous test code that transitions the relay through
  // all 3 states (2 seconds forward, 2 seconds reverse, then off).

  // +12 volts out (think this displays the green LED on DSC)
  spike.set(Relay.Value.kForward);
  Timer.delay(2.0);

  // -12 volts out (think this displays the red LED on DSC)
  spike.set(Relay.Value.kReverse);
  Timer.delay(2.0);

  // 0 volts out
  spike.set(Relay.Value.kOff);
}
So, from your previous posts: It sounds like you are constructing the Relay so that it will operate in all three states. But, it sounds like you are not seeing the green LED light up when you set the forward state. There are at least three possibilities:
  • Your code that sets the forward state is being reached, however after setting the forward state, another portion of your code is executed which immediately sets the relay back to the reverse or off state.
  • Your code that sets the forward state is not being reached.
  • There is a hardware failure in digital module, 37 pin cable or digital side car. You can try using a different relay channel or substituting parts to check this. Digital side cars do fail - our team has already had to replace one this season.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-03-2014, 11:22
SousVide SousVide is offline
Registered User
no team
 
Join Date: Jan 2011
Location: CA
Posts: 91
SousVide is a splendid one to beholdSousVide is a splendid one to beholdSousVide is a splendid one to beholdSousVide is a splendid one to beholdSousVide is a splendid one to beholdSousVide is a splendid one to beholdSousVide is a splendid one to behold
Re: Spike relay only works in reverse

We have some relays that work fine, but the LEDs don't work well as indicators. I'd use a meter to see if there's actually output rather than going solely with the indicator.

Also, if the direction of the relay is set to kBoth, you can have a 4th state using Relay.Value.kOn. kOn puts 12v down both M+ and M- at the same time. We use it to control two separate items with the one relay... See the IFI Spike user's guide:

http://content.vexrobotics.com/docs/...uide-sep05.pdf
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 04:49.

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